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

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

Issue 2921753002: NOT YET READY: Making chrome.windows.create establish an actual "opener" relationship.
Patch Set: Adding setSelfAsOpener parameter. Created 3 years, 6 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
« no previous file with comments | « chrome/common/extensions/api/windows.json ('k') | content/browser/frame_host/navigator_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/navigation_handle_impl.h" 10 #include "content/browser/frame_host/navigation_handle_impl.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Returns the NavigationController associated with this Navigator. 46 // Returns the NavigationController associated with this Navigator.
47 virtual NavigationController* GetController(); 47 virtual NavigationController* GetController();
48 48
49 // Notifications coming from the RenderFrameHosts ---------------------------- 49 // Notifications coming from the RenderFrameHosts ----------------------------
50 50
51 // The RenderFrameHostImpl started a provisional load. 51 // The RenderFrameHostImpl started a provisional load.
52 virtual void DidStartProvisionalLoad( 52 virtual void DidStartProvisionalLoad(
53 RenderFrameHostImpl* render_frame_host, 53 RenderFrameHostImpl* render_frame_host,
54 const GURL& url, 54 const GURL& url,
55 const std::vector<GURL>& redirect_chain, 55 const std::vector<GURL>& redirect_chain,
56 const base::TimeTicks& navigation_start) {}; 56 const base::TimeTicks& navigation_start) {}
57 57
58 // The RenderFrameHostImpl has failed a provisional load. 58 // The RenderFrameHostImpl has failed a provisional load.
59 virtual void DidFailProvisionalLoadWithError( 59 virtual void DidFailProvisionalLoadWithError(
60 RenderFrameHostImpl* render_frame_host, 60 RenderFrameHostImpl* render_frame_host,
61 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {}; 61 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {}
62 62
63 // The RenderFrameHostImpl has failed to load the document. 63 // The RenderFrameHostImpl has failed to load the document.
64 virtual void DidFailLoadWithError( 64 virtual void DidFailLoadWithError(
65 RenderFrameHostImpl* render_frame_host, 65 RenderFrameHostImpl* render_frame_host,
66 const GURL& url, 66 const GURL& url,
67 int error_code, 67 int error_code,
68 const base::string16& error_description, 68 const base::string16& error_description,
69 bool was_ignored_by_handler) {} 69 bool was_ignored_by_handler) {}
70 70
71 // The RenderFrameHostImpl has committed a navigation. The Navigator is 71 // The RenderFrameHostImpl has committed a navigation. The Navigator is
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // 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
115 // specified |disposition|. 115 // specified |disposition|.
116 virtual void RequestOpenURL( 116 virtual void RequestOpenURL(
117 RenderFrameHostImpl* render_frame_host, 117 RenderFrameHostImpl* render_frame_host,
118 const GURL& url, 118 const GURL& url,
119 bool uses_post, 119 bool uses_post,
120 const scoped_refptr<ResourceRequestBodyImpl>& body, 120 const scoped_refptr<ResourceRequestBodyImpl>& body,
121 const std::string& extra_headers, 121 const std::string& extra_headers,
122 const Referrer& referrer, 122 const Referrer& referrer,
123 WindowOpenDisposition disposition, 123 WindowOpenDisposition disposition,
124 bool force_new_process_for_new_contents,
125 bool should_replace_current_entry, 124 bool should_replace_current_entry,
126 bool user_gesture) {} 125 bool user_gesture) {}
127 126
128 // The RenderFrameHostImpl wants to transfer the request to a new renderer. 127 // The RenderFrameHostImpl wants to transfer the request to a new renderer.
129 // |redirect_chain| contains any redirect URLs (excluding |url|) that happened 128 // |redirect_chain| contains any redirect URLs (excluding |url|) that happened
130 // before the transfer. If |method| is "POST", then |post_body| needs to 129 // before the transfer. If |method| is "POST", then |post_body| needs to
131 // specify the request body, otherwise |post_body| should be null. 130 // specify the request body, otherwise |post_body| should be null.
132 virtual void RequestTransferURL( 131 virtual void RequestTransferURL(
133 RenderFrameHostImpl* render_frame_host, 132 RenderFrameHostImpl* render_frame_host,
134 const GURL& url, 133 const GURL& url,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // cancelled. 168 // cancelled.
170 virtual void CancelNavigation(FrameTreeNode* frame_tree_node, 169 virtual void CancelNavigation(FrameTreeNode* frame_tree_node,
171 bool inform_renderer) {} 170 bool inform_renderer) {}
172 171
173 // Called when the network stack started handling the navigation request 172 // Called when the network stack started handling the navigation request
174 // so that the |timestamp| when it happened can be recorded into an histogram. 173 // so that the |timestamp| when it happened can be recorded into an histogram.
175 // The |url| is used to verify we're tracking the correct navigation. 174 // The |url| is used to verify we're tracking the correct navigation.
176 // TODO(carlosk): once PlzNavigate is the only navigation implementation 175 // TODO(carlosk): once PlzNavigate is the only navigation implementation
177 // remove the URL parameter and rename this method to better suit its naming 176 // remove the URL parameter and rename this method to better suit its naming
178 // conventions. 177 // conventions.
179 virtual void LogResourceRequestTime( 178 virtual void LogResourceRequestTime(base::TimeTicks timestamp,
180 base::TimeTicks timestamp, const GURL& url) {}; 179 const GURL& url) {}
181 180
182 // Called to record the time it took to execute the before unload hook for the 181 // Called to record the time it took to execute the before unload hook for the
183 // current navigation. 182 // current navigation.
184 virtual void LogBeforeUnloadTime( 183 virtual void LogBeforeUnloadTime(
185 const base::TimeTicks& renderer_before_unload_start_time, 184 const base::TimeTicks& renderer_before_unload_start_time,
186 const base::TimeTicks& renderer_before_unload_end_time) {} 185 const base::TimeTicks& renderer_before_unload_end_time) {}
187 186
188 // Called when a navigation has failed or the response is 204/205 to discard 187 // Called when a navigation has failed or the response is 204/205 to discard
189 // the pending entry in order to avoid url spoofs. |expected_pending_entry_id| 188 // the pending entry in order to avoid url spoofs. |expected_pending_entry_id|
190 // is the ID of the pending NavigationEntry at the start of the navigation. 189 // is the ID of the pending NavigationEntry at the start of the navigation.
191 // With sufficiently bad interleaving of IPCs, this may no longer be the 190 // With sufficiently bad interleaving of IPCs, this may no longer be the
192 // pending NavigationEntry, in which case the pending NavigationEntry will not 191 // pending NavigationEntry, in which case the pending NavigationEntry will not
193 // be discarded. 192 // be discarded.
194 virtual void DiscardPendingEntryIfNeeded(int expected_pending_entry_id) {} 193 virtual void DiscardPendingEntryIfNeeded(int expected_pending_entry_id) {}
195 194
196 protected: 195 protected:
197 friend class base::RefCounted<Navigator>; 196 friend class base::RefCounted<Navigator>;
198 virtual ~Navigator() {} 197 virtual ~Navigator() {}
199 }; 198 };
200 199
201 } // namespace content 200 } // namespace content
202 201
203 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 202 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/windows.json ('k') | content/browser/frame_host/navigator_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698