Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 1307013004: Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from dcheng@ Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 const blink::WebPopupMenuInfo& popup_menu_info, 392 const blink::WebPopupMenuInfo& popup_menu_info,
390 blink::WebExternalPopupMenuClient* popup_menu_client) override; 393 blink::WebExternalPopupMenuClient* popup_menu_client) override;
391 blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame) override; 394 blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame) override;
392 blink::WebServiceWorkerProvider* createServiceWorkerProvider( 395 blink::WebServiceWorkerProvider* createServiceWorkerProvider(
393 blink::WebLocalFrame* frame) override; 396 blink::WebLocalFrame* frame) override;
394 void didAccessInitialDocument(blink::WebLocalFrame* frame) override; 397 void didAccessInitialDocument(blink::WebLocalFrame* frame) override;
395 blink::WebFrame* createChildFrame( 398 blink::WebFrame* createChildFrame(
396 blink::WebLocalFrame* parent, 399 blink::WebLocalFrame* parent,
397 blink::WebTreeScopeType scope, 400 blink::WebTreeScopeType scope,
398 const blink::WebString& name, 401 const blink::WebString& name,
399 blink::WebSandboxFlags sandboxFlags) override; 402 blink::WebSandboxFlags sandboxFlags,
403 const blink::WebFrameOwnerProperties& frameOwnerProperties) override;
400 void didChangeOpener(blink::WebFrame* frame) override; 404 void didChangeOpener(blink::WebFrame* frame) override;
401 void frameDetached(blink::WebFrame* frame, DetachType type) override; 405 void frameDetached(blink::WebFrame* frame, DetachType type) override;
402 void frameFocused() override; 406 void frameFocused() override;
403 void willClose(blink::WebFrame* frame) override; 407 void willClose(blink::WebFrame* frame) override;
404 void didChangeName(blink::WebLocalFrame* frame, 408 void didChangeName(blink::WebLocalFrame* frame,
405 const blink::WebString& name) override; 409 const blink::WebString& name) override;
406 void didChangeSandboxFlags(blink::WebFrame* child_frame, 410 void didChangeSandboxFlags(blink::WebFrame* child_frame,
407 blink::WebSandboxFlags flags) override; 411 blink::WebSandboxFlags flags) override;
412 virtual void didChangeFrameOwnerProperties(
413 blink::WebFrame* child_frame,
414 const blink::WebFrameOwnerProperties& frame_owner_properties) override;
408 void didMatchCSS( 415 void didMatchCSS(
409 blink::WebLocalFrame* frame, 416 blink::WebLocalFrame* frame,
410 const blink::WebVector<blink::WebString>& newly_matching_selectors, 417 const blink::WebVector<blink::WebString>& newly_matching_selectors,
411 const blink::WebVector<blink::WebString>& stopped_matching_selectors) 418 const blink::WebVector<blink::WebString>& stopped_matching_selectors)
412 override; 419 override;
413 bool shouldReportDetailedMessageForSource( 420 bool shouldReportDetailedMessageForSource(
414 const blink::WebString& source) override; 421 const blink::WebString& source) override;
415 void didAddMessageToConsole(const blink::WebConsoleMessage& message, 422 void didAddMessageToConsole(const blink::WebConsoleMessage& message,
416 const blink::WebString& source_name, 423 const blink::WebString& source_name,
417 unsigned source_line, 424 unsigned source_line,
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 int start, int end, 710 int start, int end,
704 const std::vector<blink::WebCompositionUnderline>& underlines); 711 const std::vector<blink::WebCompositionUnderline>& underlines);
705 void OnExecuteNoValueEditCommand(const std::string& name); 712 void OnExecuteNoValueEditCommand(const std::string& name);
706 void OnExtendSelectionAndDelete(int before, int after); 713 void OnExtendSelectionAndDelete(int before, int after);
707 void OnReload(bool ignore_cache); 714 void OnReload(bool ignore_cache);
708 void OnTextSurroundingSelectionRequest(size_t max_length); 715 void OnTextSurroundingSelectionRequest(size_t max_length);
709 void OnSetAccessibilityMode(AccessibilityMode new_mode); 716 void OnSetAccessibilityMode(AccessibilityMode new_mode);
710 void OnSnapshotAccessibilityTree(int callback_id); 717 void OnSnapshotAccessibilityTree(int callback_id);
711 void OnUpdateOpener(int opener_routing_id); 718 void OnUpdateOpener(int opener_routing_id);
712 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags); 719 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags);
720 void OnSetFrameOwnerProperties(
721 const blink::WebFrameOwnerProperties& frame_owner_properties);
713 void OnClearFocus(); 722 void OnClearFocus();
714 void OnTextTrackSettingsChanged( 723 void OnTextTrackSettingsChanged(
715 const FrameMsg_TextTrackSettings_Params& params); 724 const FrameMsg_TextTrackSettings_Params& params);
716 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params); 725 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params);
717 #if defined(OS_ANDROID) 726 #if defined(OS_ANDROID)
718 void OnSelectPopupMenuItems(bool canceled, 727 void OnSelectPopupMenuItems(bool canceled,
719 const std::vector<int>& selected_indices); 728 const std::vector<int>& selected_indices);
720 #elif defined(OS_MACOSX) 729 #elif defined(OS_MACOSX)
721 void OnSelectPopupMenuItem(int selected_index); 730 void OnSelectPopupMenuItem(int selected_index);
722 void OnCopyToFindPboard(); 731 void OnCopyToFindPboard();
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 #endif 1072 #endif
1064 1073
1065 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1074 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1066 1075
1067 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1076 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1068 }; 1077 };
1069 1078
1070 } // namespace content 1079 } // namespace content
1071 1080
1072 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1081 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698