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

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

Powered by Google App Engine
This is Rietveld 408576698