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/WebPageSerializerClient.h" | 38 #include "third_party/WebKit/public/web/WebPageSerializerClient.h" |
38 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" | 39 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" |
39 #include "ui/gfx/range/range.h" | 40 #include "ui/gfx/range/range.h" |
40 | 41 |
41 #if defined(ENABLE_PLUGINS) | 42 #if defined(ENABLE_PLUGINS) |
42 #include "content/renderer/pepper/plugin_power_saver_helper.h" | 43 #include "content/renderer/pepper/plugin_power_saver_helper.h" |
43 #endif | 44 #endif |
44 | 45 |
45 #if defined(OS_ANDROID) | 46 #if defined(OS_ANDROID) |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // the frame tree after the frame identified by | 145 // the frame tree after the frame identified by |
145 // |previous_sibling_routing_id|, or as the first child if | 146 // |previous_sibling_routing_id|, or as the first child if |
146 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is | 147 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is |
147 // semi-orphaned until it commits, at which point it replaces the proxy | 148 // semi-orphaned until it commits, at which point it replaces the proxy |
148 // identified by |proxy_routing_id|. The frame's opener is set to the frame | 149 // identified by |proxy_routing_id|. The frame's opener is set to the frame |
149 // identified by |opener_routing_id|. The frame is created as a child of the | 150 // identified by |opener_routing_id|. The frame is created as a child of the |
150 // RenderFrame identified by |parent_routing_id| or as the top-level frame if | 151 // RenderFrame identified by |parent_routing_id| or as the top-level frame if |
151 // the latter is MSG_ROUTING_NONE. Note: This is called only when | 152 // the latter is MSG_ROUTING_NONE. Note: This is called only when |
152 // RenderFrame is being created in response to IPC message from the browser | 153 // RenderFrame is being created in response to IPC message from the browser |
153 // process. All other frame creation is driven through Blink and Create. | 154 // process. All other frame creation is driven through Blink and Create. |
154 static void CreateFrame(int routing_id, | 155 static void CreateFrame( |
155 int proxy_routing_id, | 156 int routing_id, |
156 int opener_routing_id, | 157 int proxy_routing_id, |
157 int parent_routing_id, | 158 int opener_routing_id, |
158 int previous_sibling_routing_id, | 159 int parent_routing_id, |
159 const FrameReplicationState& replicated_state, | 160 int previous_sibling_routing_id, |
160 CompositorDependencies* compositor_deps, | 161 const FrameReplicationState& replicated_state, |
161 const FrameMsg_NewFrame_WidgetParams& params); | 162 CompositorDependencies* compositor_deps, |
| 163 const FrameMsg_NewFrame_WidgetParams& params, |
| 164 const blink::WebFrameOwnerProperties& frameOwner_properties); |
162 | 165 |
163 // Returns the RenderFrameImpl for the given routing ID. | 166 // Returns the RenderFrameImpl for the given routing ID. |
164 static RenderFrameImpl* FromRoutingID(int routing_id); | 167 static RenderFrameImpl* FromRoutingID(int routing_id); |
165 | 168 |
166 // Just like RenderFrame::FromWebFrame but returns the implementation. | 169 // Just like RenderFrame::FromWebFrame but returns the implementation. |
167 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); | 170 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); |
168 | 171 |
169 // Used by content_layouttest_support to hook into the creation of | 172 // Used by content_layouttest_support to hook into the creation of |
170 // RenderFrameImpls. | 173 // RenderFrameImpls. |
171 struct CreateParams { | 174 struct CreateParams { |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 const blink::WebPopupMenuInfo& popup_menu_info, | 396 const blink::WebPopupMenuInfo& popup_menu_info, |
394 blink::WebExternalPopupMenuClient* popup_menu_client) override; | 397 blink::WebExternalPopupMenuClient* popup_menu_client) override; |
395 blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame) override; | 398 blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame) override; |
396 blink::WebServiceWorkerProvider* createServiceWorkerProvider( | 399 blink::WebServiceWorkerProvider* createServiceWorkerProvider( |
397 blink::WebLocalFrame* frame) override; | 400 blink::WebLocalFrame* frame) override; |
398 void didAccessInitialDocument(blink::WebLocalFrame* frame) override; | 401 void didAccessInitialDocument(blink::WebLocalFrame* frame) override; |
399 blink::WebFrame* createChildFrame( | 402 blink::WebFrame* createChildFrame( |
400 blink::WebLocalFrame* parent, | 403 blink::WebLocalFrame* parent, |
401 blink::WebTreeScopeType scope, | 404 blink::WebTreeScopeType scope, |
402 const blink::WebString& name, | 405 const blink::WebString& name, |
403 blink::WebSandboxFlags sandboxFlags) override; | 406 blink::WebSandboxFlags sandboxFlags, |
| 407 const blink::WebFrameOwnerProperties& frameOwnerProperties) override; |
404 void didChangeOpener(blink::WebFrame* frame) override; | 408 void didChangeOpener(blink::WebFrame* frame) override; |
405 void frameDetached(blink::WebFrame* frame, DetachType type) override; | 409 void frameDetached(blink::WebFrame* frame, DetachType type) override; |
406 void frameFocused() override; | 410 void frameFocused() override; |
407 void willClose(blink::WebFrame* frame) override; | 411 void willClose(blink::WebFrame* frame) override; |
408 void didChangeName(blink::WebLocalFrame* frame, | 412 void didChangeName(blink::WebLocalFrame* frame, |
409 const blink::WebString& name) override; | 413 const blink::WebString& name) override; |
410 void didChangeSandboxFlags(blink::WebFrame* child_frame, | 414 void didChangeSandboxFlags(blink::WebFrame* child_frame, |
411 blink::WebSandboxFlags flags) override; | 415 blink::WebSandboxFlags flags) override; |
| 416 virtual void didChangeFrameOwnerProperties( |
| 417 blink::WebFrame* child_frame, |
| 418 const blink::WebFrameOwnerProperties& frame_owner_properties) override; |
412 void didMatchCSS( | 419 void didMatchCSS( |
413 blink::WebLocalFrame* frame, | 420 blink::WebLocalFrame* frame, |
414 const blink::WebVector<blink::WebString>& newly_matching_selectors, | 421 const blink::WebVector<blink::WebString>& newly_matching_selectors, |
415 const blink::WebVector<blink::WebString>& stopped_matching_selectors) | 422 const blink::WebVector<blink::WebString>& stopped_matching_selectors) |
416 override; | 423 override; |
417 bool shouldReportDetailedMessageForSource( | 424 bool shouldReportDetailedMessageForSource( |
418 const blink::WebString& source) override; | 425 const blink::WebString& source) override; |
419 void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 426 void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
420 const blink::WebString& source_name, | 427 const blink::WebString& source_name, |
421 unsigned source_line, | 428 unsigned source_line, |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 int start, int end, | 713 int start, int end, |
707 const std::vector<blink::WebCompositionUnderline>& underlines); | 714 const std::vector<blink::WebCompositionUnderline>& underlines); |
708 void OnExecuteNoValueEditCommand(const std::string& name); | 715 void OnExecuteNoValueEditCommand(const std::string& name); |
709 void OnExtendSelectionAndDelete(int before, int after); | 716 void OnExtendSelectionAndDelete(int before, int after); |
710 void OnReload(bool ignore_cache); | 717 void OnReload(bool ignore_cache); |
711 void OnTextSurroundingSelectionRequest(size_t max_length); | 718 void OnTextSurroundingSelectionRequest(size_t max_length); |
712 void OnSetAccessibilityMode(AccessibilityMode new_mode); | 719 void OnSetAccessibilityMode(AccessibilityMode new_mode); |
713 void OnSnapshotAccessibilityTree(int callback_id); | 720 void OnSnapshotAccessibilityTree(int callback_id); |
714 void OnUpdateOpener(int opener_routing_id); | 721 void OnUpdateOpener(int opener_routing_id); |
715 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags); | 722 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags); |
| 723 void OnSetFrameOwnerProperties( |
| 724 const blink::WebFrameOwnerProperties& frame_owner_properties); |
716 void OnClearFocus(); | 725 void OnClearFocus(); |
717 void OnTextTrackSettingsChanged( | 726 void OnTextTrackSettingsChanged( |
718 const FrameMsg_TextTrackSettings_Params& params); | 727 const FrameMsg_TextTrackSettings_Params& params); |
719 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params); | 728 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params); |
720 #if defined(OS_ANDROID) | 729 #if defined(OS_ANDROID) |
721 void OnSelectPopupMenuItems(bool canceled, | 730 void OnSelectPopupMenuItems(bool canceled, |
722 const std::vector<int>& selected_indices); | 731 const std::vector<int>& selected_indices); |
723 #elif defined(OS_MACOSX) | 732 #elif defined(OS_MACOSX) |
724 void OnSelectPopupMenuItem(int selected_index); | 733 void OnSelectPopupMenuItem(int selected_index); |
725 void OnCopyToFindPboard(); | 734 void OnCopyToFindPboard(); |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 #endif | 1075 #endif |
1067 | 1076 |
1068 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1077 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
1069 | 1078 |
1070 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1079 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
1071 }; | 1080 }; |
1072 | 1081 |
1073 } // namespace content | 1082 } // namespace content |
1074 | 1083 |
1075 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1084 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |