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

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: Tweaked a comment 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 contains cached state information between a parent
24 // frame and an embedded child frame that are rendered in separate processes.
25 // It passes messages between them if it cannot handle the message within the
26 // browser process. It is owned by the child frame's RenderFrameHostManager.
27 // -----------------------------------------------------------------------------
28 class CrossProcessFrameConnector {
Charlie Reis 2013/12/16 21:35:32 Ok, Albert tried to explain this class to me, and
awong 2013/12/17 00:44:14 I rewrote the comment. Left a TODO for ken to veri
29 public:
30 virtual ~CrossProcessFrameConnector();
31
32 static CrossProcessFrameConnector* CreateCrossProcessFrameConnector(
awong 2013/12/14 02:25:14 Why bother with the creation method?
awong 2013/12/17 00:44:14 Done.
33 RenderFrameHostImpl* frame_proxy_to_parent_renderer);
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);
awong 2013/12/14 02:25:14 explicit
awong 2013/12/17 00:44:14 Done.
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 // The RenderFrameHostProxy that routes messages to the parent frame's
nasko 2013/12/16 23:16:32 nit: RenderFrameHostProxy doesn't exist yet. Did y
awong 2013/12/17 00:44:14 Done.
65 // 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 // The RenderWidgetHost for the child_frame. There is at most one
71 // RenderWidgetHost per frame because RenderFrameProxyHosts do
72 // not require widgets.
73 RenderWidgetHostImpl* child_frame_widget_;
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