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

Unified Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 2821473002: Service CreateNewWindow on the UI thread with a new mojo interface (Closed)
Patch Set: dcheng fixes + security exploit browsertest nerfing Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.h
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index d4415a7ce0d084e2c8679a5b741ae9c1cb77947c..48489194e15f529f7d93d70116b7b305e589ff72 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -83,6 +83,7 @@ class Range;
namespace content {
class AssociatedInterfaceProviderImpl;
+class AssociatedInterfaceRegistryImpl;
class FeaturePolicy;
class FrameTree;
class FrameTreeNode;
@@ -107,14 +108,11 @@ struct FrameOwnerProperties;
struct FileChooserParams;
struct ResourceResponse;
-namespace mojom {
-class CreateNewWindowParams;
-}
-
class CONTENT_EXPORT RenderFrameHostImpl
: public RenderFrameHost,
public base::SupportsUserData,
NON_EXPORTED_BASE(public mojom::FrameHost),
+ NON_EXPORTED_BASE(public mojom::FrameHostIPC),
public BrowserAccessibilityDelegate,
public SiteInstanceImpl::Observer,
public NON_EXPORTED_BASE(
@@ -252,16 +250,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
const ParsedFeaturePolicyHeader& container_policy,
const FrameOwnerProperties& frame_owner_properties);
- // Called when this frame tries to open a new WebContents, e.g. via a script
- // call to window.open(). The renderer has already been told to create the
- // RenderView and RenderFrame with the specified route ids, which were
- // assigned on the IO thread.
- void OnCreateNewWindow(int32_t render_view_route_id,
- int32_t main_frame_route_id,
- int32_t main_frame_widget_route_id,
- const mojom::CreateNewWindowParams& params,
- SessionStorageNamespace* session_storage_namespace);
-
// Update this frame's last committed origin.
void SetLastCommittedOrigin(const url::Origin& origin);
@@ -796,6 +784,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
const gfx::Rect& initial_rect,
bool user_gesture);
+ // mojom::FrameHostIPC
+ void CreateNewWindow(mojom::CreateNewWindowParamsPtr params,
+ const CreateNewWindowCallback& callback) override;
+
+ void RunCreateWindowCompleteCallback(const CreateNewWindowCallback& callback,
+ mojom::CreateNewWindowReplyPtr reply,
+ int render_view_route_id,
+ int main_frame_route_id,
+ int main_frame_widget_route_id,
+ int cloned_session_storage_namespace_id);
+
// Registers Mojo interfaces that this frame host makes available.
void RegisterMojoInterfaces();
@@ -1043,6 +1042,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
// SiteInstance. May be null in tests.
std::unique_ptr<TimeoutMonitor> swapout_event_monitor_timeout_;
+ std::unique_ptr<AssociatedInterfaceRegistryImpl> associated_registry_;
+
std::unique_ptr<service_manager::InterfaceRegistry> interface_registry_;
std::unique_ptr<service_manager::InterfaceProvider> remote_interfaces_;
@@ -1130,6 +1131,7 @@ class CONTENT_EXPORT RenderFrameHostImpl
PreviewsState last_navigation_previews_state_;
mojo::Binding<mojom::FrameHost> frame_host_binding_;
+ mojo::AssociatedBinding<mojom::FrameHostIPC> frame_host_associated_binding_;
nasko 2017/04/20 18:58:41 nit: If this interface stays around, why not inclu
mojom::FramePtr frame_;
mojom::FrameBindingsControlAssociatedPtr frame_bindings_control_;

Powered by Google App Engine
This is Rietveld 408576698