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

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

Powered by Google App Engine
This is Rietveld 408576698