Title: [108437] trunk/Source
Revision
108437
Author
[email protected]
Date
2012-02-21 19:56:43 -0800 (Tue, 21 Feb 2012)

Log Message

MEDIA_STREAM should be implemented as a PageSupplement.
https://bugs.webkit.org/show_bug.cgi?id=79050

Reviewed by Adam Barth.

Source/WebCore:

Added UserMediaController which implements PageSupplement. This
controller mediates WebCore-to-client communication and lifecycle
management. Then pushed UserMediaController out as a
PageSupplement module.

No new tests. No behavior change.

* WebCore.gypi:
* GNUmakefile.list.am:
* mediastream/NavigatorMediaStream.cpp:
(WebCore::NavigatorMediaStream::webkitGetUserMedia):
* mediastream/UserMediaClient.h:
(WebCore):
* mediastream/UserMediaController.cpp: Added.
(WebCore):
(WebCore::UserMediaController::supplementName):
(WebCore::UserMediaController::UserMediaController):
(WebCore::UserMediaController::~UserMediaController):
(WebCore::UserMediaController::create):
(WebCore::provideUserMediaTo):
* mediastream/UserMediaController.h: Added.
(WebCore):
(UserMediaController):
(WebCore::UserMediaController::client):
(WebCore::UserMediaController::from):
(WebCore::UserMediaController::requestUserMedia):
(WebCore::UserMediaController::cancelUserMediaRequest):
* mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::create):
(WebCore::UserMediaRequest::UserMediaRequest):
(WebCore::UserMediaRequest::didCompleteQuery):
(WebCore::UserMediaRequest::contextDestroyed):
* mediastream/UserMediaRequest.h:
(WebCore):
(UserMediaRequest):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::PageClients::PageClients):
* page/Page.h:
(WebCore):
(PageClients):
(Page):

Source/WebKit/chromium:

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (108436 => 108437)


--- trunk/Source/WebCore/ChangeLog	2012-02-22 03:35:32 UTC (rev 108436)
+++ trunk/Source/WebCore/ChangeLog	2012-02-22 03:56:43 UTC (rev 108437)
@@ -1,3 +1,54 @@
+2012-02-20  MORITA Hajime  <[email protected]>
+
+        MEDIA_STREAM should be implemented as a PageSupplement.
+        https://bugs.webkit.org/show_bug.cgi?id=79050
+
+        Reviewed by Adam Barth.
+
+        Added UserMediaController which implements PageSupplement. This
+        controller mediates WebCore-to-client communication and lifecycle
+        management. Then pushed UserMediaController out as a
+        PageSupplement module.
+
+        No new tests. No behavior change.
+
+        * WebCore.gypi:
+        * GNUmakefile.list.am:
+        * mediastream/NavigatorMediaStream.cpp:
+        (WebCore::NavigatorMediaStream::webkitGetUserMedia):
+        * mediastream/UserMediaClient.h:
+        (WebCore):
+        * mediastream/UserMediaController.cpp: Added.
+        (WebCore):
+        (WebCore::UserMediaController::supplementName):
+        (WebCore::UserMediaController::UserMediaController):
+        (WebCore::UserMediaController::~UserMediaController):
+        (WebCore::UserMediaController::create):
+        (WebCore::provideUserMediaTo):
+        * mediastream/UserMediaController.h: Added.
+        (WebCore):
+        (UserMediaController):
+        (WebCore::UserMediaController::client):
+        (WebCore::UserMediaController::from):
+        (WebCore::UserMediaController::requestUserMedia):
+        (WebCore::UserMediaController::cancelUserMediaRequest):
+        * mediastream/UserMediaRequest.cpp:
+        (WebCore::UserMediaRequest::create):
+        (WebCore::UserMediaRequest::UserMediaRequest):
+        (WebCore::UserMediaRequest::didCompleteQuery):
+        (WebCore::UserMediaRequest::contextDestroyed):
+        * mediastream/UserMediaRequest.h:
+        (WebCore):
+        (UserMediaRequest):
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+        (WebCore::Page::~Page):
+        (WebCore::Page::PageClients::PageClients):
+        * page/Page.h:
+        (WebCore):
+        (PageClients):
+        (Page):
+
 2012-02-21  James Robinson  <[email protected]>
 
         Node::isContentEditable should only update styles, not layout

