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

Side by Side 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 linking errors Created 6 years, 6 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 #include "core/page/PrintContext.h" 125 #include "core/page/PrintContext.h"
126 #include "core/rendering/HitTestResult.h" 126 #include "core/rendering/HitTestResult.h"
127 #include "core/rendering/RenderBox.h" 127 #include "core/rendering/RenderBox.h"
128 #include "core/rendering/RenderFrame.h" 128 #include "core/rendering/RenderFrame.h"
129 #include "core/rendering/RenderLayer.h" 129 #include "core/rendering/RenderLayer.h"
130 #include "core/rendering/RenderObject.h" 130 #include "core/rendering/RenderObject.h"
131 #include "core/rendering/RenderTreeAsText.h" 131 #include "core/rendering/RenderTreeAsText.h"
132 #include "core/rendering/RenderView.h" 132 #include "core/rendering/RenderView.h"
133 #include "core/rendering/style/StyleInheritedData.h" 133 #include "core/rendering/style/StyleInheritedData.h"
134 #include "core/timing/Performance.h" 134 #include "core/timing/Performance.h"
135 #include "modules/geolocation/GeolocationController.h"
135 #include "modules/notifications/NotificationController.h" 136 #include "modules/notifications/NotificationController.h"
136 #include "platform/TraceEvent.h" 137 #include "platform/TraceEvent.h"
137 #include "platform/UserGestureIndicator.h" 138 #include "platform/UserGestureIndicator.h"
138 #include "platform/clipboard/ClipboardUtilities.h" 139 #include "platform/clipboard/ClipboardUtilities.h"
139 #include "platform/fonts/FontCache.h" 140 #include "platform/fonts/FontCache.h"
140 #include "platform/graphics/GraphicsContext.h" 141 #include "platform/graphics/GraphicsContext.h"
141 #include "platform/graphics/GraphicsLayerClient.h" 142 #include "platform/graphics/GraphicsLayerClient.h"
142 #include "platform/graphics/skia/SkiaUtils.h" 143 #include "platform/graphics/skia/SkiaUtils.h"
143 #include "platform/heap/Handle.h" 144 #include "platform/heap/Handle.h"
144 #include "platform/network/ResourceRequest.h" 145 #include "platform/network/ResourceRequest.h"
(...skipping 26 matching lines...) Expand all
171 #include "public/web/WebPlugin.h" 172 #include "public/web/WebPlugin.h"
172 #include "public/web/WebPrintParams.h" 173 #include "public/web/WebPrintParams.h"
173 #include "public/web/WebRange.h" 174 #include "public/web/WebRange.h"
174 #include "public/web/WebScriptSource.h" 175 #include "public/web/WebScriptSource.h"
175 #include "public/web/WebSecurityOrigin.h" 176 #include "public/web/WebSecurityOrigin.h"
176 #include "public/web/WebSerializedScriptValue.h" 177 #include "public/web/WebSerializedScriptValue.h"
177 #include "web/AssociatedURLLoader.h" 178 #include "web/AssociatedURLLoader.h"
178 #include "web/CompositionUnderlineVectorBuilder.h" 179 #include "web/CompositionUnderlineVectorBuilder.h"
179 #include "web/EventListenerWrapper.h" 180 #include "web/EventListenerWrapper.h"
180 #include "web/FindInPageCoordinates.h" 181 #include "web/FindInPageCoordinates.h"
182 #include "web/GeolocationClientProxy.h"
181 #include "web/PageOverlay.h" 183 #include "web/PageOverlay.h"
182 #include "web/SharedWorkerRepositoryClientImpl.h" 184 #include "web/SharedWorkerRepositoryClientImpl.h"
183 #include "web/TextFinder.h" 185 #include "web/TextFinder.h"
184 #include "web/WebDataSourceImpl.h" 186 #include "web/WebDataSourceImpl.h"
185 #include "web/WebDevToolsAgentPrivate.h" 187 #include "web/WebDevToolsAgentPrivate.h"
186 #include "web/WebPluginContainerImpl.h" 188 #include "web/WebPluginContainerImpl.h"
187 #include "web/WebViewImpl.h" 189 #include "web/WebViewImpl.h"
188 #include "wtf/CurrentTime.h" 190 #include "wtf/CurrentTime.h"
189 #include "wtf/HashMap.h" 191 #include "wtf/HashMap.h"
190 #include <algorithm> 192 #include <algorithm>
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 { 1580 {
1579 return adoptRef(new WebLocalFrameImpl(client)).leakRef(); 1581 return adoptRef(new WebLocalFrameImpl(client)).leakRef();
1580 } 1582 }
1581 1583
1582 WebLocalFrameImpl::WebLocalFrameImpl(WebFrameClient* client) 1584 WebLocalFrameImpl::WebLocalFrameImpl(WebFrameClient* client)
1583 : m_frameLoaderClientImpl(this) 1585 : m_frameLoaderClientImpl(this)
1584 , m_client(client) 1586 , m_client(client)
1585 , m_permissionClient(0) 1587 , m_permissionClient(0)
1586 , m_inputEventsScaleFactorForEmulation(1) 1588 , m_inputEventsScaleFactorForEmulation(1)
1587 , m_userMediaClientImpl(this) 1589 , m_userMediaClientImpl(this)
1590 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie nt->geolocationClient() : 0)))
1588 { 1591 {
1589 blink::Platform::current()->incrementStatsCounter(webFrameActiveCount); 1592 blink::Platform::current()->incrementStatsCounter(webFrameActiveCount);
1590 frameCount++; 1593 frameCount++;
1591 } 1594 }
1592 1595
1593 WebLocalFrameImpl::~WebLocalFrameImpl() 1596 WebLocalFrameImpl::~WebLocalFrameImpl()
1594 { 1597 {
1595 blink::Platform::current()->decrementStatsCounter(webFrameActiveCount); 1598 blink::Platform::current()->decrementStatsCounter(webFrameActiveCount);
1596 frameCount--; 1599 frameCount--;
1597 1600
1598 cancelPendingScopingEffort(); 1601 cancelPendingScopingEffort();
1599 } 1602 }
1600 1603
1601 void WebLocalFrameImpl::setWebCoreFrame(PassRefPtr<WebCore::LocalFrame> frame) 1604 void WebLocalFrameImpl::setWebCoreFrame(PassRefPtr<WebCore::LocalFrame> frame)
1602 { 1605 {
1603 m_frame = frame; 1606 m_frame = frame;
1604 1607
1605 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used. 1608 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used.
1606 if (m_frame) { 1609 if (m_frame) {
1607 OwnPtr<NotificationPresenterImpl> notificationPresenter = adoptPtr(new N otificationPresenterImpl()); 1610 OwnPtr<NotificationPresenterImpl> notificationPresenter = adoptPtr(new N otificationPresenterImpl());
1608 if (m_client) 1611 if (m_client)
1609 notificationPresenter->initialize(m_client->notificationPresenter()) ; 1612 notificationPresenter->initialize(m_client->notificationPresenter()) ;
1610 1613
1611 provideNotification(*m_frame, notificationPresenter.release()); 1614 provideNotification(*m_frame, notificationPresenter.release());
1612 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); 1615 provideUserMediaTo(*m_frame, &m_userMediaClientImpl);
1616 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get());
1617 m_geolocationClientProxy->setController(GeolocationController::from(m_fr ame.get()));
1613 } 1618 }
1614 } 1619 }
1615 1620
1616 void WebLocalFrameImpl::initializeAsMainFrame(WebCore::Page* page) 1621 void WebLocalFrameImpl::initializeAsMainFrame(WebCore::Page* page)
1617 { 1622 {
1618 setWebCoreFrame(LocalFrame::create(&m_frameLoaderClientImpl, &page->frameHos t(), 0)); 1623 setWebCoreFrame(LocalFrame::create(&m_frameLoaderClientImpl, &page->frameHos t(), 0));
1619 1624
1620 // We must call init() after m_frame is assigned because it is referenced 1625 // We must call init() after m_frame is assigned because it is referenced
1621 // during init(). 1626 // during init().
1622 m_frame->init(); 1627 m_frame->init();
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 1917
1913 void WebLocalFrameImpl::invalidateAll() const 1918 void WebLocalFrameImpl::invalidateAll() const
1914 { 1919 {
1915 ASSERT(frame() && frame()->view()); 1920 ASSERT(frame() && frame()->view());
1916 FrameView* view = frame()->view(); 1921 FrameView* view = frame()->view();
1917 view->invalidateRect(view->frameRect()); 1922 view->invalidateRect(view->frameRect());
1918 invalidateScrollbar(); 1923 invalidateScrollbar();
1919 } 1924 }
1920 1925
1921 } // namespace blink 1926 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698