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

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

Issue 263973003: Move LoadProgressTracker to the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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_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 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
(...skipping 19 matching lines...) Expand all
30 // objects that are using it and will be released once all nodes that use it are 30 // objects that are using it and will be released once all nodes that use it are
31 // freed. The Navigator is bound to a single frame tree and cannot be used by 31 // freed. The Navigator is bound to a single frame tree and cannot be used by
32 // multiple instances of FrameTree. 32 // multiple instances of FrameTree.
33 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad 33 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad
34 // from WebContentsImpl to this interface. 34 // from WebContentsImpl to this interface.
35 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { 35 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> {
36 public: 36 public:
37 // Returns the NavigationController associated with this Navigator. 37 // Returns the NavigationController associated with this Navigator.
38 virtual NavigationController* GetController(); 38 virtual NavigationController* GetController();
39 39
40
41 // Notifications coming from the RenderFrameHosts ----------------------------
42
40 // The RenderFrameHostImpl started a provisional load. 43 // The RenderFrameHostImpl started a provisional load.
41 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, 44 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host,
42 int parent_routing_id, 45 int parent_routing_id,
43 const GURL& url) {}; 46 const GURL& url) {};
44 47
45 // The RenderFrameHostImpl has failed a provisional load. 48 // The RenderFrameHostImpl has failed a provisional load.
46 virtual void DidFailProvisionalLoadWithError( 49 virtual void DidFailProvisionalLoadWithError(
47 RenderFrameHostImpl* render_frame_host, 50 RenderFrameHostImpl* render_frame_host,
48 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {}; 51 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {};
49 52
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 RenderFrameHostImpl* render_frame_host, 91 RenderFrameHostImpl* render_frame_host,
89 NavigationController::ReloadType reload_type); 92 NavigationController::ReloadType reload_type);
90 93
94 // The RenderFrame began loading a new page. This corresponds to Blink's
95 // notion of the throbber starting.
96 // |to_different_document| will be true unless the load is a fragment
97 // navigation, or triggered by history.pushState/replaceState.
98 virtual void DidStartLoading(RenderFrameHostImpl* render_frame_host,
99 bool to_different_document) {}
100
101 // The RenderFrame stopped loading a page. This corresponds to Blink's notion
102 // of the throbber stopping.
103 virtual void DidStopLoading(RenderFrameHostImpl* render_frame_host) {}
104
105 // The RenderFrame reported making progress in a load.
106 virtual void DidChangeLoadProgress(RenderFrameHostImpl* render_frame_host,
107 double load_progress) {}
108
109
110 // Navigation requests -------------------------------------------------------
111
91 virtual base::TimeTicks GetCurrentLoadStart(); 112 virtual base::TimeTicks GetCurrentLoadStart();
92 113
93 // The RenderFrameHostImpl has received a request to open a URL with the 114 // The RenderFrameHostImpl has received a request to open a URL with the
94 // specified |disposition|. 115 // specified |disposition|.
95 virtual void RequestOpenURL(RenderFrameHostImpl* render_frame_host, 116 virtual void RequestOpenURL(RenderFrameHostImpl* render_frame_host,
96 const GURL& url, 117 const GURL& url,
97 const Referrer& referrer, 118 const Referrer& referrer,
98 WindowOpenDisposition disposition, 119 WindowOpenDisposition disposition,
99 bool should_replace_current_entry, 120 bool should_replace_current_entry,
100 bool user_gesture) {} 121 bool user_gesture) {}
(...skipping 13 matching lines...) Expand all
114 bool user_gesture) {} 135 bool user_gesture) {}
115 136
116 protected: 137 protected:
117 friend class base::RefCounted<Navigator>; 138 friend class base::RefCounted<Navigator>;
118 virtual ~Navigator() {} 139 virtual ~Navigator() {}
119 }; 140 };
120 141
121 } // namespace content 142 } // namespace content
122 143
123 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 144 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698