Title: [101123] trunk/Source/WebKit/chromium
Revision
101123
Author
[email protected]
Date
2011-11-23 23:46:06 -0800 (Wed, 23 Nov 2011)

Log Message

Add simple implementation for web intents chromium API data classes.
https://bugs.webkit.org/show_bug.cgi?id=73036

Patch by Greg Billock <[email protected]> on 2011-11-23
Reviewed by Darin Fisher.

* WebKit.gyp:
* public/WebIntent.h:
* public/WebIntentServiceInfo.h:
* src/WebIntent.cpp: Copied from Source/WebKit/chromium/public/WebIntent.h.
(WebKit::WebIntent::WebIntent):
(WebKit::WebIntent::action):
(WebKit::WebIntent::setAction):
(WebKit::WebIntent::type):
(WebKit::WebIntent::setType):
(WebKit::WebIntent::data):
(WebKit::WebIntent::setData):
(WebKit::WebIntent::identifier):
(WebKit::WebIntent::setIdentifier):
* src/WebIntentServiceInfo.cpp: Copied from Source/WebKit/chromium/public/WebIntentServiceInfo.h.
(WebKit::WebIntentServiceInfo::WebIntentServiceInfo):
(WebKit::WebIntentServiceInfo::url):
(WebKit::WebIntentServiceInfo::setURL):
(WebKit::WebIntentServiceInfo::title):
(WebKit::WebIntentServiceInfo::setTitle):
(WebKit::WebIntentServiceInfo::action):
(WebKit::WebIntentServiceInfo::setAction):
(WebKit::WebIntentServiceInfo::type):
(WebKit::WebIntentServiceInfo::setType):
(WebKit::WebIntentServiceInfo::disposition):
(WebKit::WebIntentServiceInfo::setDisposition):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (101122 => 101123)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-11-24 07:13:28 UTC (rev 101122)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-11-24 07:46:06 UTC (rev 101123)
@@ -1,3 +1,36 @@
+2011-11-23  Greg Billock  <[email protected]>
+
+        Add simple implementation for web intents chromium API data classes.
+        https://bugs.webkit.org/show_bug.cgi?id=73036
+
+        Reviewed by Darin Fisher.
+
+        * WebKit.gyp:
+        * public/WebIntent.h:
+        * public/WebIntentServiceInfo.h:
+        * src/WebIntent.cpp: Copied from Source/WebKit/chromium/public/WebIntent.h.
+        (WebKit::WebIntent::WebIntent):
+        (WebKit::WebIntent::action):
+        (WebKit::WebIntent::setAction):
+        (WebKit::WebIntent::type):
+        (WebKit::WebIntent::setType):
+        (WebKit::WebIntent::data):
+        (WebKit::WebIntent::setData):
+        (WebKit::WebIntent::identifier):
+        (WebKit::WebIntent::setIdentifier):
+        * src/WebIntentServiceInfo.cpp: Copied from Source/WebKit/chromium/public/WebIntentServiceInfo.h.
+        (WebKit::WebIntentServiceInfo::WebIntentServiceInfo):
+        (WebKit::WebIntentServiceInfo::url):
+        (WebKit::WebIntentServiceInfo::setURL):
+        (WebKit::WebIntentServiceInfo::title):
+        (WebKit::WebIntentServiceInfo::setTitle):
+        (WebKit::WebIntentServiceInfo::action):
+        (WebKit::WebIntentServiceInfo::setAction):
+        (WebKit::WebIntentServiceInfo::type):
+        (WebKit::WebIntentServiceInfo::setType):
+        (WebKit::WebIntentServiceInfo::disposition):
+        (WebKit::WebIntentServiceInfo::setDisposition):
+
 2011-11-23  Adam Barth  <[email protected]>
 
         [Chromium] Move WebKitPlatformSupport.h and dependencies to new public/platform directory

Modified: trunk/Source/WebKit/chromium/WebKit.gyp (101122 => 101123)


--- trunk/Source/WebKit/chromium/WebKit.gyp	2011-11-24 07:13:28 UTC (rev 101122)
+++ trunk/Source/WebKit/chromium/WebKit.gyp	2011-11-24 07:46:06 UTC (rev 101123)
@@ -565,6 +565,8 @@
                 'src/WebInputEvent.cpp',
                 'src/WebInputEventConversion.cpp',
                 'src/WebInputEventConversion.h',
+                'src/WebIntent.cpp',
+                'src/WebIntentServiceInfo.cpp',
                 'src/WebKit.cpp',
                 'src/WebLabelElement.cpp',
                 'src/WebLayer.cpp',

Modified: trunk/Source/WebKit/chromium/public/WebIntent.h (101122 => 101123)


--- trunk/Source/WebKit/chromium/public/WebIntent.h	2011-11-24 07:13:28 UTC (rev 101122)
+++ trunk/Source/WebKit/chromium/public/WebIntent.h	2011-11-24 07:46:06 UTC (rev 101123)
@@ -31,10 +31,11 @@
 #ifndef WebIntent_h
 #define WebIntent_h
 
