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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 2566583002: Change allowed bindings to be per RenderFrame instead of per RenderView. (Closed)
Patch Set: rebase Created 3 years, 11 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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 blink::WebPageVisibilityState GetVisibilityState() override; 169 blink::WebPageVisibilityState GetVisibilityState() override;
170 bool IsRenderFrameLive() override; 170 bool IsRenderFrameLive() override;
171 int GetProxyCount() override; 171 int GetProxyCount() override;
172 void FilesSelectedInChooser(const std::vector<FileChooserFileInfo>& files, 172 void FilesSelectedInChooser(const std::vector<FileChooserFileInfo>& files,
173 FileChooserParams::Mode permissions) override; 173 FileChooserParams::Mode permissions) override;
174 bool HasSelection() override; 174 bool HasSelection() override;
175 void RequestTextSurroundingSelection( 175 void RequestTextSurroundingSelection(
176 const TextSurroundingSelectionCallback& callback, 176 const TextSurroundingSelectionCallback& callback,
177 int max_length) override; 177 int max_length) override;
178 void RequestFocusedFormFieldData(FormFieldDataCallback& callback) override; 178 void RequestFocusedFormFieldData(FormFieldDataCallback& callback) override;
179 void AllowBindings(int binding_flags) override;
180 int GetEnabledBindings() const override;
179 181
180 // mojom::FrameHost 182 // mojom::FrameHost
181 void GetInterfaceProvider( 183 void GetInterfaceProvider(
182 service_manager::mojom::InterfaceProviderRequest interfaces) override; 184 service_manager::mojom::InterfaceProviderRequest interfaces) override;
183 185
184 // IPC::Sender 186 // IPC::Sender
185 bool Send(IPC::Message* msg) override; 187 bool Send(IPC::Message* msg) override;
186 188
187 // IPC::Listener 189 // IPC::Listener
188 bool OnMessageReceived(const IPC::Message& msg) override; 190 bool OnMessageReceived(const IPC::Message& msg) override;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // Ownership is not transfered. 322 // Ownership is not transfered.
321 void set_cross_process_frame_connector( 323 void set_cross_process_frame_connector(
322 CrossProcessFrameConnector* cross_process_frame_connector) { 324 CrossProcessFrameConnector* cross_process_frame_connector) {
323 cross_process_frame_connector_ = cross_process_frame_connector; 325 cross_process_frame_connector_ = cross_process_frame_connector;
324 } 326 }
325 327
326 void set_render_frame_proxy_host(RenderFrameProxyHost* proxy) { 328 void set_render_frame_proxy_host(RenderFrameProxyHost* proxy) {
327 render_frame_proxy_host_ = proxy; 329 render_frame_proxy_host_ = proxy;
328 } 330 }
329 331
330 // Returns a bitwise OR of bindings types that have been enabled for this
331 // RenderFrameHostImpl's RenderView. See BindingsPolicy for details.
332 // TODO(creis): Make bindings frame-specific, to support cases like <webview>.
333 int GetEnabledBindings();
334
335 // The unique ID of the latest NavigationEntry that this RenderFrameHost is 332 // The unique ID of the latest NavigationEntry that this RenderFrameHost is
336 // showing. This may change even when this frame hasn't committed a page, 333 // showing. This may change even when this frame hasn't committed a page,
337 // such as for a new subframe navigation in a different frame. 334 // such as for a new subframe navigation in a different frame.
338 int nav_entry_id() const { return nav_entry_id_; } 335 int nav_entry_id() const { return nav_entry_id_; }
339 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } 336 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; }
340 337
341 // A NavigationHandle for the pending navigation in this frame, if any. This 338 // A NavigationHandle for the pending navigation in this frame, if any. This
342 // is cleared when the navigation commits. 339 // is cleared when the navigation commits.
343 NavigationHandleImpl* navigation_handle() const { 340 NavigationHandleImpl* navigation_handle() const {
344 return navigation_handle_.get(); 341 return navigation_handle_.get();
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 // If true, then the RenderFrame has selected text. 1094 // If true, then the RenderFrame has selected text.
1098 bool has_selection_; 1095 bool has_selection_;
1099 1096
1100 // PlzNavigate: The Previews state of the last navigation. This is used during 1097 // PlzNavigate: The Previews state of the last navigation. This is used during
1101 // history navigation of subframes to ensure that subframes navigate with the 1098 // history navigation of subframes to ensure that subframes navigate with the
1102 // same Previews status as the top-level frame. 1099 // same Previews status as the top-level frame.
1103 PreviewsState last_navigation_previews_state_; 1100 PreviewsState last_navigation_previews_state_;
1104 1101
1105 mojo::Binding<mojom::FrameHost> frame_host_binding_; 1102 mojo::Binding<mojom::FrameHost> frame_host_binding_;
1106 mojom::FramePtr frame_; 1103 mojom::FramePtr frame_;
1104 mojom::FrameBindingsControlAssociatedPtr frame_bindings_control_;
1107 1105
1108 // If this is true then this object was created in response to a renderer 1106 // If this is true then this object was created in response to a renderer
1109 // initiated request. Init() will be called, and until then navigation 1107 // initiated request. Init() will be called, and until then navigation
1110 // requests should be queued. 1108 // requests should be queued.
1111 bool waiting_for_init_; 1109 bool waiting_for_init_;
1112 1110
1113 // If true then this frame's document has a focused element which is editable. 1111 // If true then this frame's document has a focused element which is editable.
1114 bool has_focused_editable_element_; 1112 bool has_focused_editable_element_;
1115 1113
1116 typedef std::pair<CommonNavigationParams, BeginNavigationParams> 1114 typedef std::pair<CommonNavigationParams, BeginNavigationParams>
1117 PendingNavigation; 1115 PendingNavigation;
1118 std::unique_ptr<PendingNavigation> pendinging_navigate_; 1116 std::unique_ptr<PendingNavigation> pendinging_navigate_;
1119 1117
1120 // Callback for responding when 1118 // Callback for responding when
1121 // |FrameHostMsg_TextSurroundingSelectionResponse| message comes. 1119 // |FrameHostMsg_TextSurroundingSelectionResponse| message comes.
1122 TextSurroundingSelectionCallback text_surrounding_selection_callback_; 1120 TextSurroundingSelectionCallback text_surrounding_selection_callback_;
1123 1121
1124 // Hosts media::mojom::InterfaceFactory for the RenderFrame and forwards 1122 // Hosts media::mojom::InterfaceFactory for the RenderFrame and forwards
1125 // media::mojom::InterfaceFactory calls to the remote "media" service. 1123 // media::mojom::InterfaceFactory calls to the remote "media" service.
1126 std::unique_ptr<MediaInterfaceProxy> media_interface_proxy_; 1124 std::unique_ptr<MediaInterfaceProxy> media_interface_proxy_;
1127 1125
1128 std::vector<std::unique_ptr<service_manager::InterfaceRegistry>> 1126 std::vector<std::unique_ptr<service_manager::InterfaceRegistry>>
1129 media_registries_; 1127 media_registries_;
1130 1128
1131 std::unique_ptr<AssociatedInterfaceProviderImpl> 1129 std::unique_ptr<AssociatedInterfaceProviderImpl>
1132 remote_associated_interfaces_; 1130 remote_associated_interfaces_;
1133 1131
1132 // A bitwise OR of bindings types that have been enabled for this RenderFrame.
1133 // See BindingsPolicy for details.
1134 int enabled_bindings_ = 0;
1135
1134 // NOTE: This must be the last member. 1136 // NOTE: This must be the last member.
1135 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 1137 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
1136 1138
1137 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 1139 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
1138 }; 1140 };
1139 1141
1140 } // namespace content 1142 } // namespace content
1141 1143
1142 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 1144 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698