Title: [107536] trunk/Source/WebCore
Revision
107536
Author
[email protected]
Date
2012-02-12 23:03:16 -0800 (Sun, 12 Feb 2012)

Log Message

Move ENABLE(GAMEPAD) logic out of Navigator.h/cpp
https://bugs.webkit.org/show_bug.cgi?id=78457

Reviewed by Hajime Morita.

This patch moves GAMEPAD-specific logic out of Navigator by introducing
the concept of a NavigatorSupplement, analogous to the recently
introduced PageSupplement.

* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::from):
(WebCore):
(WebCore::NavigatorGamepad::webkitGamepads):
(WebCore::NavigatorGamepad::gamepads):
* Modules/gamepad/NavigatorGamepad.h:
(NavigatorGamepad):
* WebCore.gypi:
* dom/DeviceMotionController.cpp:
(WebCore::DeviceMotionController::supplementName):
* page/Navigator.cpp:
(WebCore::Navigator::provideSupplement):
(WebCore):
(WebCore::Navigator::requireSupplement):
* page/Navigator.h:
(Navigator):
* page/Page.h:
(Page):
* page/PageSupplement.h:
    - This patch cleans up some nits in PageSupplement.
(WebCore):
(PageSupplement):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (107535 => 107536)


--- trunk/Source/WebCore/CMakeLists.txt	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/CMakeLists.txt	2012-02-13 07:03:16 UTC (rev 107536)
@@ -1020,6 +1020,7 @@
     page/MouseEventWithHitTestResults.cpp
     page/Navigator.cpp
     page/NavigatorBase.cpp
+    page/NavigatorSupplement.cpp
     page/OriginAccessEntry.cpp
     page/Page.cpp
     page/PageGroup.cpp

Modified: trunk/Source/WebCore/ChangeLog (107535 => 107536)


--- trunk/Source/WebCore/ChangeLog	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/ChangeLog	2012-02-13 07:03:16 UTC (rev 107536)
@@ -1,3 +1,37 @@
+2012-02-12  Adam Barth  <[email protected]>
+
+        Move ENABLE(GAMEPAD) logic out of Navigator.h/cpp
+        https://bugs.webkit.org/show_bug.cgi?id=78457
+
+        Reviewed by Hajime Morita.
+
+        This patch moves GAMEPAD-specific logic out of Navigator by introducing
+        the concept of a NavigatorSupplement, analogous to the recently
+        introduced PageSupplement.
+
+        * Modules/gamepad/NavigatorGamepad.cpp:
+        (WebCore::NavigatorGamepad::from):
+        (WebCore):
+        (WebCore::NavigatorGamepad::webkitGamepads):
+        (WebCore::NavigatorGamepad::gamepads):
+        * Modules/gamepad/NavigatorGamepad.h:
+        (NavigatorGamepad):
+        * WebCore.gypi:
+        * dom/DeviceMotionController.cpp:
+        (WebCore::DeviceMotionController::supplementName):
+        * page/Navigator.cpp:
+        (WebCore::Navigator::provideSupplement):
+        (WebCore):
+        (WebCore::Navigator::requireSupplement):
+        * page/Navigator.h:
+        (Navigator):
+        * page/Page.h:
+        (Page):
+        * page/PageSupplement.h:
+            - This patch cleans up some nits in PageSupplement.
+        (WebCore):
+        (PageSupplement):
+
 2012-02-12  Kentaro Hara  <[email protected]>
 
         Add a [V8CustomToJSObject] IDL attribute

Modified: trunk/Source/WebCore/GNUmakefile.list.am (107535 => 107536)


--- trunk/Source/WebCore/GNUmakefile.list.am	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2012-02-13 07:03:16 UTC (rev 107536)
@@ -2722,6 +2722,8 @@
 	Source/WebCore/page/Navigator.h \
 	Source/WebCore/page/NavigatorBase.cpp \
 	Source/WebCore/page/NavigatorBase.h \
+	Source/WebCore/page/NavigatorSupplement.cpp \
+	Source/WebCore/page/NavigatorSupplement.h \
 	Source/WebCore/page/OriginAccessEntry.cpp \
 	Source/WebCore/page/OriginAccessEntry.h \
 	Source/WebCore/page/Page.cpp \

Modified: trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp (107535 => 107536)


--- trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp	2012-02-13 07:03:16 UTC (rev 107536)
@@ -28,7 +28,10 @@
 
 #if ENABLE(GAMEPAD)
 
+#include "GamepadList.h"
+#include "Gamepads.h"
 #include "Navigator.h"
+#include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
 
@@ -40,12 +43,30 @@
 {
 }
 
