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

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

Issue 49823002: Move navigation and frame tree classes to a new frame_host/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing gyp and adding TODO. Created 7 years, 1 month 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 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_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_
7
8 #include <string>
9
10 #include "base/compiler_specific.h"
11 #include "content/public/browser/render_frame_host.h"
12
13 class GURL;
14
15 namespace content {
16
17 class FrameTree;
18 class RenderProcessHost;
19 class RenderViewHostImpl;
20
21 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost {
22 public:
23 static RenderFrameHostImpl* FromID(int process_id, int routing_id);
24
25 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
26 // should be the abstraction needed here, but we need RenderViewHost to pass
27 // into WebContentsObserver::FrameDetached for now.
28 RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
29 FrameTree* frame_tree,
30 int routing_id,
31 bool is_swapped_out);
32 virtual ~RenderFrameHostImpl();
33
34 // IPC::Sender
35 virtual bool Send(IPC::Message* msg) OVERRIDE;
36
37 // IPC::Listener
38 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
39
40 void Init();
41 RenderProcessHost* GetProcess() const;
42 int routing_id() const { return routing_id_; }
43 void OnCreateChildFrame(int new_frame_routing_id,
44 int64 parent_frame_id,
45 int64 frame_id,
46 const std::string& frame_name);
47
48 RenderViewHostImpl* render_view_host() {
49 return render_view_host_;
50 }
51
52 private:
53 // IPC Message handlers.
54 void OnDetach(int64 parent_frame_id, int64 frame_id);
55 void OnDidStartProvisionalLoadForFrame(int64 frame_id,
56 int64 parent_frame_id,
57 bool main_frame,
58 const GURL& url);
59
60 bool is_swapped_out() { return is_swapped_out_; }
61
62 // TODO(nasko): This should be removed and replaced by RenderProcessHost.
63 RenderViewHostImpl* render_view_host_; // Not owned.
64
65 // Reference to the whole frame tree that this RenderFrameHost belongs too.
66 // Allows this RenderFrameHost to add and remove nodes in response to
67 // messages from the renderer requesting DOM manipulation.
68 FrameTree* frame_tree_;
69 int routing_id_;
70 bool is_swapped_out_;
71
72 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
73 };
74
75 } // namespace content
76
77 #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