Modified: trunk/Source/WebCore/GNUmakefile.list.am (108436 => 108437)


--- trunk/Source/WebCore/GNUmakefile.list.am	2012-02-22 03:35:32 UTC (rev 108436)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2012-02-22 03:56:43 UTC (rev 108437)
@@ -2642,6 +2642,8 @@
 	Source/WebCore/mediastream/PeerConnection.h \
 	Source/WebCore/mediastream/SignalingCallback.h \
 	Source/WebCore/mediastream/UserMediaClient.h \
+	Source/WebCore/mediastream/UserMediaController.h \
+	Source/WebCore/mediastream/UserMediaController.cpp \
 	Source/WebCore/mediastream/UserMediaRequest.cpp \
 	Source/WebCore/mediastream/UserMediaRequest.h \
 	Source/WebCore/notifications/NotificationCenter.cpp \

Modified: trunk/Source/WebCore/WebCore.gypi (108436 => 108437)


--- trunk/Source/WebCore/WebCore.gypi	2012-02-22 03:35:32 UTC (rev 108436)
+++ trunk/Source/WebCore/WebCore.gypi	2012-02-22 03:56:43 UTC (rev 108437)
@@ -2589,6 +2589,8 @@
             'mediastream/PeerConnection.h',
             'mediastream/SignalingCallback.h',
             'mediastream/UserMediaClient.h',
+            'mediastream/UserMediaController.h',
+            'mediastream/UserMediaController.cpp',
             'mediastream/UserMediaRequest.cpp',
             'mediastream/UserMediaRequest.h',
             'notifications/Notification.cpp',

Modified: trunk/Source/WebCore/mediastream/NavigatorMediaStream.cpp (108436 => 108437)


--- trunk/Source/WebCore/mediastream/NavigatorMediaStream.cpp	2012-02-22 03:35:32 UTC (rev 108436)
+++ trunk/Source/WebCore/mediastream/NavigatorMediaStream.cpp	2012-02-22 03:56:43 UTC (rev 108437)
@@ -35,6 +35,7 @@
 #include "NavigatorUserMediaErrorCallback.h"
 #include "NavigatorUserMediaSuccessCallback.h"
 #include "Page.h"