+NavigatorGamepad* NavigatorGamepad::from(Navigator* navigator)
+{
+    DEFINE_STATIC_LOCAL(AtomicString, name, ("NavigatorGamepad"));
+    NavigatorGamepad* supplement = static_cast<NavigatorGamepad*>(NavigatorSupplement::from(navigator, name));
+    if (!supplement) {
+        supplement = new NavigatorGamepad();
+        provideTo(navigator, name, adoptPtr(supplement));
+    }
+    return supplement;
+}
+
 GamepadList* NavigatorGamepad::webkitGamepads(Navigator* navigator)
 {
-    // FIXME: We shouldn't need to direct this call to Navigator.
-    return navigator->gamepads();
+    return NavigatorGamepad::from(navigator)->gamepads();
 }
 
+GamepadList* NavigatorGamepad::gamepads()
+{
+    if (!m_gamepads)
+        m_gamepads = GamepadList::create();
+    sampleGamepads(m_gamepads.get());
+    return m_gamepads.get();
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(GAMEPAD)

Modified: trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.h (107535 => 107536)


--- trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.h	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.h	2012-02-13 07:03:16 UTC (rev 107536)
@@ -28,18 +28,26 @@
 
 #if ENABLE(GAMEPAD)
 
+#include "NavigatorSupplement.h"
+
 namespace WebCore {
 
 class GamepadList;
 class Navigator;
 
-class NavigatorGamepad {
+class NavigatorGamepad : public NavigatorSupplement {
 public:
+    virtual ~NavigatorGamepad();
+    static NavigatorGamepad* from(Navigator*);
+
     static GamepadList* webkitGamepads(Navigator*);
 
+    GamepadList* gamepads();
+
 private:
     NavigatorGamepad();
-    ~NavigatorGamepad();
+
+    RefPtr<GamepadList> m_gamepads;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/Target.pri (107535 => 107536)


--- trunk/Source/WebCore/Target.pri	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/Target.pri	2012-02-13 07:03:16 UTC (rev 107536)
@@ -997,6 +997,7 @@
     page/MouseEventWithHitTestResults.cpp \
     page/Navigator.cpp \
     page/NavigatorBase.cpp \
+    page/NavigatorSupplement.cpp \
     page/OriginAccessEntry.cpp \
     page/Page.cpp \
     page/PageGroup.cpp \

Modified: trunk/Source/WebCore/WebCore.gypi (107535 => 107536)


--- trunk/Source/WebCore/WebCore.gypi	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/WebCore.gypi	2012-02-13 07:03:16 UTC (rev 107536)
@@ -2636,6 +2636,8 @@
             'page/Navigator.h',
             'page/NavigatorBase.cpp',
             'page/NavigatorBase.h',
+            'page/NavigatorSupplement.cpp',
+            'page/NavigatorSupplement.h',
             'page/OriginAccessEntry.cpp',
             'page/OriginAccessEntry.h',
             'page/Page.cpp',

Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (107535 => 107536)


--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-02-13 07:03:16 UTC (rev 107536)
@@ -25522,6 +25522,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\page\NavigatorSupplement.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\page\NavigatorSupplement.h"
+				>
+			</File>
+			<File
 				RelativePath="..\page\OriginAccessEntry.cpp"
 				>
 			</File>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (107535 => 107536)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-02-13 07:03:16 UTC (rev 107536)
@@ -3430,6 +3430,8 @@
 		97C078501165D5BE003A32EF /* SuffixTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 97C0784F1165D5BE003A32EF /* SuffixTree.h */; };
 		97C471DB12F925BD0086354B /* ContentSecurityPolicy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97C471D912F925BC0086354B /* ContentSecurityPolicy.cpp */; };
 		97C471DC12F925BD0086354B /* ContentSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 97C471DA12F925BD0086354B /* ContentSecurityPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		97CC3AE214E8E4A200894988 /* NavigatorSupplement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97CC3AE014E8E4A200894988 /* NavigatorSupplement.cpp */; };
+		97CC3AE314E8E4A200894988 /* NavigatorSupplement.h in Headers */ = {isa = PBXBuildFile; fileRef = 97CC3AE114E8E4A200894988 /* NavigatorSupplement.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		97D2AD0314B823A60093DF32 /* DOMWindowProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97D2AD0114B823A60093DF32 /* DOMWindowProperty.cpp */; };
 		97D2AD0414B823A60093DF32 /* DOMWindowProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 97D2AD0214B823A60093DF32 /* DOMWindowProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		97DCE20110807C750057D394 /* HistoryController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97DCE1FF10807C750057D394 /* HistoryController.cpp */; };
