OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "base/process/process_handle.h" | 22 #include "base/process/process_handle.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "content/common/accessibility_mode_enums.h" | 24 #include "content/common/accessibility_mode_enums.h" |
25 #include "content/common/frame_message_enums.h" | 25 #include "content/common/frame_message_enums.h" |
26 #include "content/common/mojo/service_registry_impl.h" | 26 #include "content/common/mojo/service_registry_impl.h" |
27 #include "content/public/common/console_message_level.h" | 27 #include "content/public/common/console_message_level.h" |
28 #include "content/public/common/javascript_message_type.h" | 28 #include "content/public/common/javascript_message_type.h" |
29 #include "content/public/common/referrer.h" | 29 #include "content/public/common/referrer.h" |
30 #include "content/public/common/stop_find_action.h" | 30 #include "content/public/common/stop_find_action.h" |
31 #include "content/public/renderer/render_frame.h" | 31 #include "content/public/renderer/render_frame.h" |
| 32 #include "content/renderer/render_frame_blame_context.h" |
32 #include "content/renderer/render_frame_proxy.h" | 33 #include "content/renderer/render_frame_proxy.h" |
33 #include "content/renderer/renderer_webcookiejar_impl.h" | 34 #include "content/renderer/renderer_webcookiejar_impl.h" |
34 #include "ipc/ipc_message.h" | 35 #include "ipc/ipc_message.h" |
35 #include "ipc/ipc_platform_file.h" | 36 #include "ipc/ipc_platform_file.h" |
36 #include "media/blink/webmediaplayer_delegate.h" | 37 #include "media/blink/webmediaplayer_delegate.h" |
37 #include "media/blink/webmediaplayer_params.h" | 38 #include "media/blink/webmediaplayer_params.h" |
38 #include "mojo/shell/public/interfaces/interface_provider.mojom.h" | 39 #include "mojo/shell/public/interfaces/interface_provider.mojom.h" |
39 #include "mojo/shell/public/interfaces/shell.mojom.h" | 40 #include "mojo/shell/public/interfaces/shell.mojom.h" |
| 41 #include "third_party/WebKit/public/platform/WebBlameContext.h" |
40 #include "third_party/WebKit/public/platform/WebFocusType.h" | 42 #include "third_party/WebKit/public/platform/WebFocusType.h" |
41 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 43 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
42 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" | 44 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" |
43 #include "third_party/WebKit/public/web/WebAXObject.h" | 45 #include "third_party/WebKit/public/web/WebAXObject.h" |
44 #include "third_party/WebKit/public/web/WebDataSource.h" | 46 #include "third_party/WebKit/public/web/WebDataSource.h" |
45 #include "third_party/WebKit/public/web/WebFrameClient.h" | 47 #include "third_party/WebKit/public/web/WebFrameClient.h" |
46 #include "third_party/WebKit/public/web/WebFrameLoadType.h" | 48 #include "third_party/WebKit/public/web/WebFrameLoadType.h" |
47 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" | 49 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
48 #include "third_party/WebKit/public/web/WebFrameSerializerClient.h" | 50 #include "third_party/WebKit/public/web/WebFrameSerializerClient.h" |
49 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" | 51 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 class RendererMediaSessionManager; | 138 class RendererMediaSessionManager; |
137 class RendererPpapiHost; | 139 class RendererPpapiHost; |
138 class RendererSurfaceViewManager; | 140 class RendererSurfaceViewManager; |
139 class RenderFrameObserver; | 141 class RenderFrameObserver; |
140 class RenderViewImpl; | 142 class RenderViewImpl; |
141 class RenderWidget; | 143 class RenderWidget; |
142 class RenderWidgetFullscreenPepper; | 144 class RenderWidgetFullscreenPepper; |
143 class ScreenOrientationDispatcher; | 145 class ScreenOrientationDispatcher; |
144 class UserMediaClientImpl; | 146 class UserMediaClientImpl; |
145 class WakeLockDispatcher; | 147 class WakeLockDispatcher; |
| 148 class WebBlameContextImpl; |
146 struct CommonNavigationParams; | 149 struct CommonNavigationParams; |
147 struct CustomContextMenuContext; | 150 struct CustomContextMenuContext; |
148 struct FrameReplicationState; | 151 struct FrameReplicationState; |
149 struct NavigationParams; | 152 struct NavigationParams; |
150 struct RequestNavigationParams; | 153 struct RequestNavigationParams; |
151 struct ResourceResponseHead; | 154 struct ResourceResponseHead; |
152 struct StartNavigationParams; | 155 struct StartNavigationParams; |
153 struct StreamOverrideParameters; | 156 struct StreamOverrideParameters; |
154 class VRDispatcher; | 157 class VRDispatcher; |
155 | 158 |
156 class CONTENT_EXPORT RenderFrameImpl | 159 class CONTENT_EXPORT RenderFrameImpl |
157 : public RenderFrame, | 160 : public RenderFrame, |
158 NON_EXPORTED_BASE(public blink::WebFrameClient), | 161 NON_EXPORTED_BASE(public blink::WebFrameClient), |
159 NON_EXPORTED_BASE(public blink::WebFrameSerializerClient) { | 162 NON_EXPORTED_BASE(public blink::WebFrameSerializerClient), |
| 163 NON_EXPORTED_BASE( |
| 164 public base::trace_event::TraceLog::EnabledStateObserver) { |
160 public: | 165 public: |
161 // Creates a new RenderFrame as the main frame of |render_view|. | 166 // Creates a new RenderFrame as the main frame of |render_view|. |
162 static RenderFrameImpl* CreateMainFrame( | 167 static RenderFrameImpl* CreateMainFrame( |
163 RenderViewImpl* render_view, | 168 RenderViewImpl* render_view, |
164 int32_t routing_id, | 169 int32_t routing_id, |
165 int32_t widget_routing_id, | 170 int32_t widget_routing_id, |
166 bool hidden, | 171 bool hidden, |
167 const blink::WebScreenInfo& screen_info, | 172 const blink::WebScreenInfo& screen_info, |
168 CompositorDependencies* compositor_deps); | 173 CompositorDependencies* compositor_deps); |
169 | 174 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 blink::WebMediaSession* media_session) override; | 430 blink::WebMediaSession* media_session) override; |
426 blink::WebMediaSession* createMediaSession() override; | 431 blink::WebMediaSession* createMediaSession() override; |
427 blink::WebApplicationCacheHost* createApplicationCacheHost( | 432 blink::WebApplicationCacheHost* createApplicationCacheHost( |
428 blink::WebApplicationCacheHostClient* client) override; | 433 blink::WebApplicationCacheHostClient* client) override; |
429 blink::WebWorkerContentSettingsClientProxy* | 434 blink::WebWorkerContentSettingsClientProxy* |
430 createWorkerContentSettingsClientProxy() override; | 435 createWorkerContentSettingsClientProxy() override; |
431 blink::WebExternalPopupMenu* createExternalPopupMenu( | 436 blink::WebExternalPopupMenu* createExternalPopupMenu( |
432 const blink::WebPopupMenuInfo& popup_menu_info, | 437 const blink::WebPopupMenuInfo& popup_menu_info, |
433 blink::WebExternalPopupMenuClient* popup_menu_client) override; | 438 blink::WebExternalPopupMenuClient* popup_menu_client) override; |
434 blink::WebCookieJar* cookieJar() override; | 439 blink::WebCookieJar* cookieJar() override; |
| 440 blink::WebBlameContext* frameBlameContext() override; |
435 blink::WebServiceWorkerProvider* createServiceWorkerProvider() override; | 441 blink::WebServiceWorkerProvider* createServiceWorkerProvider() override; |
436 void didAccessInitialDocument() override; | 442 void didAccessInitialDocument() override; |
437 blink::WebFrame* createChildFrame( | 443 blink::WebFrame* createChildFrame( |
438 blink::WebLocalFrame* parent, | 444 blink::WebLocalFrame* parent, |
439 blink::WebTreeScopeType scope, | 445 blink::WebTreeScopeType scope, |
440 const blink::WebString& name, | 446 const blink::WebString& name, |
441 const blink::WebString& unique_name, | 447 const blink::WebString& unique_name, |
442 blink::WebSandboxFlags sandbox_flags, | 448 blink::WebSandboxFlags sandbox_flags, |
443 const blink::WebFrameOwnerProperties& frame_owner_properties) override; | 449 const blink::WebFrameOwnerProperties& frame_owner_properties) override; |
444 void didChangeOpener(blink::WebFrame* frame) override; | 450 void didChangeOpener(blink::WebFrame* frame) override; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 #if defined(ENABLE_WEBVR) | 622 #if defined(ENABLE_WEBVR) |
617 blink::WebVRClient* webVRClient() override; | 623 blink::WebVRClient* webVRClient() override; |
618 #endif | 624 #endif |
619 | 625 |
620 // WebFrameSerializerClient implementation: | 626 // WebFrameSerializerClient implementation: |
621 void didSerializeDataForFrame( | 627 void didSerializeDataForFrame( |
622 const blink::WebCString& data, | 628 const blink::WebCString& data, |
623 blink::WebFrameSerializerClient::FrameSerializationStatus status) | 629 blink::WebFrameSerializerClient::FrameSerializationStatus status) |
624 override; | 630 override; |
625 | 631 |
| 632 // base::trace_event::TraceLog::EnabledStateObserver implementation: |
| 633 void OnTraceLogEnabled() override; |
| 634 void OnTraceLogDisabled() override; |
| 635 |
626 // Make this frame show an empty, unscriptable page. | 636 // Make this frame show an empty, unscriptable page. |
627 // TODO(nasko): Remove this method once swapped out state is no longer used. | 637 // TODO(nasko): Remove this method once swapped out state is no longer used. |
628 void NavigateToSwappedOutURL(); | 638 void NavigateToSwappedOutURL(); |
629 | 639 |
630 // Binds this render frame's service registry. | 640 // Binds this render frame's service registry. |
631 void BindServiceRegistry( | 641 void BindServiceRegistry( |
632 mojo::shell::mojom::InterfaceProviderRequest services, | 642 mojo::shell::mojom::InterfaceProviderRequest services, |
633 mojo::shell::mojom::InterfaceProviderPtr exposed_services); | 643 mojo::shell::mojom::InterfaceProviderPtr exposed_services); |
634 | 644 |
635 ManifestManager* manifest_manager(); | 645 ManifestManager* manifest_manager(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 // This is called right after creation with the WebLocalFrame for this | 709 // This is called right after creation with the WebLocalFrame for this |
700 // RenderFrame. It must be called before Initialize. | 710 // RenderFrame. It must be called before Initialize. |
701 void BindToWebFrame(blink::WebLocalFrame* web_frame); | 711 void BindToWebFrame(blink::WebLocalFrame* web_frame); |
702 | 712 |
703 // Functions to add and remove observers for this object. | 713 // Functions to add and remove observers for this object. |
704 void AddObserver(RenderFrameObserver* observer); | 714 void AddObserver(RenderFrameObserver* observer); |
705 void RemoveObserver(RenderFrameObserver* observer); | 715 void RemoveObserver(RenderFrameObserver* observer); |
706 | 716 |
707 bool IsLocalRoot() const; | 717 bool IsLocalRoot() const; |
708 | 718 |
| 719 void TraceSnapshot() const; |
| 720 |
709 // Builds and sends DidCommitProvisionalLoad to the host. | 721 // Builds and sends DidCommitProvisionalLoad to the host. |
710 void SendDidCommitProvisionalLoad(blink::WebFrame* frame, | 722 void SendDidCommitProvisionalLoad(blink::WebFrame* frame, |
711 blink::WebHistoryCommitType commit_type, | 723 blink::WebHistoryCommitType commit_type, |
712 const blink::WebHistoryItem& item); | 724 const blink::WebHistoryItem& item); |
713 | 725 |
714 // IPC message handlers ------------------------------------------------------ | 726 // IPC message handlers ------------------------------------------------------ |
715 // | 727 // |
716 // The documentation for these functions should be in | 728 // The documentation for these functions should be in |
717 // content/common/*_messages.h for the message that the function is handling. | 729 // content/common/*_messages.h for the message that the function is handling. |
718 void OnNavigate(const CommonNavigationParams& common_params, | 730 void OnNavigate(const CommonNavigationParams& common_params, |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 #if defined(ENABLE_WEBVR) | 1213 #if defined(ENABLE_WEBVR) |
1202 // The VR dispatcher attached to the frame, lazily initialized. | 1214 // The VR dispatcher attached to the frame, lazily initialized. |
1203 scoped_ptr<VRDispatcher> vr_dispatcher_; | 1215 scoped_ptr<VRDispatcher> vr_dispatcher_; |
1204 #endif | 1216 #endif |
1205 | 1217 |
1206 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1218 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
1207 // The external popup for the currently showing select popup. | 1219 // The external popup for the currently showing select popup. |
1208 scoped_ptr<ExternalPopupMenu> external_popup_menu_; | 1220 scoped_ptr<ExternalPopupMenu> external_popup_menu_; |
1209 #endif | 1221 #endif |
1210 | 1222 |
| 1223 base::trace_event::TraceScopedTrackableObject< |
| 1224 base::trace_event::TraceID::WithScope> |
| 1225 trace_object_; |
| 1226 |
| 1227 scoped_ptr<RenderFrameBlameContext> blame_context_; |
| 1228 scoped_ptr<WebBlameContextImpl> web_blame_context_; |
| 1229 |
1211 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1230 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
1212 | 1231 |
1213 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1232 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
1214 }; | 1233 }; |
1215 | 1234 |
1216 } // namespace content | 1235 } // namespace content |
1217 | 1236 |
1218 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1237 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |