Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1417)

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 256843004: Get the WebGeolocationClient from WebFrameClient instead of WebViewClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix layouttest, fix webkit_unit_tests crash, remove obsolete layout test Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index e9cd610cc75d86b134db6dc57df9d4b93e15d515..4d5702d0c9f41e854cfed748bd93fd7ada8f516d 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -132,6 +132,7 @@
#include "core/rendering/RenderView.h"
#include "core/rendering/style/StyleInheritedData.h"
#include "core/timing/Performance.h"
+#include "modules/geolocation/GeolocationController.h"
#include "modules/notifications/NotificationController.h"
#include "platform/TraceEvent.h"
#include "platform/UserGestureIndicator.h"
@@ -178,6 +179,7 @@
#include "web/CompositionUnderlineVectorBuilder.h"
#include "web/EventListenerWrapper.h"
#include "web/FindInPageCoordinates.h"
+#include "web/GeolocationClientProxy.h"
#include "web/PageOverlay.h"
#include "web/SharedWorkerRepositoryClientImpl.h"
#include "web/TextFinder.h"
@@ -1653,6 +1655,7 @@ WebLocalFrameImpl::WebLocalFrameImpl(WebFrameClient* client)
, m_permissionClient(0)
, m_inputEventsScaleFactorForEmulation(1)
, m_userMediaClientImpl(this)
+ , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? client->geolocationClient() : 0)))
{
blink::Platform::current()->incrementStatsCounter(webFrameActiveCount);
frameCount++;
@@ -1678,6 +1681,8 @@ void WebLocalFrameImpl::setWebCoreFrame(PassRefPtr<WebCore::LocalFrame> frame)
if (m_frame) {
provideNotification(*m_frame, notificationPresenterImpl());
provideUserMediaTo(*m_frame, &m_userMediaClientImpl);
+ provideGeolocationTo(*m_frame, m_geolocationClientProxy.get());
+ m_geolocationClientProxy->setController(GeolocationController::from(m_frame.get()));
}
}

Powered by Google App Engine
This is Rietveld 408576698