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

Side by Side Diff: content/public/browser/navigation_handle.h

Issue 2413663003: Expose GlobalRequestID in NavigationHandle and ResourceRequestInfo. (Closed)
Patch Set: Add frame map Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string>
9 10
10 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/public/browser/global_request_id.h"
RyanSturm 2016/10/27 22:41:21 nit: can you forward declare this instead?
Not at Google. Contact bengr 2016/10/28 18:43:33 Done.
11 #include "content/public/browser/navigation_throttle.h" 13 #include "content/public/browser/navigation_throttle.h"
12 #include "content/public/common/referrer.h" 14 #include "content/public/common/referrer.h"
13 #include "net/base/net_errors.h" 15 #include "net/base/net_errors.h"
14 #include "ui/base/page_transition_types.h" 16 #include "ui/base/page_transition_types.h"
15 17
16 class GURL; 18 class GURL;
17 19
18 namespace net { 20 namespace net {
19 class HttpResponseHeaders; 21 class HttpResponseHeaders;
20 } // namespace net 22 } // namespace net
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 176
175 // Resumes a navigation that was previously deferred by a NavigationThrottle. 177 // Resumes a navigation that was previously deferred by a NavigationThrottle.
176 virtual void Resume() = 0; 178 virtual void Resume() = 0;
177 179
178 // Cancels a navigation that was previously deferred by a NavigationThrottle. 180 // Cancels a navigation that was previously deferred by a NavigationThrottle.
179 // |result| should be equal to NavigationThrottle::CANCEL or 181 // |result| should be equal to NavigationThrottle::CANCEL or
180 // NavigationThrottle::CANCEL_AND_IGNORE. 182 // NavigationThrottle::CANCEL_AND_IGNORE.
181 virtual void CancelDeferredNavigation( 183 virtual void CancelDeferredNavigation(
182 NavigationThrottle::ThrottleCheckResult result) = 0; 184 NavigationThrottle::ThrottleCheckResult result) = 0;
183 185
186 virtual bool HasNetworkResponseStarted() const = 0;
187
188 // This is valid after the network response has started. Returns the ID of the
189 // MAIN_FRAME URLRequest associated with this navigation.
190 virtual const GlobalRequestID& GetGlobalRequestID() const = 0;
RyanSturm 2016/10/27 22:41:21 const isn't allowed in content/public for the most
Not at Google. Contact bengr 2016/10/28 18:43:33 Done. There is already a const method in this fi
191
184 // Testing methods ---------------------------------------------------------- 192 // Testing methods ----------------------------------------------------------
185 // 193 //
186 // The following methods should be used exclusively for writing unit tests. 194 // The following methods should be used exclusively for writing unit tests.
187 195
188 static std::unique_ptr<NavigationHandle> CreateNavigationHandleForTesting( 196 static std::unique_ptr<NavigationHandle> CreateNavigationHandleForTesting(
189 const GURL& url, 197 const GURL& url,
190 RenderFrameHost* render_frame_host, 198 RenderFrameHost* render_frame_host,
191 bool committed = false, 199 bool committed = false,
192 net::Error error = net::OK); 200 net::Error error = net::OK);
193 201
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 235
228 // The NavigationData that the embedder returned from 236 // The NavigationData that the embedder returned from
229 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will 237 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will
230 // be a clone of the NavigationData. 238 // be a clone of the NavigationData.
231 virtual NavigationData* GetNavigationData() = 0; 239 virtual NavigationData* GetNavigationData() = 0;
232 }; 240 };
233 241
234 } // namespace content 242 } // namespace content
235 243
236 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 244 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698