+#include "UserMediaController.h"
 #include "UserMediaRequest.h"
 
 namespace WebCore {
@@ -52,15 +53,13 @@
     if (!successCallback)
         return;
 
-    Frame* frame = navigator->frame();
-    if (!frame)
+    UserMediaController* userMedia = UserMediaController::from(navigator->frame());
+    if (!userMedia) {
+        ec = NOT_SUPPORTED_ERR;
         return;
+    }
 
-    Page* page = frame->page();
-    if (!page)
-        return;
-
-    RefPtr<UserMediaRequest> request = UserMediaRequest::create(frame->document(), page->userMediaClient(), options, successCallback, errorCallback);
+    RefPtr<UserMediaRequest> request = UserMediaRequest::create(navigator->frame()->document(), userMedia, options, successCallback, errorCallback);
     if (!request) {
         ec = NOT_SUPPORTED_ERR;
         return;

Modified: trunk/Source/WebCore/mediastream/UserMediaClient.h (108436 => 108437)


--- trunk/Source/WebCore/mediastream/UserMediaClient.h	2012-02-22 03:35:32 UTC (rev 108436)
+++ trunk/Source/WebCore/mediastream/UserMediaClient.h	2012-02-22 03:56:43 UTC (rev 108437)
@@ -38,6 +38,8 @@
 
 namespace WebCore {
 
+class Page;
+
 class UserMediaClient {
 public:
     virtual void pageDestroyed() = 0;
@@ -49,6 +51,8 @@
     virtual ~UserMediaClient() { }
 };
 
+void provideUserMediaTo(Page*, UserMediaClient*);
+
 } // namespace WebCore
 
 #endif // ENABLE(MEDIA_STREAM)

Added: trunk/Source/WebCore/mediastream/UserMediaController.cpp (0 => 108437)


--- trunk/Source/WebCore/mediastream/UserMediaController.cpp	                        (rev 0)
+++ trunk/Source/WebCore/mediastream/UserMediaController.cpp	2012-02-22 03:56:43 UTC (rev 108437)
@@ -0,0 +1,60 @@
+/*
+ * 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:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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 APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "UserMediaController.h"
+
+#if ENABLE(MEDIA_STREAM)
+
+namespace WebCore {
+
+const AtomicString& UserMediaController::supplementName()
+{
+    DEFINE_STATIC_LOCAL(AtomicString, name, ("userMediaController"));
+    return name;
+}
+
+UserMediaController::UserMediaController(UserMediaClient* client)
+    : m_client(client)
+{
+}
+
+UserMediaController::~UserMediaController()
+{
+    m_client->pageDestroyed();
+}
+
+PassOwnPtr<UserMediaController> UserMediaController::create(UserMediaClient* client)
+{
+    return adoptPtr(new UserMediaController(client));
+}
+
+void provideUserMediaTo(Page* page, UserMediaClient* client)
+{
+    PageSupplement::provideTo(page, UserMediaController::supplementName(), UserMediaController::create(client));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
Property changes on: trunk/Source/WebCore/mediastream/UserMediaController.cpp
___________________________________________________________________

Added: svn:eol-style

Added: trunk/Source/WebCore/mediastream/UserMediaController.h (0 => 108437)


--- trunk/Source/WebCore/mediastream/UserMediaController.h	                        (rev 0)
+++ trunk/Source/WebCore/mediastream/UserMediaController.h	2012-02-22 03:56:43 UTC (rev 108437)
@@ -0,0 +1,73 @@
+/*
+ * 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:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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 APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 UserMediaController_h
+#define UserMediaController_h
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "PageSupplement.h"
+#include "UserMediaClient.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+class Frame;
+class Page;
+
+class UserMediaController : public PageSupplement {
+public:
+    ~UserMediaController();
+
+    UserMediaClient* client() const { return m_client; }
+    void requestUserMedia(PassRefPtr<UserMediaRequest>, const MediaStreamSourceVector& audioSources,  const MediaStreamSourceVector& videoSources);
+    void cancelUserMediaRequest(UserMediaRequest*);
+
+    static PassOwnPtr<UserMediaController> create(UserMediaClient*);
+    static const AtomicString& supplementName();
+    static UserMediaController* from(Frame* frame) { return static_cast<UserMediaController*>(PageSupplement::from(frame, supplementName())); }
+    static UserMediaController* from(Page* page) { return static_cast<UserMediaController*>(PageSupplement::from(page, supplementName())); }
+
+protected:
+    UserMediaController(UserMediaClient*);
+
+private:
+    UserMediaClient* m_client;
+};
+
+inline void UserMediaController::requestUserMedia(PassRefPtr<UserMediaRequest> request, const MediaStreamSourceVector& audioSources,  const MediaStreamSourceVector& videoSources)
+{
+    m_client->requestUserMedia(request, audioSources, videoSources);
+}
+
+inline void UserMediaController::cancelUserMediaRequest(UserMediaRequest* request)
+{
+    m_client->cancelUserMediaRequest(request);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // UserMediaController_h
Property changes on: trunk/Source/WebCore/mediastream/UserMediaController.h
___________________________________________________________________

Added: svn:eol-style

Modified: trunk/Source/WebCore/mediastream/UserMediaRequest.cpp (108436 => 108437)


--- trunk/Source/WebCore/mediastream/UserMediaRequest.cpp	2012-02-22 03:35:32 UTC (rev 108436)
+++ trunk/Source/WebCore/mediastream/UserMediaRequest.cpp	2012-02-22 03:56:43 UTC (rev 108437)
@@ -36,26 +36,26 @@
 
 #include "LocalMediaStream.h"
 #include "SpaceSplitString.h"
-#include "UserMediaClient.h"
+#include "UserMediaController.h"
 
 namespace WebCore {
 
-PassRefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaClient* client, const String& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, PassRefPtr<NavigatorUserMediaErrorCallback> errorCallback)
+PassRefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaController* controller, const String& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, PassRefPtr<NavigatorUserMediaErrorCallback> errorCallback)
 {
-    RefPtr<UserMediaRequest> request = adoptRef(new UserMediaRequest(context, client, options, successCallback, errorCallback));
+    RefPtr<UserMediaRequest> request = adoptRef(new UserMediaRequest(context, controller, options, successCallback, errorCallback));
     if (!request->audio() && !request->video())
         return 0;
 
     return request.release();
 }
 
-UserMediaRequest::UserMediaRequest(ScriptExecutionContext* context, UserMediaClient* client, const String& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, PassRefPtr<NavigatorUserMediaErrorCallback> errorCallback)
+UserMediaRequest::UserMediaRequest(ScriptExecutionContext* context, UserMediaController* controller, const String& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, PassRefPtr<NavigatorUserMediaErrorCallback> errorCallback)
     : ContextDestructionObserver(context)
     , m_audio(false)
     , m_video(false)
     , m_cameraPreferenceUser(false)
     , m_cameraPreferenceEnvironment(false)
-    , m_client(client)
+    , m_controller(controller)
     , m_successCallback(successCallback)
     , m_errorCallback(errorCallback)
 {
@@ -73,8 +73,8 @@
 
 void UserMediaRequest::didCompleteQuery(const MediaStreamSourceVector& audioSources, const MediaStreamSourceVector& videoSources)
 {
-    if (m_client)
-        m_client->requestUserMedia(this, audioSources, videoSources);
+    if (m_controller)
+        m_controller->requestUserMedia(this, audioSources, videoSources);
 }
 
 void UserMediaRequest::succeed(const MediaStreamSourceVector& audioSources, const MediaStreamSourceVector& videoSources)
@@ -99,9 +99,9 @@
 
 void UserMediaRequest::contextDestroyed()
 {
-    if (m_client) {
-        m_client->cancelUserMediaRequest(this);
-        m_client = 0;
+    if (m_controller) {
+        m_controller->cancelUserMediaRequest(this);
+        m_controller = 0;
     }
 
     ContextDestructionObserver::contextDestroyed();

Modified: trunk/Source/WebCore/mediastream/UserMediaRequest.h (108436 => 108437)


--- trunk/Source/WebCore/mediastream/UserMediaRequest.h	2012-02-22 03:35:32 UTC (rev 108436)
+++ trunk/Source/WebCore/mediastream/UserMediaRequest.h	2012-02-22 03:56:43 UTC (rev 108437)
@@ -44,11 +44,11 @@
 
 namespace WebCore {
 
-class UserMediaClient;
+class UserMediaController;
 
 class UserMediaRequest : public MediaStreamSourcesQueryClient, public ContextDestructionObserver {
 public:
-    static PassRefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMediaClient*, const String& options, PassRefPtr<NavigatorUserMediaSuccessCallback>, PassRefPtr<NavigatorUserMediaErrorCallback>);
+    static PassRefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMediaController*, const String& options, PassRefPtr<NavigatorUserMediaSuccessCallback>, PassRefPtr<NavigatorUserMediaErrorCallback>);
     ~UserMediaRequest();
 
     NavigatorUserMediaSuccessCallback* successCallback() const { return m_successCallback.get(); }
@@ -70,7 +70,7 @@
     virtual void contextDestroyed();
 
 private:
-    UserMediaRequest(ScriptExecutionContext*, UserMediaClient*, const String& options, PassRefPtr<NavigatorUserMediaSuccessCallback>, PassRefPtr<NavigatorUserMediaErrorCallback>);
+    UserMediaRequest(ScriptExecutionContext*, UserMediaController*, const String& options, PassRefPtr<NavigatorUserMediaSuccessCallback>, PassRefPtr<NavigatorUserMediaErrorCallback>);
 
     void parseOptions(const String& options);
 
@@ -80,7 +80,7 @@
     bool m_cameraPreferenceUser;
     bool m_cameraPreferenceEnvironment;
 
-    UserMediaClient* m_client;
+    UserMediaController* m_controller;
 
     RefPtr<NavigatorUserMediaSuccessCallback> m_successCallback;
     RefPtr<NavigatorUserMediaErrorCallback> m_errorCallback;

Modified: trunk/Source/WebCore/page/Page.cpp (108436 => 108437)


--- trunk/Source/WebCore/page/Page.cpp	2012-02-22 03:35:32 UTC (rev 108436)
+++ trunk/Source/WebCore/page/Page.cpp	2012-02-22 03:56:43 UTC (rev 108437)
@@ -82,10 +82,6 @@
 #include "GeolocationController.h"
 #endif
 
-#if ENABLE(MEDIA_STREAM)
-#include "UserMediaClient.h"
-#endif
-
 namespace WebCore {
 
 static HashSet<Page*>* allPages;
@@ -144,9 +140,6 @@
 #if ENABLE(INPUT_SPEECH)
     , m_speechInputClient(pageClients.speechInputClient)
 #endif
-#if ENABLE(MEDIA_STREAM)
-    , m_userMediaClient(pageClients.userMediaClient)
-#endif
     , m_settings(Settings::create(this))
     , m_progress(ProgressTracker::create())
     , m_backForwardController(BackForwardController::create(this, pageClients.backForwardClient))
@@ -208,11 +201,6 @@
     m_inspectorController->inspectedPageDestroyed();
 #endif
 
-#if ENABLE(MEDIA_STREAM)
-    if (m_userMediaClient)
-        m_userMediaClient->pageDestroyed();
-#endif
-
     if (m_scrollingCoordinator)
         m_scrollingCoordinator->pageDestroyed();
 
@@ -1098,7 +1086,6 @@
     , geolocationClient(0)
     , speechInputClient(0)
     , notificationClient(0)
-    , userMediaClient(0)
 {
 }
 

Modified: trunk/Source/WebCore/page/Page.h (108436 => 108437)


--- trunk/Source/WebCore/page/Page.h	2012-02-22 03:35:32 UTC (rev 108436)
+++ trunk/Source/WebCore/page/Page.h	2012-02-22 03:56:43 UTC (rev 108437)
@@ -85,7 +85,6 @@
     class Settings;
     class SpeechInput;
     class SpeechInputClient;
-    class UserMediaClient;
     class StorageNamespace;
 #if ENABLE(NOTIFICATIONS)
     class NotificationPresenter;
@@ -119,7 +118,6 @@
             RefPtr<BackForwardList> backForwardClient;
             SpeechInputClient* speechInputClient;
             NotificationPresenter* notificationClient;
-            UserMediaClient* userMediaClient;
         };
 
         Page(PageClients&);
@@ -189,9 +187,6 @@
 #if ENABLE(INPUT_SPEECH)
         SpeechInput* speechInput();
 #endif
-#if ENABLE(MEDIA_STREAM)
-        UserMediaClient* userMediaClient() const { return m_userMediaClient; }
-#endif
         ScrollingCoordinator* scrollingCoordinator();
 
         Settings* settings() const { return m_settings.get(); }
@@ -389,9 +384,6 @@
         SpeechInputClient* m_speechInputClient;
         OwnPtr<SpeechInput> m_speechInput;
 #endif
-#if ENABLE(MEDIA_STREAM)
-        UserMediaClient* m_userMediaClient;
-#endif
         RefPtr<ScrollingCoordinator> m_scrollingCoordinator;
 
         OwnPtr<Settings> m_settings;

Modified: trunk/Source/WebKit/chromium/ChangeLog (108436 => 108437)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-02-22 03:35:32 UTC (rev 108436)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-02-22 03:56:43 UTC (rev 108437)
@@ -1,3 +1,13 @@
+2012-02-20  MORITA Hajime  <[email protected]>
+
+        MEDIA_STREAM should be implemented as a PageSupplement.
+        https://bugs.webkit.org/show_bug.cgi?id=79050
+
+        Reviewed by Adam Barth.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::WebViewImpl):
+
 2012-02-21  Dana Jansens  <[email protected]>
 
         [chromium] Painting a layer clears opaque rect in untouched tiles

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (108436 => 108437)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-02-22 03:35:32 UTC (rev 108436)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-02-22 03:56:43 UTC (rev 108437)
@@ -405,11 +405,11 @@
     pageClients.notificationClient = notificationPresenterImpl();
 #endif
     pageClients.backForwardClient = BackForwardListChromium::create(this);
+
+    m_page = adoptPtr(new Page(pageClients));
 #if ENABLE(MEDIA_STREAM)
-    pageClients.userMediaClient = &m_userMediaClientImpl;
+    provideUserMediaTo(m_page.get(), &m_userMediaClientImpl);
 #endif
-
-    m_page = adoptPtr(new Page(pageClients));
     provideDeviceOrientationTo(m_page.get(), m_deviceOrientationClientProxy.get());
     m_geolocationClientProxy->setController(m_page->geolocationController());
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to