+#include "WebCommon.h"
+#include "WebString.h"
+
 namespace WebKit {
 
-class WebString;
-
 // Holds data passed through a Web Intents invocation call from the _javascript_
 // Intent object.
 // See spec at http://www.chromium.org/developers/design-documents/webintentsapi
@@ -53,6 +54,16 @@
 
     WEBKIT_EXPORT int identifier() const;
     WEBKIT_EXPORT void setIdentifier(int);
+
+#if WEBKIT_IMPLEMENTATION
+    WebIntent();
+#endif
+
+private:
+    WebString m_action;
+    WebString m_type;
+    WebString m_data;
+    int m_identifier;
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/chromium/public/WebIntentServiceInfo.h (101122 => 101123)


--- trunk/Source/WebKit/chromium/public/WebIntentServiceInfo.h	2011-11-24 07:13:28 UTC (rev 101122)
+++ trunk/Source/WebKit/chromium/public/WebIntentServiceInfo.h	2011-11-24 07:46:06 UTC (rev 101123)
@@ -31,11 +31,12 @@
 #ifndef WebIntentServiceInfo_h
 #define WebIntentServiceInfo_h
 
+#include "WebCommon.h"
+#include "WebString.h"
+#include "WebURL.h"
+
 namespace WebKit {
 
-class WebString;
-class WebURL;
-
 // Holds data used to initialize a Web Intents service (handler).
 // See spec at http://www.chromium.org/developers/design-documents/webintentsapi
 class WebIntentServiceInfo {
@@ -64,6 +65,17 @@
     // context (the default).
     WEBKIT_EXPORT WebString disposition() const;
     WEBKIT_EXPORT void setDisposition(const WebString&);
+
+#if WEBKIT_IMPLEMENTATION
+    WebIntentServiceInfo();
+#endif
+
+private:
+    WebString m_action;
+    WebString m_type;
+    WebURL m_href;
+    WebString m_title;
+    WebString m_disposition;
 };
 
 } // namespace WebKit

Copied: trunk/Source/WebKit/chromium/src/WebIntent.cpp (from rev 101122, trunk/Source/WebKit/chromium/public/WebIntent.h) (0 => 101123)


--- trunk/Source/WebKit/chromium/src/WebIntent.cpp	                        (rev 0)
+++ trunk/Source/WebKit/chromium/src/WebIntent.cpp	2011-11-24 07:46:06 UTC (rev 101123)
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+#include "config.h"
+#include "WebIntent.h"
+
+namespace WebKit {
+
+WebIntent::WebIntent() { }
+
+WebString WebIntent::action() const
+{
+    return m_action;
+}
+
+void WebIntent::setAction(const WebString& action)
+{
+    m_action = action;
+}
+
+WebString WebIntent::type() const
+{
+    return m_type;
+}
+
+void WebIntent::setType(const WebString& type)
+{
+    m_type = type;
+}
+
+WebString WebIntent::data() const
+{
+    return m_data;
+}
+
+void WebIntent::setData(const WebString& data)
+{
+    m_data = data;
+}
+
+int WebIntent::identifier() const
+{
+    return m_identifier;
+}
+
+void WebIntent::setIdentifier(int identifier)
+{
+    m_identifier = identifier;
+}
+
+} // namespace WebKit

Copied: trunk/Source/WebKit/chromium/src/WebIntentServiceInfo.cpp (from rev 101122, trunk/Source/WebKit/chromium/public/WebIntent.h) (0 => 101123)


--- trunk/Source/WebKit/chromium/src/WebIntentServiceInfo.cpp	                        (rev 0)
+++ trunk/Source/WebKit/chromium/src/WebIntentServiceInfo.cpp	2011-11-24 07:46:06 UTC (rev 101123)
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+#include "config.h"
+#include "WebIntentServiceInfo.h"
+
+namespace WebKit {
+
+WebIntentServiceInfo::WebIntentServiceInfo() { }
+
+WebURL WebIntentServiceInfo::url() const
+{
+    return m_href;
+}
+
+void WebIntentServiceInfo::setURL(const WebURL& url)
+{
+    m_href = url;
+}
+
+WebString WebIntentServiceInfo::title() const
+{
+    return m_title;
+}
+
+void WebIntentServiceInfo::setTitle(const WebString& title)
+{
+    m_title = title;
+}
+
+WebString WebIntentServiceInfo::action() const
+{
+    return m_action;
+}
+
+void WebIntentServiceInfo::setAction(const WebString& action)
+{
+    m_action = action;
+}
+
+WebString WebIntentServiceInfo::type() const
+{
+    return m_type;
+}
+
+void WebIntentServiceInfo::setType(const WebString& type)
+{
+    m_type = type;
+}
+
+WebString WebIntentServiceInfo::disposition() const
+{
+    return m_disposition;
+}
+
+void WebIntentServiceInfo::setDisposition(const WebString& disposition)
+{
+    m_disposition = disposition;
+}
+
+} // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to