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

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

Issue 1414723008: Add a way to cancel deferred navigations in NavigationHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "content/public/browser/navigation_throttle.h" 9 #include "content/public/browser/navigation_throttle.h"
10 #include "content/public/common/referrer.h" 10 #include "content/public/common/referrer.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // (distinguished by |IsErrorPage|), and false for errors that leave the user 86 // (distinguished by |IsErrorPage|), and false for errors that leave the user
87 // on the previous page. 87 // on the previous page.
88 virtual bool HasCommitted() = 0; 88 virtual bool HasCommitted() = 0;
89 89
90 // Whether the navigation resulted in an error page. 90 // Whether the navigation resulted in an error page.
91 virtual bool IsErrorPage() = 0; 91 virtual bool IsErrorPage() = 0;
92 92
93 // Resumes a navigation that was previously deferred by a NavigationThrottle. 93 // Resumes a navigation that was previously deferred by a NavigationThrottle.
94 virtual void Resume() = 0; 94 virtual void Resume() = 0;
95 95
96 // Cancels a navigation that was previously paused by a NavigationThrottle.
97 // If |ignore| is true, the issuer will act as if the request was never
nasko 2015/11/04 22:44:27 Issuer of the cancellation or of the navigation?
clamy 2015/11/05 15:52:24 Changed this comment following the change of argum
98 // issued.
99 virtual void CancelDeferredNavigation(bool ignore) = 0;
100
96 // Testing methods ---------------------------------------------------------- 101 // Testing methods ----------------------------------------------------------
97 // 102 //
98 // The following methods should be used exclusively for writing unit tests. 103 // The following methods should be used exclusively for writing unit tests.
99 104
100 static scoped_ptr<NavigationHandle> CreateNavigationHandleForTesting( 105 static scoped_ptr<NavigationHandle> CreateNavigationHandleForTesting(
101 const GURL& url, 106 const GURL& url,
102 RenderFrameHost* render_frame_host); 107 RenderFrameHost* render_frame_host);
103 108
104 // Registers a NavigationThrottle for tests. The throttle can 109 // Registers a NavigationThrottle for tests. The throttle can
105 // modify the request, pause the request or cancel the request. This will 110 // modify the request, pause the request or cancel the request. This will
(...skipping 17 matching lines...) Expand all
123 virtual NavigationThrottle::ThrottleCheckResult 128 virtual NavigationThrottle::ThrottleCheckResult
124 CallWillRedirectRequestForTesting(const GURL& new_url, 129 CallWillRedirectRequestForTesting(const GURL& new_url,
125 bool new_method_is_post, 130 bool new_method_is_post,
126 const GURL& new_referrer_url, 131 const GURL& new_referrer_url,
127 bool new_is_external_protocol) = 0; 132 bool new_is_external_protocol) = 0;
128 }; 133 };
129 134
130 } // namespace content 135 } // namespace content
131 136
132 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 137 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698