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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.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
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 <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/public/browser/render_frame_host.h" 12 #include "content/public/browser/render_frame_host.h"
13 13
14 class GURL; 14 class GURL;
15 15
16 namespace base { 16 namespace base {
17 class FilePath; 17 class FilePath;
18 } 18 }
19 19
20 namespace content { 20 namespace content {
21 21
22 class CrossProcessFrameConnector;
22 class FrameTree; 23 class FrameTree;
23 class RenderFrameHostDelegate; 24 class RenderFrameHostDelegate;
24 class RenderProcessHost; 25 class RenderProcessHost;
25 class RenderViewHostImpl; 26 class RenderViewHostImpl;
26 27
27 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { 28 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost {
28 public: 29 public:
29 static RenderFrameHostImpl* FromID(int process_id, int routing_id); 30 static RenderFrameHostImpl* FromID(int process_id, int routing_id);
30 31
31 virtual ~RenderFrameHostImpl(); 32 virtual ~RenderFrameHostImpl();
(...skipping 11 matching lines...) Expand all
43 RenderProcessHost* GetProcess() const; 44 RenderProcessHost* GetProcess() const;
44 int routing_id() const { return routing_id_; } 45 int routing_id() const { return routing_id_; }
45 void OnCreateChildFrame(int new_frame_routing_id, 46 void OnCreateChildFrame(int new_frame_routing_id,
46 int64 parent_frame_id, 47 int64 parent_frame_id,
47 int64 frame_id, 48 int64 frame_id,
48 const std::string& frame_name); 49 const std::string& frame_name);
49 50
50 RenderViewHostImpl* render_view_host() { return render_view_host_; } 51 RenderViewHostImpl* render_view_host() { return render_view_host_; }
51 RenderFrameHostDelegate* delegate() { return delegate_; } 52 RenderFrameHostDelegate* delegate() { return delegate_; }
52 53
54 void SetCrossProcessFrameConnector(
55 CrossProcessFrameConnector* cross_process_frame_connector);
56
53 protected: 57 protected:
54 friend class RenderFrameHostFactory; 58 friend class RenderFrameHostFactory;
55 59
56 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost 60 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
57 // should be the abstraction needed here, but we need RenderViewHost to pass 61 // should be the abstraction needed here, but we need RenderViewHost to pass
58 // into WebContentsObserver::FrameDetached for now. 62 // into WebContentsObserver::FrameDetached for now.
59 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, 63 RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
60 RenderFrameHostDelegate* delegate, 64 RenderFrameHostDelegate* delegate,
61 FrameTree* frame_tree, 65 FrameTree* frame_tree,
62 int routing_id, 66 int routing_id,
63 bool is_swapped_out); 67 bool is_swapped_out);
64 68
65 private: 69 private:
66 // IPC Message handlers. 70 // IPC Message handlers.
67 void OnDetach(int64 parent_frame_id, int64 frame_id); 71 void OnDetach(int64 parent_frame_id, int64 frame_id);
68 void OnDidStartProvisionalLoadForFrame(int64 frame_id, 72 void OnDidStartProvisionalLoadForFrame(int64 frame_id,
69 int64 parent_frame_id, 73 int64 parent_frame_id,
70 bool main_frame, 74 bool main_frame,
71 const GURL& url); 75 const GURL& url);
72 76
73 bool is_swapped_out() { return is_swapped_out_; } 77 bool is_swapped_out() { return is_swapped_out_; }
74 78
75 // TODO(nasko): This should be removed and replaced by RenderProcessHost. 79 // TODO(nasko): This should be removed and replaced by RenderProcessHost.
76 RenderViewHostImpl* render_view_host_; // Not owned. 80 RenderViewHostImpl* render_view_host_; // Not owned.
77 81
78 RenderFrameHostDelegate* delegate_; 82 RenderFrameHostDelegate* delegate_;
79 83
84 // Object that handles messages destined to a child frame in another
85 // process from its parent. Non-NULL only when this RenderFrameHost is
86 // swapped out and corresponds to a direct child frame of a frame in its
Charlie Reis 2013/12/16 19:31:08 What does "corresponds to a direct child frame of
awong 2013/12/17 02:45:27 Fixed.
87 // renderer process.
88 // This will move to RenderFrameProxyHost when that class is created.
89 CrossProcessFrameConnector* cross_process_frame_connector_;
90
80 // Reference to the whole frame tree that this RenderFrameHost belongs too. 91 // Reference to the whole frame tree that this RenderFrameHost belongs too.
81 // Allows this RenderFrameHost to add and remove nodes in response to 92 // Allows this RenderFrameHost to add and remove nodes in response to
82 // messages from the renderer requesting DOM manipulation. 93 // messages from the renderer requesting DOM manipulation.
83 FrameTree* frame_tree_; 94 FrameTree* frame_tree_;
84 int routing_id_; 95 int routing_id_;
85 bool is_swapped_out_; 96 bool is_swapped_out_;
86 97
87 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 98 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
88 }; 99 };
89 100
90 } // namespace content 101 } // namespace content
91 102
92 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 103 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698