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

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

Issue 26316005: Move out DidStartProvisionalLoad from WebContentsImpl into Navigator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes based on Charlie's latest review. 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 FrameTree; 22 class FrameTree;
23 class FrameTreeNode;
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();
32 33
(...skipping 19 matching lines...) Expand all
52 53
53 protected: 54 protected:
54 friend class RenderFrameHostFactory; 55 friend class RenderFrameHostFactory;
55 56
56 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost 57 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
57 // should be the abstraction needed here, but we need RenderViewHost to pass 58 // should be the abstraction needed here, but we need RenderViewHost to pass
58 // into WebContentsObserver::FrameDetached for now. 59 // into WebContentsObserver::FrameDetached for now.
59 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, 60 RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
60 RenderFrameHostDelegate* delegate, 61 RenderFrameHostDelegate* delegate,
61 FrameTree* frame_tree, 62 FrameTree* frame_tree,
63 FrameTreeNode* frame_tree_node,
62 int routing_id, 64 int routing_id,
63 bool is_swapped_out); 65 bool is_swapped_out);
64 66
65 private: 67 private:
68 friend class TestRenderViewHost;
69
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
80 // Reference to the whole frame tree that this RenderFrameHost belongs too. 84 // Reference to the whole frame tree that this RenderFrameHost belongs too.
81 // Allows this RenderFrameHost to add and remove nodes in response to 85 // Allows this RenderFrameHost to add and remove nodes in response to
82 // messages from the renderer requesting DOM manipulation. 86 // messages from the renderer requesting DOM manipulation.
83 FrameTree* frame_tree_; 87 FrameTree* frame_tree_;
88
89 // The FrameTreeNode which this RenderFrameHostImpl is hosted in.
90 FrameTreeNode* frame_tree_node_;
91
84 int routing_id_; 92 int routing_id_;
85 bool is_swapped_out_; 93 bool is_swapped_out_;
86 94
87 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 95 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
88 }; 96 };
89 97
90 } // namespace content 98 } // namespace content
91 99
92 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 100 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_factory.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698