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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "content/renderer/renderer_webcookiejar_impl.h" | 26 #include "content/renderer/renderer_webcookiejar_impl.h" |
27 #include "ipc/ipc_message.h" | 27 #include "ipc/ipc_message.h" |
28 #include "media/blink/webmediaplayer_delegate.h" | 28 #include "media/blink/webmediaplayer_delegate.h" |
29 #include "media/blink/webmediaplayer_params.h" | 29 #include "media/blink/webmediaplayer_params.h" |
30 #include "mojo/application/public/interfaces/service_provider.mojom.h" | 30 #include "mojo/application/public/interfaces/service_provider.mojom.h" |
31 #include "mojo/application/public/interfaces/shell.mojom.h" | 31 #include "mojo/application/public/interfaces/shell.mojom.h" |
32 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" | 32 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" |
33 #include "third_party/WebKit/public/web/WebAXObject.h" | 33 #include "third_party/WebKit/public/web/WebAXObject.h" |
34 #include "third_party/WebKit/public/web/WebDataSource.h" | 34 #include "third_party/WebKit/public/web/WebDataSource.h" |
35 #include "third_party/WebKit/public/web/WebFrameClient.h" | 35 #include "third_party/WebKit/public/web/WebFrameClient.h" |
| 36 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
36 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" | 37 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
37 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" | 38 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" |
38 #include "ui/gfx/range/range.h" | 39 #include "ui/gfx/range/range.h" |
39 | 40 |
40 #if defined(ENABLE_PLUGINS) | 41 #if defined(ENABLE_PLUGINS) |
41 #include "content/renderer/pepper/plugin_power_saver_helper.h" | 42 #include "content/renderer/pepper/plugin_power_saver_helper.h" |
42 #endif | 43 #endif |
43 | 44 |
44 #if defined(OS_ANDROID) | 45 #if defined(OS_ANDROID) |
45 #include "content/renderer/media/android/renderer_media_player_manager.h" | 46 #include "content/renderer/media/android/renderer_media_player_manager.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // the frame tree after the frame identified by | 143 // the frame tree after the frame identified by |
143 // |previous_sibling_routing_id|, or as the first child if | 144 // |previous_sibling_routing_id|, or as the first child if |
144 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is | 145 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is |
145 // semi-orphaned until it commits, at which point it replaces the proxy | 146 // semi-orphaned until it commits, at which point it replaces the proxy |
146 // identified by |proxy_routing_id|. The frame's opener is set to the frame | 147 // identified by |proxy_routing_id|. The frame's opener is set to the frame |
147 // identified by |opener_routing_id|. The frame is created as a child of the | 148 // identified by |opener_routing_id|. The frame is created as a child of the |
148 // RenderFrame identified by |parent_routing_id| or as the top-level frame if | 149 // RenderFrame identified by |parent_routing_id| or as the top-level frame if |
149 // the latter is MSG_ROUTING_NONE. Note: This is called only when | 150 // the latter is MSG_ROUTING_NONE. Note: This is called only when |
150 // RenderFrame is being created in response to IPC message from the browser | 151 // RenderFrame is being created in response to IPC message from the browser |
151 // process. All other frame creation is driven through Blink and Create. | 152 // process. All other frame creation is driven through Blink and Create. |
152 static void CreateFrame(int routing_id, | 153 static void CreateFrame( |
153 int proxy_routing_id, | 154 int routing_id, |
154 int opener_routing_id, | 155 int proxy_routing_id, |
155 int parent_routing_id, | 156 int opener_routing_id, |
156 int previous_sibling_routing_id, | 157 int parent_routing_id, |
157 const FrameReplicationState& replicated_state, | 158 int previous_sibling_routing_id, |
158 CompositorDependencies* compositor_deps, | 159 const FrameReplicationState& replicated_state, |
159 const FrameMsg_NewFrame_WidgetParams& params); | 160 CompositorDependencies* compositor_deps, |
| 161 const FrameMsg_NewFrame_WidgetParams& params, |
| 162 const blink::WebFrameOwnerProperties& frameOwner_properties); |
160 | 163 |
161 // Returns the RenderFrameImpl for the given routing ID. | 164 // Returns the RenderFrameImpl for the given routing ID. |
162 static RenderFrameImpl* FromRoutingID(int routing_id); | 165 static RenderFrameImpl* FromRoutingID(int routing_id); |
163 | 166 |
164 // Just like RenderFrame::FromWebFrame but returns the implementation. | 167 // Just like RenderFrame::FromWebFrame but returns the implementation. |
165 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); | 168 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); |
166 | 169 |
167 // Used by content_layouttest_support to hook into the creation of | 170 // Used by content_layouttest_support to hook into the creation of |
168 // RenderFrameImpls. | 171 // RenderFrameImpls. |
169 struct CreateParams { | 172 struct CreateParams { |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 const blink::WebPopupMenuInfo& popup_menu_info, | 389 const blink::WebPopupMenuInfo& popup_menu_info, |
387 blink::WebExternalPopupMenuClient* popup_menu_client); | 390 blink::WebExternalPopupMenuClient* popup_menu_client); |
388 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); | 391 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); |
389 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider( | 392 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider( |
390 blink::WebLocalFrame* frame); | 393 blink::WebLocalFrame* frame); |
391 virtual void didAccessInitialDocument(blink::WebLocalFrame* frame); | 394 virtual void didAccessInitialDocument(blink::WebLocalFrame* frame); |
392 virtual blink::WebFrame* createChildFrame( | 395 virtual blink::WebFrame* createChildFrame( |
393 blink::WebLocalFrame* parent, | 396 blink::WebLocalFrame* parent, |
394 blink::WebTreeScopeType scope, | 397 blink::WebTreeScopeType scope, |
395 const blink::WebString& name, | 398 const blink::WebString& name, |
396 blink::WebSandboxFlags sandboxFlags); | 399 blink::WebSandboxFlags sandboxFlags, |
| 400 const blink::WebFrameOwnerProperties& frameOwnerProperties); |
397 virtual void didChangeOpener(blink::WebFrame* frame); | 401 virtual void didChangeOpener(blink::WebFrame* frame); |
398 virtual void frameDetached(blink::WebFrame* frame, DetachType type); | 402 virtual void frameDetached(blink::WebFrame* frame, DetachType type); |
399 virtual void frameFocused(); | 403 virtual void frameFocused(); |
400 virtual void willClose(blink::WebFrame* frame); | 404 virtual void willClose(blink::WebFrame* frame); |
401 virtual void didChangeName(blink::WebLocalFrame* frame, | 405 virtual void didChangeName(blink::WebLocalFrame* frame, |
402 const blink::WebString& name); | 406 const blink::WebString& name); |
403 virtual void didChangeSandboxFlags(blink::WebFrame* child_frame, | 407 virtual void didChangeSandboxFlags(blink::WebFrame* child_frame, |
404 blink::WebSandboxFlags flags); | 408 blink::WebSandboxFlags flags); |
| 409 virtual void didChangeFrameOwnerProperties( |
| 410 blink::WebFrame* child_frame, |
| 411 const blink::WebFrameOwnerProperties& frame_owner_properties); |
405 virtual void didMatchCSS( | 412 virtual void didMatchCSS( |
406 blink::WebLocalFrame* frame, | 413 blink::WebLocalFrame* frame, |
407 const blink::WebVector<blink::WebString>& newly_matching_selectors, | 414 const blink::WebVector<blink::WebString>& newly_matching_selectors, |
408 const blink::WebVector<blink::WebString>& stopped_matching_selectors); | 415 const blink::WebVector<blink::WebString>& stopped_matching_selectors); |
409 virtual bool shouldReportDetailedMessageForSource( | 416 virtual bool shouldReportDetailedMessageForSource( |
410 const blink::WebString& source); | 417 const blink::WebString& source); |
411 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 418 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
412 const blink::WebString& source_name, | 419 const blink::WebString& source_name, |
413 unsigned source_line, | 420 unsigned source_line, |
414 const blink::WebString& stack_trace); | 421 const blink::WebString& stack_trace); |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 int start, int end, | 696 int start, int end, |
690 const std::vector<blink::WebCompositionUnderline>& underlines); | 697 const std::vector<blink::WebCompositionUnderline>& underlines); |
691 void OnExecuteNoValueEditCommand(const std::string& name); | 698 void OnExecuteNoValueEditCommand(const std::string& name); |
692 void OnExtendSelectionAndDelete(int before, int after); | 699 void OnExtendSelectionAndDelete(int before, int after); |
693 void OnReload(bool ignore_cache); | 700 void OnReload(bool ignore_cache); |
694 void OnTextSurroundingSelectionRequest(size_t max_length); | 701 void OnTextSurroundingSelectionRequest(size_t max_length); |
695 void OnSetAccessibilityMode(AccessibilityMode new_mode); | 702 void OnSetAccessibilityMode(AccessibilityMode new_mode); |
696 void OnSnapshotAccessibilityTree(int callback_id); | 703 void OnSnapshotAccessibilityTree(int callback_id); |
697 void OnUpdateOpener(int opener_routing_id); | 704 void OnUpdateOpener(int opener_routing_id); |
698 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags); | 705 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags); |
| 706 void OnSetFrameOwnerProperties( |
| 707 const blink::WebFrameOwnerProperties& frame_owner_properties); |
699 void OnTextTrackSettingsChanged( | 708 void OnTextTrackSettingsChanged( |
700 const FrameMsg_TextTrackSettings_Params& params); | 709 const FrameMsg_TextTrackSettings_Params& params); |
701 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params); | 710 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params); |
702 #if defined(OS_ANDROID) | 711 #if defined(OS_ANDROID) |
703 void OnSelectPopupMenuItems(bool canceled, | 712 void OnSelectPopupMenuItems(bool canceled, |
704 const std::vector<int>& selected_indices); | 713 const std::vector<int>& selected_indices); |
705 #elif defined(OS_MACOSX) | 714 #elif defined(OS_MACOSX) |
706 void OnSelectPopupMenuItem(int selected_index); | 715 void OnSelectPopupMenuItem(int selected_index); |
707 void OnCopyToFindPboard(); | 716 void OnCopyToFindPboard(); |
708 #endif | 717 #endif |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 #endif | 1053 #endif |
1045 | 1054 |
1046 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1055 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
1047 | 1056 |
1048 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1057 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
1049 }; | 1058 }; |
1050 | 1059 |
1051 } // namespace content | 1060 } // namespace content |
1052 | 1061 |
1053 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1062 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |