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

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

Issue 1080143003: Move DidStartLoading, DidStopLoading, DidChangeLoadProgress to RFHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebase Created 5 years, 8 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
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 "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/frame_host/navigator_delegate.h"
10 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
11 #include "content/public/browser/navigation_controller.h" 12 #include "content/public/browser/navigation_controller.h"
12 #include "ui/base/window_open_disposition.h" 13 #include "ui/base/window_open_disposition.h"
13 14
14 class GURL; 15 class GURL;
15 struct FrameHostMsg_BeginNavigation_Params; 16 struct FrameHostMsg_BeginNavigation_Params;
16 struct FrameHostMsg_DidCommitProvisionalLoad_Params; 17 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
17 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; 18 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params;
18 19
19 namespace base { 20 namespace base {
20 class TimeTicks; 21 class TimeTicks;
21 } 22 }
22 23
23 namespace content { 24 namespace content {
24 25
25 class FrameTreeNode; 26 class FrameTreeNode;
26 class NavigationControllerImpl; 27 class NavigationControllerImpl;
27 class NavigationEntryImpl; 28 class NavigationEntryImpl;
28 class NavigationRequest; 29 class NavigationRequest;
29 class NavigatorDelegate;
30 class RenderFrameHostImpl; 30 class RenderFrameHostImpl;
31 class ResourceRequestBody; 31 class ResourceRequestBody;
32 class StreamHandle; 32 class StreamHandle;
33 struct BeginNavigationParams; 33 struct BeginNavigationParams;
34 struct CommonNavigationParams; 34 struct CommonNavigationParams;
35 struct ResourceResponse; 35 struct ResourceResponse;
36 36
37 // Implementations of this interface are responsible for performing navigations 37 // Implementations of this interface are responsible for performing navigations
38 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode 38 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode
39 // objects that are using it and will be released once all nodes that use it are 39 // objects that are using it and will be released once all nodes that use it are
40 // freed. The Navigator is bound to a single frame tree and cannot be used by 40 // freed. The Navigator is bound to a single frame tree and cannot be used by
41 // multiple instances of FrameTree. 41 // multiple instances of FrameTree.
42 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad 42 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad
43 // from WebContentsImpl to this interface. 43 // from WebContentsImpl to this interface.
44 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { 44 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> {
45 public: 45 public:
46 // Returns the delegate of this Navigator.
47 virtual NavigatorDelegate* GetDelegate();
48
46 // Returns the NavigationController associated with this Navigator. 49 // Returns the NavigationController associated with this Navigator.
47 virtual NavigationController* GetController(); 50 virtual NavigationController* GetController();
48 51
49 // Notifications coming from the RenderFrameHosts ---------------------------- 52 // Notifications coming from the RenderFrameHosts ----------------------------
50 53
51 // The RenderFrameHostImpl started a provisional load. 54 // The RenderFrameHostImpl started a provisional load.
52 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, 55 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host,
53 const GURL& url, 56 const GURL& url,
54 bool is_transition_navigation) {}; 57 bool is_transition_navigation) {};
55 58
(...skipping 25 matching lines...) Expand all
81 // If this method returns false, then the navigation is discarded (equivalent 84 // If this method returns false, then the navigation is discarded (equivalent
82 // to calling DiscardPendingEntry on the NavigationController). 85 // to calling DiscardPendingEntry on the NavigationController).
83 // 86 //
84 // TODO(nasko): Remove this method from the interface, since Navigator and 87 // TODO(nasko): Remove this method from the interface, since Navigator and
85 // NavigationController know about each other. This will be possible once 88 // NavigationController know about each other. This will be possible once
86 // initialization of Navigator and NavigationController is properly done. 89 // initialization of Navigator and NavigationController is properly done.
87 virtual bool NavigateToPendingEntry( 90 virtual bool NavigateToPendingEntry(
88 FrameTreeNode* frame_tree_node, 91 FrameTreeNode* frame_tree_node,
89 NavigationController::ReloadType reload_type); 92 NavigationController::ReloadType reload_type);
90 93
91
92 // Navigation requests ------------------------------------------------------- 94 // Navigation requests -------------------------------------------------------
93 95
94 virtual base::TimeTicks GetCurrentLoadStart(); 96 virtual base::TimeTicks GetCurrentLoadStart();
95 97
96 // The RenderFrameHostImpl has received a request to open a URL with the 98 // The RenderFrameHostImpl has received a request to open a URL with the
97 // specified |disposition|. 99 // specified |disposition|.
98 virtual void RequestOpenURL(RenderFrameHostImpl* render_frame_host, 100 virtual void RequestOpenURL(RenderFrameHostImpl* render_frame_host,
99 const GURL& url, 101 const GURL& url,
100 SiteInstance* source_site_instance, 102 SiteInstance* source_site_instance,
101 const Referrer& referrer, 103 const Referrer& referrer,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 virtual bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node); 179 virtual bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node);
178 180
179 protected: 181 protected:
180 friend class base::RefCounted<Navigator>; 182 friend class base::RefCounted<Navigator>;
181 virtual ~Navigator() {} 183 virtual ~Navigator() {}
182 }; 184 };
183 185
184 } // namespace content 186 } // namespace content
185 187
186 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 188 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/interstitial_page_navigator_impl.cc ('k') | content/browser/frame_host/navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698