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

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

Issue 100473010: Adding RenderWidgetHostViewChildFrame for OOPIF view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed broken unit test Created 7 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_
6 #define CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_
7
8 #include "cc/output/compositor_frame.h"
9 #include "ui/gfx/rect.h"
10
11 namespace IPC {
12 class Message;
13 }
14
15 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
16
17 namespace content {
18 class RenderFrameHostImpl;
19 class RenderWidgetHostImpl;
20 class RenderWidgetHostViewChildFrame;
21
22 // -----------------------------------------------------------------------------
23 // CrossProcessFrameConnector mediates between a parent frame and an embedded
Charlie Reis 2013/12/12 02:42:05 Thanks-- I like the name much more than CrossProce
kenrb 2013/12/13 18:41:17 Done.
24 // child frame that is rendered in a separate process. It contains browser
25 // process state for the child frame and has logic for message passing between
Charlie Reis 2013/12/12 02:42:05 nit: passing messages
26 // them. It is owned by the child frame's RenderFrameHostManager.
27 // -----------------------------------------------------------------------------
28 class CrossProcessFrameConnector {
29 public:
30 virtual ~CrossProcessFrameConnector();
31
32 static CrossProcessFrameConnector* CreateCrossProcessFrameConnector(
33 RenderFrameHostImpl* frame_proxy_to_parent_renderer);
Charlie Reis 2013/12/12 02:42:05 Please document what this parameter is supposed to
kenrb 2013/12/13 18:41:17 Would this be redundant with the comment on the me
Charlie Reis 2013/12/16 19:31:08 That comment says it's initially NULL, which doesn
34
35 void Destroy();
36
37 bool OnMessageReceived(const IPC::Message &msg);
38
39 void SetView(RenderWidgetHostViewChildFrame* view);
40
41 // 'Platform' functionality exposed to RenderWidgetHostViewChildFrame.
42 // These methods can forward messages to the child frame proxy in the parent
43 // frame renderer or attempt to handle them within the browser process.
44 void ChildFrameBuffersSwapped(
45 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
46 int gpu_host_id);
47
48 void ChildFrameCompositorFrameSwapped(
49 uint32 output_surface_id,
50 scoped_ptr<cc::CompositorFrame> frame);
51
52 gfx::Rect ChildFrameRect();
53
54 private:
55 CrossProcessFrameConnector(
56 RenderFrameHostImpl* frame_proxy_to_parent_renderer);
57
58 // Handlers for messages received from the parent frame.
59 void OnBuffersSwappedACK(std::string mailbox_name,
60 int route_id,
61 int gpu_host_id,
62 uint32 sync_point);
63
64 // frame_proxy_to_parent_renderer_ the RenderFrameHostProxy that routes
Charlie Reis 2013/12/12 02:42:05 nit: is the Actually, just start with "The" and s
kenrb 2013/12/13 18:41:17 Done.
65 // messages to the parent frame's renderer process. Initially NULL.
66 // TODO(kenrb): The type becomes RenderFrameProxyHost when that class comes
67 // to exist.
68 RenderFrameHostImpl* frame_proxy_to_parent_renderer_;
69
70 // child_frame_widget_ is the RenderWidgetHost for the child_frame. There is
71 // at most one RenderWidgetHost per frame because RenderFrameProxyHosts do
72 // not do not require widgets.
73 RenderWidgetHostImpl* child_frame_widget_;
Charlie Reis 2013/12/12 02:42:05 Why isn't this on RenderFrameHostImpl instead? I
kenrb 2013/12/13 18:41:17 RenderWidgetHostImpl will be owned by RenderFrameH
Charlie Reis 2013/12/16 19:31:08 What do you mean by cached? Will it ever be stale
74
75 gfx::Rect child_frame_rect_;
76 };
77
78 } // namespace content
79
80 #endif // CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_
81
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698