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

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

Issue 2663333004: Convert dom_distiller::WebContentsMainFrameObserver to use the new navigation callbacks. (Closed)
Patch Set: undo testing change Created 3 years, 10 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 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 #include <string>
10 10
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 virtual const GlobalRequestID& GetGlobalRequestID() = 0; 211 virtual const GlobalRequestID& GetGlobalRequestID() = 0;
212 212
213 // Testing methods ---------------------------------------------------------- 213 // Testing methods ----------------------------------------------------------
214 // 214 //
215 // The following methods should be used exclusively for writing unit tests. 215 // The following methods should be used exclusively for writing unit tests.
216 216
217 static std::unique_ptr<NavigationHandle> CreateNavigationHandleForTesting( 217 static std::unique_ptr<NavigationHandle> CreateNavigationHandleForTesting(
218 const GURL& url, 218 const GURL& url,
219 RenderFrameHost* render_frame_host, 219 RenderFrameHost* render_frame_host,
220 bool committed = false, 220 bool committed = false,
221 net::Error error = net::OK); 221 net::Error error = net::OK,
222 bool is_same_page = false);
222 223
223 // Registers a NavigationThrottle for tests. The throttle can 224 // Registers a NavigationThrottle for tests. The throttle can
224 // modify the request, pause the request or cancel the request. This will 225 // modify the request, pause the request or cancel the request. This will
225 // take ownership of the NavigationThrottle. 226 // take ownership of the NavigationThrottle.
226 // Note: in non-test cases, NavigationThrottles should not be added directly 227 // Note: in non-test cases, NavigationThrottles should not be added directly
227 // but returned by the implementation of 228 // but returned by the implementation of
228 // ContentBrowserClient::CreateThrottlesForNavigation. This ensures proper 229 // ContentBrowserClient::CreateThrottlesForNavigation. This ensures proper
229 // ordering of the throttles. 230 // ordering of the throttles.
230 virtual void RegisterThrottleForTesting( 231 virtual void RegisterThrottleForTesting(
231 std::unique_ptr<NavigationThrottle> navigation_throttle) = 0; 232 std::unique_ptr<NavigationThrottle> navigation_throttle) = 0;
(...skipping 24 matching lines...) Expand all
256 257
257 // The NavigationData that the embedder returned from 258 // The NavigationData that the embedder returned from
258 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will 259 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will
259 // be a clone of the NavigationData. 260 // be a clone of the NavigationData.
260 virtual NavigationData* GetNavigationData() = 0; 261 virtual NavigationData* GetNavigationData() = 0;
261 }; 262 };
262 263
263 } // namespace content 264 } // namespace content
264 265
265 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 266 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698