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/WebMeaningfulLayout.h" | 38 #include "third_party/WebKit/public/web/WebMeaningfulLayout.h" |
38 #include "third_party/WebKit/public/web/WebPageSerializerClient.h" | 39 #include "third_party/WebKit/public/web/WebPageSerializerClient.h" |
39 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" | 40 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" |
40 #include "ui/gfx/range/range.h" | 41 #include "ui/gfx/range/range.h" |
41 | 42 |
42 #if defined(ENABLE_PLUGINS) | 43 #if defined(ENABLE_PLUGINS) |
43 #include "content/renderer/pepper/plugin_power_saver_helper.h" | 44 #include "content/renderer/pepper/plugin_power_saver_helper.h" |
44 #endif | 45 #endif |
45 | 46 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // the frame tree after the frame identified by | 154 // the frame tree after the frame identified by |
154 // |previous_sibling_routing_id|, or as the first child if | 155 // |previous_sibling_routing_id|, or as the first child if |
155 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is | 156 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is |
156 // semi-orphaned until it commits, at which point it replaces the proxy | 157 // semi-orphaned until it commits, at which point it replaces the proxy |
157 // identified by |proxy_routing_id|. The frame's opener is set to the frame | 158 // identified by |proxy_routing_id|. The frame's opener is set to the frame |
158 // identified by |opener_routing_id|. The frame is created as a child of the | 159 // identified by |opener_routing_id|. The frame is created as a child of the |
159 // RenderFrame identified by |parent_routing_id| or as the top-level frame if | 160 // RenderFrame identified by |parent_routing_id| or as the top-level frame if |
160 // the latter is MSG_ROUTING_NONE. Note: This is called only when | 161 // the latter is MSG_ROUTING_NONE. Note: This is called only when |
161 // RenderFrame is being created in response to IPC message from the browser | 162 // RenderFrame is being created in response to IPC message from the browser |
162 // process. All other frame creation is driven through Blink and Create. | 163 // process. All other frame creation is driven through Blink and Create. |
163 static void CreateFrame(int routing_id, | 164 static void CreateFrame( |
164 int proxy_routing_id, | 165 int routing_id, |
165 int opener_routing_id, | 166 int proxy_routing_id, |
166 int parent_routing_id, | 167 int opener_routing_id, |
167 int previous_sibling_routing_id, | 168 int parent_routing_id, |
168 const FrameReplicationState& replicated_state, | 169 int previous_sibling_routing_id, |
169 CompositorDependencies* compositor_deps, | 170 const FrameReplicationState& replicated_state, |
170 const FrameMsg_NewFrame_WidgetParams& params); | 171 CompositorDependencies* compositor_deps, |
| 172 const FrameMsg_NewFrame_WidgetParams& params, |
| 173 const blink::WebFrameOwnerProperties& frameOwner_properties); |
171 | 174 |
172 // Returns the RenderFrameImpl for the given routing ID. | 175 // Returns the RenderFrameImpl for the given routing ID. |
173 static RenderFrameImpl* FromRoutingID(int routing_id); | 176 static RenderFrameImpl* FromRoutingID(int routing_id); |
174 | 177 |
175 // Just like RenderFrame::FromWebFrame but returns the implementation. | 178 // Just like RenderFrame::FromWebFrame but returns the implementation. |
176 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); | 179 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); |
177 | 180 |
178 // Used by content_layouttest_support to hook into the creation of | 181 // Used by content_layouttest_support to hook into the creation of |
179 // RenderFrameImpls. | 182 // RenderFrameImpls. |
180 struct CreateParams { | 183 struct CreateParams { |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 const blink::WebPopupMenuInfo& popup_menu_info, | 410 const blink::WebPopupMenuInfo& popup_menu_info, |
408 blink::WebExternalPopupMenuClient* popup_menu_client) override; | 411 blink::WebExternalPopupMenuClient* popup_menu_client) override; |
409 blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame) override; | 412 blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame) override; |
410 blink::WebServiceWorkerProvider* createServiceWorkerProvider( | 413 blink::WebServiceWorkerProvider* createServiceWorkerProvider( |
411 blink::WebLocalFrame* frame) override; | 414 blink::WebLocalFrame* frame) override; |
412 void didAccessInitialDocument(blink::WebLocalFrame* frame) override; | 415 void didAccessInitialDocument(blink::WebLocalFrame* frame) override; |
413 blink::WebFrame* createChildFrame( | 416 blink::WebFrame* createChildFrame( |
414 blink::WebLocalFrame* parent, | 417 blink::WebLocalFrame* parent, |
415 blink::WebTreeScopeType scope, | 418 blink::WebTreeScopeType scope, |
416 const blink::WebString& name, | 419 const blink::WebString& name, |
417 blink::WebSandboxFlags sandboxFlags) override; | 420 blink::WebSandboxFlags sandboxFlags, |
| 421 const blink::WebFrameOwnerProperties& frameOwnerProperties) override; |
418 void didChangeOpener(blink::WebFrame* frame) override; | 422 void didChangeOpener(blink::WebFrame* frame) override; |
419 void frameDetached(blink::WebFrame* frame, DetachType type) override; | 423 void frameDetached(blink::WebFrame* frame, DetachType type) override; |
420 void frameFocused() override; | 424 void frameFocused() override; |
421 void willClose(blink::WebFrame* frame) override; | 425 void willClose(blink::WebFrame* frame) override; |
422 void didChangeName(blink::WebLocalFrame* frame, | 426 void didChangeName(blink::WebLocalFrame* frame, |
423 const blink::WebString& name) override; | 427 const blink::WebString& name) override; |
424 void didChangeSandboxFlags(blink::WebFrame* child_frame, | 428 void didChangeSandboxFlags(blink::WebFrame* child_frame, |
425 blink::WebSandboxFlags flags) override; | 429 blink::WebSandboxFlags flags) override; |
| 430 virtual void didChangeFrameOwnerProperties( |
| 431 blink::WebFrame* child_frame, |
| 432 const blink::WebFrameOwnerProperties& frame_owner_properties) override; |
426 void didMatchCSS( | 433 void didMatchCSS( |
427 blink::WebLocalFrame* frame, | 434 blink::WebLocalFrame* frame, |
428 const blink::WebVector<blink::WebString>& newly_matching_selectors, | 435 const blink::WebVector<blink::WebString>& newly_matching_selectors, |
429 const blink::WebVector<blink::WebString>& stopped_matching_selectors) | 436 const blink::WebVector<blink::WebString>& stopped_matching_selectors) |
430 override; | 437 override; |
431 bool shouldReportDetailedMessageForSource( | 438 bool shouldReportDetailedMessageForSource( |
432 const blink::WebString& source) override; | 439 const blink::WebString& source) override; |
433 void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 440 void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
434 const blink::WebString& source_name, | 441 const blink::WebString& source_name, |
435 unsigned source_line, | 442 unsigned source_line, |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 int start, int end, | 727 int start, int end, |
721 const std::vector<blink::WebCompositionUnderline>& underlines); | 728 const std::vector<blink::WebCompositionUnderline>& underlines); |
722 void OnExecuteNoValueEditCommand(const std::string& name); | 729 void OnExecuteNoValueEditCommand(const std::string& name); |
723 void OnExtendSelectionAndDelete(int before, int after); | 730 void OnExtendSelectionAndDelete(int before, int after); |
724 void OnReload(bool ignore_cache); | 731 void OnReload(bool ignore_cache); |
725 void OnTextSurroundingSelectionRequest(size_t max_length); | 732 void OnTextSurroundingSelectionRequest(size_t max_length); |
726 void OnSetAccessibilityMode(AccessibilityMode new_mode); | 733 void OnSetAccessibilityMode(AccessibilityMode new_mode); |
727 void OnSnapshotAccessibilityTree(int callback_id); | 734 void OnSnapshotAccessibilityTree(int callback_id); |
728 void OnUpdateOpener(int opener_routing_id); | 735 void OnUpdateOpener(int opener_routing_id); |
729 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags); | 736 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags); |
| 737 void OnSetFrameOwnerProperties( |
| 738 const blink::WebFrameOwnerProperties& frame_owner_properties); |
730 void OnClearFocus(); | 739 void OnClearFocus(); |
731 void OnTextTrackSettingsChanged( | 740 void OnTextTrackSettingsChanged( |
732 const FrameMsg_TextTrackSettings_Params& params); | 741 const FrameMsg_TextTrackSettings_Params& params); |
733 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params); | 742 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params); |
734 #if defined(OS_ANDROID) | 743 #if defined(OS_ANDROID) |
735 void OnSelectPopupMenuItems(bool canceled, | 744 void OnSelectPopupMenuItems(bool canceled, |
736 const std::vector<int>& selected_indices); | 745 const std::vector<int>& selected_indices); |
737 #elif defined(OS_MACOSX) | 746 #elif defined(OS_MACOSX) |
738 void OnSelectPopupMenuItem(int selected_index); | 747 void OnSelectPopupMenuItem(int selected_index); |
739 void OnCopyToFindPboard(); | 748 void OnCopyToFindPboard(); |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1083 #endif | 1092 #endif |
1084 | 1093 |
1085 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1094 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
1086 | 1095 |
1087 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1096 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
1088 }; | 1097 }; |
1089 | 1098 |
1090 } // namespace content | 1099 } // namespace content |
1091 | 1100 |
1092 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1101 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |