[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
japhet at chromium.org
japhet at chromium.org
Thu Dec 3 13:30:17 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 8c5a4045fc27bad366675b9e9dffe246809a9187
Author: japhet at chromium.org <japhet at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 9 22:41:29 2009 +0000
2009-11-09 Nate Chapin <japhet at chromium.org>
Reviewed by Dimitri Glazkov.
Upstream remaining Chromium API WebN*.h headers.
https://bugs.webkit.org/show_bug.cgi?id=28394
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 51850c4..653e9fd 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -2,6 +2,30 @@
Reviewed by Dimitri Glazkov.
+ Upstream remaining Chromium API WebN*.h headers.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28394
+
+ * public/WebNonCopyable.h: Added.
+ (WebKit::WebNonCopyable::WebNonCopyable):
+ (WebKit::WebNonCopyable::~WebNonCopyable):
+ * public/WebNotification.h: Added.
+ (WebKit::WebNotification::WebNotification):
+ (WebKit::WebNotification::~WebNotification):
+ (WebKit::WebNotification::operator=):
+ (WebKit::WebNotification::equals):
+ (WebKit::operator==):
+ (WebKit::operator!=):
+ (WebKit::operator<):
+ * public/WebNotificationPermissionCallback.h: Added.
+ (WebKit::WebNotificationPermissionCallback::~WebNotificationPermissionCallback):
+ * public/WebNotificationPresenter.h: Added.
+ (WebKit::WebNotificationPresenter::):
+
+2009-11-09 Nate Chapin <japhet at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
Upstream Chromium API headers WebMessage through WebNavigation.
https://bugs.webkit.org/show_bug.cgi?id=28394
diff --git a/WebKit/chromium/public/WebNonCopyable.h b/WebKit/chromium/public/WebNonCopyable.h
new file mode 100644
index 0000000..b0bd456
--- /dev/null
+++ b/WebKit/chromium/public/WebNonCopyable.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebNonCopyable_h
+#define WebNonCopyable_h
+
+namespace WebKit {
+
+// A base class to extend from if you do not support copying.
+class WebNonCopyable {
+protected:
+ WebNonCopyable() { }
+ ~WebNonCopyable() { }
+
+private:
+ WebNonCopyable(const WebNonCopyable&);
+ WebNonCopyable& operator=(const WebNonCopyable&);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebNotification.h b/WebKit/chromium/public/WebNotification.h
new file mode 100644
index 0000000..1a41252
--- /dev/null
+++ b/WebKit/chromium/public/WebNotification.h
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebNotification_h
+#define WebNotification_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Notification; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebNotificationPrivate;
+class WebURL;
+class WebString;
+
+// Represents access to a desktop notification.
+class WebNotification {
+public:
+ WebNotification() : m_private(0) { }
+ WebNotification(const WebNotification& other) : m_private(0) { assign(other); }
+
+ ~WebNotification() { reset(); }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebNotification&);
+
+ WebNotification& operator=(const WebNotification& other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ // Operators required to put WebNotification in an ordered map.
+ bool equals(const WebNotification& other) const { return m_private == other.m_private; }
+ bool lessThan(const WebNotification& other) const;
+
+ // Is the notification HTML vs. icon-title-text?
+ WEBKIT_API bool isHTML() const;
+
+ // If HTML, the URL which contains the contents of the notification.
+ WEBKIT_API WebURL url() const;
+
+ // If not HTML, the parameters for the icon-title-text notification.
+ WEBKIT_API WebString icon() const;
+ WEBKIT_API WebString title() const;
+ WEBKIT_API WebString body() const;
+
+ // Called to indicate the notification has been displayed.
+ WEBKIT_API void dispatchDisplayEvent();
+
+ // Called to indicate an error has occurred with this notification.
+ WEBKIT_API void dispatchErrorEvent(const WebString& errorMessage);
+
+ // Called to indicate the notification has been closed. If it was
+ // closed by the user (as opposed to automatically by the system),
+ // the byUser parameter will be true.
+ WEBKIT_API void dispatchCloseEvent(bool byUser);
+
+#if WEBKIT_IMPLEMENTATION
+ WebNotification(const WTF::PassRefPtr<WebCore::Notification>&);
+ WebNotification& operator=(const WTF::PassRefPtr<WebCore::Notification>&);
+ operator WTF::PassRefPtr<WebCore::Notification>() const;
+#endif
+
+private:
+ void assign(WebNotificationPrivate*);
+ WebNotificationPrivate* m_private;
+};
+
+inline bool operator==(const WebNotification& a, const WebNotification& b)
+{
+ return a.equals(b);
+}
+
+inline bool operator!=(const WebNotification& a, const WebNotification& b)
+{
+ return !a.equals(b);
+}
+
+inline bool operator<(const WebNotification& a, const WebNotification& b)
+{
+ return a.lessThan(b);
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebNotificationPermissionCallback.h b/WebKit/chromium/public/WebNotificationPermissionCallback.h
new file mode 100644
index 0000000..07e85ee
--- /dev/null
+++ b/WebKit/chromium/public/WebNotificationPermissionCallback.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebNotificationPermissionCallback_h
+#define WebNotificationPermissionCallback_h
+
+namespace WebKit {
+
+// Callback object used with WebNotificationPresenter.
+class WebNotificationPermissionCallback {
+public:
+ // Method to be invoked when the async permission request involving
+ // this object has been completed.
+ virtual void permissionRequestComplete() = 0;
+
+protected:
+ // This object is to be destroyed after the callback is invoked;
+ // it should not be directly destroyed.
+ ~WebNotificationPermissionCallback() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebNotificationPresenter.h b/WebKit/chromium/public/WebNotificationPresenter.h
new file mode 100644
index 0000000..653b142
--- /dev/null
+++ b/WebKit/chromium/public/WebNotificationPresenter.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebNotificationPresenter_h
+#define WebNotificationPresenter_h
+
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebNotification;
+class WebNotificationPermissionCallback;
+
+// Provides the services to show desktop notifications to the user.
+class WebNotificationPresenter {
+public:
+ enum Permission {
+ PermissionAllowed, // User has allowed permission to the origin.
+ PermissionNotAllowed, // User has not taken an action on the origin (defaults to not allowed).
+ PermissionDenied // User has explicitly denied permission from the origin.
+ };
+
+ // Shows a notification.
+ virtual bool show(const WebNotification&) = 0;
+
+ // Cancels a notification previously shown, and removes it if being shown.
+ virtual void cancel(const WebNotification&) = 0;
+
+ // Indiciates that the notification object subscribed to events for a previously shown notification is
+ // being destroyed. Does _not_ remove the notification if being shown, but detaches it from receiving events.
+ virtual void objectDestroyed(const WebNotification&) = 0;
+
+ // Checks the permission level of a given origin.
+ virtual Permission checkPermission(const WebString& origin) = 0;
+
+ // Requests permission for a given origin. This operation is asynchronous and the callback provided
+ // will be invoked when the permission decision is made. Callback pointer must remain
+ // valid until called.
+ virtual void requestPermission(const WebString& origin, WebNotificationPermissionCallback* callback) = 0;
+};
+
+} // namespace WebKit
+
+#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list