OLD | NEW |
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 Loading... |
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 Loading... |
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 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 , m_parent(0) | 1648 , m_parent(0) |
1647 , m_previousSibling(0) | 1649 , m_previousSibling(0) |
1648 , m_nextSibling(0) | 1650 , m_nextSibling(0) |
1649 , m_firstChild(0) | 1651 , m_firstChild(0) |
1650 , m_lastChild(0) | 1652 , m_lastChild(0) |
1651 , m_opener(0) | 1653 , m_opener(0) |
1652 , m_client(client) | 1654 , m_client(client) |
1653 , m_permissionClient(0) | 1655 , m_permissionClient(0) |
1654 , m_inputEventsScaleFactorForEmulation(1) | 1656 , m_inputEventsScaleFactorForEmulation(1) |
1655 , m_userMediaClientImpl(this) | 1657 , m_userMediaClientImpl(this) |
| 1658 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie
nt->geolocationClient() : 0))) |
1656 { | 1659 { |
1657 blink::Platform::current()->incrementStatsCounter(webFrameActiveCount); | 1660 blink::Platform::current()->incrementStatsCounter(webFrameActiveCount); |
1658 frameCount++; | 1661 frameCount++; |
1659 } | 1662 } |
1660 | 1663 |
1661 WebLocalFrameImpl::~WebLocalFrameImpl() | 1664 WebLocalFrameImpl::~WebLocalFrameImpl() |
1662 { | 1665 { |
1663 HashSet<WebLocalFrameImpl*>::iterator end = m_openedFrames.end(); | 1666 HashSet<WebLocalFrameImpl*>::iterator end = m_openedFrames.end(); |
1664 for (HashSet<WebLocalFrameImpl*>::iterator it = m_openedFrames.begin(); it !
= end; ++it) | 1667 for (HashSet<WebLocalFrameImpl*>::iterator it = m_openedFrames.begin(); it !
= end; ++it) |
1665 (*it)->m_opener = 0; | 1668 (*it)->m_opener = 0; |
1666 | 1669 |
1667 blink::Platform::current()->decrementStatsCounter(webFrameActiveCount); | 1670 blink::Platform::current()->decrementStatsCounter(webFrameActiveCount); |
1668 frameCount--; | 1671 frameCount--; |
1669 | 1672 |
1670 cancelPendingScopingEffort(); | 1673 cancelPendingScopingEffort(); |
1671 } | 1674 } |
1672 | 1675 |
1673 void WebLocalFrameImpl::setWebCoreFrame(PassRefPtr<WebCore::LocalFrame> frame) | 1676 void WebLocalFrameImpl::setWebCoreFrame(PassRefPtr<WebCore::LocalFrame> frame) |
1674 { | 1677 { |
1675 m_frame = frame; | 1678 m_frame = frame; |
1676 | 1679 |
1677 // FIXME: we shouldn't add overhead to every frame by registering these obje
cts when they're not used. | 1680 // FIXME: we shouldn't add overhead to every frame by registering these obje
cts when they're not used. |
1678 if (m_frame) { | 1681 if (m_frame) { |
1679 provideNotification(*m_frame, notificationPresenterImpl()); | 1682 provideNotification(*m_frame, notificationPresenterImpl()); |
1680 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); | 1683 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); |
| 1684 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get()); |
| 1685 m_geolocationClientProxy->setController(GeolocationController::from(m_fr
ame.get())); |
1681 } | 1686 } |
1682 } | 1687 } |
1683 | 1688 |
1684 void WebLocalFrameImpl::initializeAsMainFrame(WebCore::Page* page) | 1689 void WebLocalFrameImpl::initializeAsMainFrame(WebCore::Page* page) |
1685 { | 1690 { |
1686 setWebCoreFrame(LocalFrame::create(&m_frameLoaderClientImpl, &page->frameHos
t(), 0)); | 1691 setWebCoreFrame(LocalFrame::create(&m_frameLoaderClientImpl, &page->frameHos
t(), 0)); |
1687 | 1692 |
1688 // We must call init() after m_frame is assigned because it is referenced | 1693 // We must call init() after m_frame is assigned because it is referenced |
1689 // during init(). | 1694 // during init(). |
1690 m_frame->init(); | 1695 m_frame->init(); |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1980 | 1985 |
1981 void WebLocalFrameImpl::invalidateAll() const | 1986 void WebLocalFrameImpl::invalidateAll() const |
1982 { | 1987 { |
1983 ASSERT(frame() && frame()->view()); | 1988 ASSERT(frame() && frame()->view()); |
1984 FrameView* view = frame()->view(); | 1989 FrameView* view = frame()->view(); |
1985 view->invalidateRect(view->frameRect()); | 1990 view->invalidateRect(view->frameRect()); |
1986 invalidateScrollbar(); | 1991 invalidateScrollbar(); |
1987 } | 1992 } |
1988 | 1993 |
1989 } // namespace blink | 1994 } // namespace blink |
OLD | NEW |