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

Side by Side Diff: content/browser/renderer_host/render_frame_host_impl.h

Issue 25503004: Create a new RenderFrameHost per child frame when --site-per-process is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT. Created 7 years, 2 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 | 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_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <string>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "content/public/browser/render_frame_host.h" 11 #include "content/public/browser/render_frame_host.h"
10 12
11 namespace content { 13 namespace content {
12 14
15 class FrameTree;
13 class RenderProcessHost; 16 class RenderProcessHost;
14 class RenderViewHostImpl; 17 class RenderViewHostImpl;
15 18
16 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { 19 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost {
17 public: 20 public:
18 static RenderFrameHostImpl* FromID(int process_id, int routing_id); 21 static RenderFrameHostImpl* FromID(int process_id, int routing_id);
19 22
23 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
24 // should be the abstraction needed here, but we need RenderViewHost to pass
25 // into WebContentsObserver::FrameDetached for now.
20 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, 26 RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
27 FrameTree* frame_tree,
21 int routing_id, 28 int routing_id,
22 bool is_swapped_out); 29 bool is_swapped_out);
23 virtual ~RenderFrameHostImpl(); 30 virtual ~RenderFrameHostImpl();
24 31
25 // IPC::Sender 32 // IPC::Sender
26 virtual bool Send(IPC::Message* msg) OVERRIDE; 33 virtual bool Send(IPC::Message* msg) OVERRIDE;
27 34
28 // IPC::Listener 35 // IPC::Listener
29 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 36 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
30 37
31 void Init(); 38 void Init();
32 RenderProcessHost* GetProcess() const; 39 RenderProcessHost* GetProcess() const;
33 int routing_id() const { return routing_id_; } 40 int routing_id() const { return routing_id_; }
41 void OnCreateChildFrame(int new_frame_routing_id,
42 int64 parent_frame_id,
43 int64 frame_id,
44 const std::string& frame_name);
45
46 RenderViewHostImpl* render_view_host() {
47 return render_view_host_;
48 }
34 49
35 private: 50 private:
36 bool is_swapped_out() { return is_swapped_out_; } 51 bool is_swapped_out() { return is_swapped_out_; }
37 52
38 RenderViewHostImpl* render_view_host_; // Not owned. Outlives this object. 53 // IPC message handlers.
54 void OnDetach(int64 parent_frame_id, int64 frame_id);
55
56 // TODO(nasko): This should be removed and replaced by RenderProcessHost.
57 RenderViewHostImpl* render_view_host_; // Not owned.
58
59 // Reference to the whole frame tree that this RenderFrameHost belongs too.
60 // Allows this RenderFrameHost to add and remove nodes in response to
61 // requests DOM manipulation messages from the renderer.
62 FrameTree* frame_tree_;
39 int routing_id_; 63 int routing_id_;
40 bool is_swapped_out_; 64 bool is_swapped_out_;
41 65
42 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 66 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
43 }; 67 };
44 68
45 } // namespace content 69 } // namespace content
46 70
47 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ 71 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/frame_tree_unittest.cc ('k') | content/browser/renderer_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698