@@ -10280,6 +10282,8 @@
 		97C1F552122855CB00EDE616 /* HTMLToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLToken.h; path = parser/HTMLToken.h; sourceTree = "<group>"; };
 		97C471D912F925BC0086354B /* ContentSecurityPolicy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentSecurityPolicy.cpp; sourceTree = "<group>"; };
 		97C471DA12F925BD0086354B /* ContentSecurityPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentSecurityPolicy.h; sourceTree = "<group>"; };
+		97CC3AE014E8E4A200894988 /* NavigatorSupplement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigatorSupplement.cpp; sourceTree = "<group>"; };
+		97CC3AE114E8E4A200894988 /* NavigatorSupplement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorSupplement.h; sourceTree = "<group>"; };
 		97D2AD0114B823A60093DF32 /* DOMWindowProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowProperty.cpp; sourceTree = "<group>"; };
 		97D2AD0214B823A60093DF32 /* DOMWindowProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindowProperty.h; sourceTree = "<group>"; };
 		97DCE1FF10807C750057D394 /* HistoryController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HistoryController.cpp; sourceTree = "<group>"; };
@@ -15205,6 +15209,8 @@
 				A9C6E65D0D746694006442E9 /* Navigator.idl */,
 				E12719C90EEEC21300F61213 /* NavigatorBase.cpp */,
 				E12719C60EEEC16800F61213 /* NavigatorBase.h */,
+				97CC3AE014E8E4A200894988 /* NavigatorSupplement.cpp */,
+				97CC3AE114E8E4A200894988 /* NavigatorSupplement.h */,
 				00146288103CD1DE000B20DB /* OriginAccessEntry.cpp */,
 				00146289103CD1DE000B20DB /* OriginAccessEntry.h */,
 				65FEA86809833ADE00BED4AB /* Page.cpp */,
@@ -24187,6 +24193,7 @@
 				4A957F0714E241300049DBFB /* WebSocketExtensionDispatcher.h in Headers */,
 				4ADE25FA14E3BB4C004C2213 /* WebSocketExtensionProcessor.h in Headers */,
 				572E92FC14E540580087FFBA /* ShadowRootList.h in Headers */,
+				97CC3AE314E8E4A200894988 /* NavigatorSupplement.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -27128,6 +27135,7 @@
 				7A54881814E432A1006AE05A /* DOMPatchSupport.cpp in Sources */,
 				4A957F0614E2412A0049DBFB /* WebSocketExtensionDispatcher.cpp in Sources */,
 				572E92FB14E540580087FFBA /* ShadowRootList.cpp in Sources */,
