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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1367853002: Move GeolocationDispatcher into blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 #include "core/page/FrameTree.h" 149 #include "core/page/FrameTree.h"
150 #include "core/page/Page.h" 150 #include "core/page/Page.h"
151 #include "core/page/PrintContext.h" 151 #include "core/page/PrintContext.h"
152 #include "core/paint/DeprecatedPaintLayer.h" 152 #include "core/paint/DeprecatedPaintLayer.h"
153 #include "core/paint/ScopeRecorder.h" 153 #include "core/paint/ScopeRecorder.h"
154 #include "core/paint/TransformRecorder.h" 154 #include "core/paint/TransformRecorder.h"
155 #include "core/timing/DOMWindowPerformance.h" 155 #include "core/timing/DOMWindowPerformance.h"
156 #include "core/timing/Performance.h" 156 #include "core/timing/Performance.h"
157 #include "modules/app_banner/AppBannerController.h" 157 #include "modules/app_banner/AppBannerController.h"
158 #include "modules/bluetooth/BluetoothSupplement.h" 158 #include "modules/bluetooth/BluetoothSupplement.h"
159 #include "modules/geolocation/GeolocationController.h"
160 #include "modules/notifications/NotificationPermissionClient.h" 159 #include "modules/notifications/NotificationPermissionClient.h"
161 #include "modules/permissions/PermissionController.h" 160 #include "modules/permissions/PermissionController.h"
162 #include "modules/presentation/PresentationController.h" 161 #include "modules/presentation/PresentationController.h"
163 #include "modules/push_messaging/PushController.h" 162 #include "modules/push_messaging/PushController.h"
164 #include "modules/screen_orientation/ScreenOrientationController.h" 163 #include "modules/screen_orientation/ScreenOrientationController.h"
165 #include "modules/vr/VRController.h" 164 #include "modules/vr/VRController.h"
166 #include "modules/wake_lock/ScreenWakeLock.h" 165 #include "modules/wake_lock/ScreenWakeLock.h"
167 #include "modules/webusb/USBController.h" 166 #include "modules/webusb/USBController.h"
168 #include "platform/ScriptForbiddenScope.h" 167 #include "platform/ScriptForbiddenScope.h"
169 #include "platform/TraceEvent.h" 168 #include "platform/TraceEvent.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 #include "public/web/WebPrintPresetOptions.h" 211 #include "public/web/WebPrintPresetOptions.h"
213 #include "public/web/WebRange.h" 212 #include "public/web/WebRange.h"
214 #include "public/web/WebScriptSource.h" 213 #include "public/web/WebScriptSource.h"
215 #include "public/web/WebSerializedScriptValue.h" 214 #include "public/web/WebSerializedScriptValue.h"
216 #include "public/web/WebTestInterfaceFactory.h" 215 #include "public/web/WebTestInterfaceFactory.h"
217 #include "public/web/WebTreeScopeType.h" 216 #include "public/web/WebTreeScopeType.h"
218 #include "skia/ext/platform_device.h" 217 #include "skia/ext/platform_device.h"
219 #include "web/AssociatedURLLoader.h" 218 #include "web/AssociatedURLLoader.h"
220 #include "web/CompositionUnderlineVectorBuilder.h" 219 #include "web/CompositionUnderlineVectorBuilder.h"
221 #include "web/FindInPageCoordinates.h" 220 #include "web/FindInPageCoordinates.h"
222 #include "web/GeolocationClientProxy.h"
223 #include "web/LocalFileSystemClient.h" 221 #include "web/LocalFileSystemClient.h"
224 #include "web/MIDIClientProxy.h" 222 #include "web/MIDIClientProxy.h"
225 #include "web/NavigatorContentUtilsClientImpl.h" 223 #include "web/NavigatorContentUtilsClientImpl.h"
226 #include "web/NotificationPermissionClientImpl.h" 224 #include "web/NotificationPermissionClientImpl.h"
227 #include "web/RemoteBridgeFrameOwner.h" 225 #include "web/RemoteBridgeFrameOwner.h"
228 #include "web/SharedWorkerRepositoryClientImpl.h" 226 #include "web/SharedWorkerRepositoryClientImpl.h"
229 #include "web/SuspendableScriptExecutor.h" 227 #include "web/SuspendableScriptExecutor.h"
230 #include "web/TextFinder.h" 228 #include "web/TextFinder.h"
231 #include "web/WebDataSourceImpl.h" 229 #include "web/WebDataSourceImpl.h"
232 #include "web/WebDevToolsAgentImpl.h" 230 #include "web/WebDevToolsAgentImpl.h"
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 1650
1653 WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli ent) 1651 WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli ent)
1654 : WebLocalFrame(scope) 1652 : WebLocalFrame(scope)
1655 , m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this)) 1653 , m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this))
1656 , m_frameWidget(0) 1654 , m_frameWidget(0)
1657 , m_client(client) 1655 , m_client(client)
1658 , m_autofillClient(0) 1656 , m_autofillClient(0)
1659 , m_contentSettingsClient(0) 1657 , m_contentSettingsClient(0)
1660 , m_inputEventsScaleFactorForEmulation(1) 1658 , m_inputEventsScaleFactorForEmulation(1)
1661 , m_userMediaClientImpl(this) 1659 , m_userMediaClientImpl(this)
1662 , m_geolocationClientProxy(GeolocationClientProxy::create(client ? client->g eolocationClient() : 0))
1663 , m_webDevToolsFrontend(0) 1660 , m_webDevToolsFrontend(0)
1664 #if ENABLE(OILPAN) 1661 #if ENABLE(OILPAN)
1665 , m_selfKeepAlive(this) 1662 , m_selfKeepAlive(this)
1666 #endif 1663 #endif
1667 { 1664 {
1668 Platform::current()->incrementStatsCounter(webFrameActiveCount); 1665 Platform::current()->incrementStatsCounter(webFrameActiveCount);
1669 frameCount++; 1666 frameCount++;
1670 } 1667 }
1671 1668
1672 WebLocalFrameImpl::~WebLocalFrameImpl() 1669 WebLocalFrameImpl::~WebLocalFrameImpl()
1673 { 1670 {
1674 // The widget for the frame, if any, must have already been closed. 1671 // The widget for the frame, if any, must have already been closed.
1675 ASSERT(!m_frameWidget); 1672 ASSERT(!m_frameWidget);
1676 Platform::current()->decrementStatsCounter(webFrameActiveCount); 1673 Platform::current()->decrementStatsCounter(webFrameActiveCount);
1677 frameCount--; 1674 frameCount--;
1678 1675
1679 #if !ENABLE(OILPAN) 1676 #if !ENABLE(OILPAN)
1680 cancelPendingScopingEffort(); 1677 cancelPendingScopingEffort();
1681 #endif 1678 #endif
1682 } 1679 }
1683 1680
1684 #if ENABLE(OILPAN) 1681 #if ENABLE(OILPAN)
1685 DEFINE_TRACE(WebLocalFrameImpl) 1682 DEFINE_TRACE(WebLocalFrameImpl)
1686 { 1683 {
1687 visitor->trace(m_frameLoaderClientImpl); 1684 visitor->trace(m_frameLoaderClientImpl);
1688 visitor->trace(m_frame); 1685 visitor->trace(m_frame);
1689 visitor->trace(m_devToolsAgent); 1686 visitor->trace(m_devToolsAgent);
1690 visitor->trace(m_textFinder); 1687 visitor->trace(m_textFinder);
1691 visitor->trace(m_printContext); 1688 visitor->trace(m_printContext);
1692 visitor->trace(m_geolocationClientProxy);
1693 visitor->template registerWeakMembers<WebFrame, &WebFrame::clearWeakFrames>( this); 1689 visitor->template registerWeakMembers<WebFrame, &WebFrame::clearWeakFrames>( this);
1694 WebFrame::traceFrames(visitor, this); 1690 WebFrame::traceFrames(visitor, this);
1695 } 1691 }
1696 #endif 1692 #endif
1697 1693
1698 void WebLocalFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<LocalFrame> frame) 1694 void WebLocalFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<LocalFrame> frame)
1699 { 1695 {
1700 m_frame = frame; 1696 m_frame = frame;
1701 1697
1702 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used. 1698 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used.
1703 if (m_frame) { 1699 if (m_frame) {
1704 if (m_client) 1700 if (m_client)
1705 providePushControllerTo(*m_frame, m_client->pushClient()); 1701 providePushControllerTo(*m_frame, m_client->pushClient());
1706 1702
1707 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionCl ientImpl::create()); 1703 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionCl ientImpl::create());
1708 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); 1704 provideUserMediaTo(*m_frame, &m_userMediaClientImpl);
1709 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get());
1710 m_geolocationClientProxy->setController(GeolocationController::from(m_fr ame.get()));
1711 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->web MIDIClient() : nullptr)); 1705 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->web MIDIClient() : nullptr));
1712 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); 1706 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
1713 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl ::create(this)); 1707 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl ::create(this));
1714 1708
1715 if (RuntimeEnabledFeatures::webBluetoothEnabled()) 1709 if (RuntimeEnabledFeatures::webBluetoothEnabled())
1716 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->blueto oth() : nullptr); 1710 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->blueto oth() : nullptr);
1717 if (RuntimeEnabledFeatures::screenOrientationEnabled()) 1711 if (RuntimeEnabledFeatures::screenOrientationEnabled())
1718 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : nullptr); 1712 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : nullptr);
1719 if (RuntimeEnabledFeatures::presentationEnabled()) 1713 if (RuntimeEnabledFeatures::presentationEnabled())
1720 PresentationController::provideTo(*m_frame, m_client ? m_client->pre sentationClient() : nullptr); 1714 PresentationController::provideTo(*m_frame, m_client ? m_client->pre sentationClient() : nullptr);
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
2191 } 2185 }
2192 2186
2193 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const 2187 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const
2194 { 2188 {
2195 if (!frame()) 2189 if (!frame())
2196 return WebSandboxFlags::None; 2190 return WebSandboxFlags::None;
2197 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2191 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2198 } 2192 }
2199 2193
2200 } // namespace blink 2194 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698