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

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

Issue 26316005: Move out DidStartProvisionalLoad from WebContentsImpl into Navigator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Some cleanup. 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_NAVIGATOR_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 10
11 class GURL;
12
11 namespace content { 13 namespace content {
12 14
13 class NavigationControllerImpl; 15 class NavigationControllerImpl;
14 class NavigatorDelegate; 16 class NavigatorDelegate;
17 class RenderFrameHostImpl;
15 18
16 // This class is responsible for performing navigations in a node of the 19 // This class is responsible for performing navigations in a node of the
17 // FrameTree. Its lifetime is bound to all FrameTreeNode objects that are 20 // FrameTree. Its lifetime is bound to all FrameTreeNode objects that are
18 // using it and will be released once all nodes that use it are freed. 21 // using it and will be released once all nodes that use it are freed.
19 // The Navigator is bound to a single frame tree and cannot be used by multiple 22 // The Navigator is bound to a single frame tree and cannot be used by multiple
20 // instances of FrameTree. 23 // instances of FrameTree.
21 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad 24 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad
22 // from WebContentsImpl to this class. 25 // from WebContentsImpl to this class.
23 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { 26 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> {
24 public: 27 public:
25 Navigator(NavigationControllerImpl* nav_controller, 28 Navigator(NavigationControllerImpl* nav_controller,
26 NavigatorDelegate* delegate); 29 NavigatorDelegate* delegate);
27 30
28 NavigationControllerImpl* controller() { 31 NavigationControllerImpl* controller() {
29 return controller_; 32 return controller_;
30 } 33 }
31 34
32 NavigatorDelegate* delegate() { 35 NavigatorDelegate* delegate() {
33 return delegate_; 36 return delegate_;
34 } 37 }
35 38
39 // The RenderFrameHost started a provisional load.
40 // TODO(nasko): The RenderFrameHost parameter should be replaced with
Charlie Reis 2013/11/21 21:59:32 nit: RenderFrameHostImpl Actually, I'm not sure I
nasko 2013/11/22 01:02:34 The reason for the TODO is previous discussions ab
41 // FrameTreeNode, once we have RenderFrameHostManager for each node in the
Charlie Reis 2013/11/21 21:59:32 nit: have a
nasko 2013/11/22 01:02:34 Done.
42 // frame tree.
Charlie Reis 2013/11/21 21:59:32 nit: FrameTree.
nasko 2013/11/22 01:02:34 Done.
43 void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host,
44 int64 frame_id,
45 int64 parent_frame_id,
46 bool main_frame,
47 const GURL& url);
48
36 private: 49 private:
37 friend class base::RefCounted<Navigator>; 50 friend class base::RefCounted<Navigator>;
38 virtual ~Navigator() {} 51 virtual ~Navigator() {}
39 52
40 // The NavigationController that will keep track of session history for all 53 // The NavigationController that will keep track of session history for all
41 // RenderFrameHost objects using this Navigator. 54 // RenderFrameHost objects using this Navigator.
42 // TODO(nasko): Move ownership of the NavigationController from 55 // TODO(nasko): Move ownership of the NavigationController from
43 // WebContentsImpl to this class. 56 // WebContentsImpl to this class.
44 NavigationControllerImpl* controller_; 57 NavigationControllerImpl* controller_;
45 58
46 // Used to notify the object embedding this Navigator about navigation 59 // Used to notify the object embedding this Navigator about navigation
47 // events. Can be NULL in tests. 60 // events. Can be NULL in tests.
48 NavigatorDelegate* delegate_; 61 NavigatorDelegate* delegate_;
49 }; 62 };
50 63
51 } // namespace content 64 } // namespace content
52 65
53 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 66 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698