+				97CC3AE214E8E4A200894988 /* NavigatorSupplement.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: trunk/Source/WebCore/dom/DeviceMotionController.cpp (107535 => 107536)


--- trunk/Source/WebCore/dom/DeviceMotionController.cpp	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/dom/DeviceMotionController.cpp	2012-02-13 07:03:16 UTC (rev 107536)
@@ -137,7 +137,7 @@
 
 const AtomicString& DeviceMotionController::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("deviceMotion"));
+    DEFINE_STATIC_LOCAL(AtomicString, name, ("DeviceMotionController"));
     return name;
 }
 

Modified: trunk/Source/WebCore/page/Navigator.cpp (107535 => 107536)


--- trunk/Source/WebCore/page/Navigator.cpp	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/page/Navigator.cpp	2012-02-13 07:03:16 UTC (rev 107536)
@@ -45,11 +45,6 @@
 #include <wtf/HashSet.h>
 #include <wtf/StdLibExtras.h>
 
-#if ENABLE(GAMEPAD)
-#include "GamepadList.h"
-#include "Gamepads.h"
-#endif
-
 #if ENABLE(MEDIA_STREAM)
 #include "NavigatorUserMediaErrorCallback.h"
 #include "NavigatorUserMediaSuccessCallback.h"
@@ -67,6 +62,17 @@
 {
 }
 
+void Navigator::provideSupplement(const AtomicString& name, PassOwnPtr<NavigatorSupplement> supplement)
+{
+    ASSERT(!m_suppliments.get(name.impl()));
+    m_suppliments.set(name.impl(), supplement);
+}
+
+NavigatorSupplement* Navigator::requireSupplement(const AtomicString& name)
+{
+    return m_suppliments.get(name.impl());
+}
+
 void Navigator::resetGeolocation()
 {
     if (m_geolocation)
@@ -291,14 +297,4 @@
 }
 #endif
 
-#if ENABLE(GAMEPAD)
-GamepadList* Navigator::gamepads()
-{
-    if (!m_gamepads)
-        m_gamepads = GamepadList::create();
-    sampleGamepads(m_gamepads.get());
-    return m_gamepads.get();
-}
-#endif
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/page/Navigator.h (107535 => 107536)


--- trunk/Source/WebCore/page/Navigator.h	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/page/Navigator.h	2012-02-13 07:03:16 UTC (rev 107536)
@@ -22,7 +22,9 @@
 
 #include "DOMWindowProperty.h"
 #include "NavigatorBase.h"
+#include "NavigatorSupplement.h"
 #include <wtf/Forward.h>
+#include <wtf/HashMap.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
@@ -74,21 +76,18 @@
     virtual void webkitGetUserMedia(const String& options, PassRefPtr<NavigatorUserMediaSuccessCallback>, PassRefPtr<NavigatorUserMediaErrorCallback>, ExceptionCode&);
 #endif
 
-#if ENABLE(GAMEPAD)
-    // FIXME: This method should be in WebCore/Modules/gamepad.
-    GamepadList* gamepads();
-#endif
+    void provideSupplement(const AtomicString&, PassOwnPtr<NavigatorSupplement>);
+    NavigatorSupplement* requireSupplement(const AtomicString&);
 
 private:
     explicit Navigator(Frame*);
 
+    typedef HashMap<AtomicStringImpl*, OwnPtr<NavigatorSupplement> > NavigatorSupplementMap;
+    NavigatorSupplementMap m_suppliments;
+
     mutable RefPtr<DOMPluginArray> m_plugins;
     mutable RefPtr<DOMMimeTypeArray> m_mimeTypes;
     mutable RefPtr<Geolocation> m_geolocation;
-#if ENABLE(GAMEPAD)
-    // FIXME: This state should be in WebCore/Modules/gamepad.
-    mutable RefPtr<GamepadList> m_gamepads;
-#endif
 #if ENABLE(POINTER_LOCK)
     mutable RefPtr<PointerLock> m_pointer;
 #endif

Added: trunk/Source/WebCore/page/NavigatorSupplement.cpp (0 => 107536)


--- trunk/Source/WebCore/page/NavigatorSupplement.cpp	                        (rev 0)
+++ trunk/Source/WebCore/page/NavigatorSupplement.cpp	2012-02-13 07:03:16 UTC (rev 107536)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 "NavigatorSupplement.h"
+
+#include "Navigator.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+NavigatorSupplement::~NavigatorSupplement()
+{
+}
+
+void NavigatorSupplement::provideTo(Navigator* navigator, const AtomicString& key, PassOwnPtr<NavigatorSupplement> supplement)
+{
+    navigator->provideSupplement(key, supplement);
+}
+
+NavigatorSupplement* NavigatorSupplement::from(Navigator* navigator, const AtomicString& name)
+{
+    if (!navigator)
+        return 0;
+    return navigator->requireSupplement(name);
+}
+
+} // namespace WebCore

Added: trunk/Source/WebCore/page/NavigatorSupplement.h (0 => 107536)


--- trunk/Source/WebCore/page/NavigatorSupplement.h	                        (rev 0)
+++ trunk/Source/WebCore/page/NavigatorSupplement.h	2012-02-13 07:03:16 UTC (rev 107536)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2012 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 NavigatorSupplement_h
+#define NavigatorSupplement_h
+
+#include <wtf/Forward.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/text/AtomicString.h>
+
+namespace WebCore {
+
+class Navigator;
+
+class NavigatorSupplement {
+public:
+    virtual ~NavigatorSupplement();
+
+    static void provideTo(Navigator*, const AtomicString&, PassOwnPtr<NavigatorSupplement>);
+    static NavigatorSupplement* from(Navigator*, const AtomicString&);
+};
+
+} // namespace WebCore
+
+#endif // NavigatorSupplement_h

Modified: trunk/Source/WebCore/page/Page.h (107535 => 107536)


--- trunk/Source/WebCore/page/Page.h	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/page/Page.h	2012-02-13 07:03:16 UTC (rev 107536)
@@ -350,7 +350,6 @@
 
     private:
         void initGroup();
-        void notifyDestroyedToSupplements();
 
         typedef HashMap<AtomicStringImpl*, OwnPtr<PageSupplement> > PageSupplementMap;
         PageSupplementMap m_suppliments;

Modified: trunk/Source/WebCore/page/PageSupplement.h (107535 => 107536)


--- trunk/Source/WebCore/page/PageSupplement.h	2012-02-13 07:00:02 UTC (rev 107535)
+++ trunk/Source/WebCore/page/PageSupplement.h	2012-02-13 07:03:16 UTC (rev 107536)
@@ -36,7 +36,6 @@
 class Page;
 class Frame;
 
-
 class PageSupplement {
 public:
     virtual ~PageSupplement();
@@ -44,8 +43,6 @@
     static void provideTo(Page*, const AtomicString&, PassOwnPtr<PageSupplement>);
     static PageSupplement* from(Page*, const AtomicString&);
     static PageSupplement* from(Frame*, const AtomicString&);
-private:
-    OwnPtr<PageSupplement> m_self;
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to