OLD | NEW |
---|---|
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_THROTTLE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 21 matching lines...) Expand all Loading... | |
32 // Cancels the navigation and makes the requester of the navigation acts | 32 // Cancels the navigation and makes the requester of the navigation acts |
33 // like the request was never made. | 33 // like the request was never made. |
34 CANCEL_AND_IGNORE, | 34 CANCEL_AND_IGNORE, |
35 | 35 |
36 // Blocks a navigation due to rules asserted before the request is made. | 36 // Blocks a navigation due to rules asserted before the request is made. |
37 // This can only be returned from WillStartRequest. This will result in an | 37 // This can only be returned from WillStartRequest. This will result in an |
38 // error page for net::ERR_BLOCKED_BY_CLIENT being loaded in the frame that | 38 // error page for net::ERR_BLOCKED_BY_CLIENT being loaded in the frame that |
39 // is navigated. | 39 // is navigated. |
40 BLOCK_REQUEST, | 40 BLOCK_REQUEST, |
41 | 41 |
42 // Blocks a navigation taking place in a subframe, and collapses the frame | |
43 // owner element in the parent frame (i.e. removes it from the layout). Can | |
44 // be be returned from WillStartRequest or WillRedirectRequest. | |
45 BLOCK_REQUEST_AND_COLLAPSE, | |
clamy
2017/01/18 15:10:55
I'm wondering whether we should add a new Throttle
engedy
2017/01/18 23:37:14
I am fine with either :-). @Nasko, WDYT?
engedy
2017/02/17 18:09:25
On second thought, I think it makes for a better a
| |
46 | |
42 // Blocks a navigation due to rules asserted by a response (for instance, | 47 // Blocks a navigation due to rules asserted by a response (for instance, |
43 // embedding restrictions like 'X-Frame-Options'). This result will only | 48 // embedding restrictions like 'X-Frame-Options'). This result will only |
44 // be returned from WillProcessResponse. | 49 // be returned from WillProcessResponse. |
45 BLOCK_RESPONSE, | 50 BLOCK_RESPONSE, |
46 }; | 51 }; |
47 | 52 |
48 NavigationThrottle(NavigationHandle* navigation_handle); | 53 NavigationThrottle(NavigationHandle* navigation_handle); |
49 virtual ~NavigationThrottle(); | 54 virtual ~NavigationThrottle(); |
50 | 55 |
51 // Called when a network request is about to be made for this navigation. | 56 // Called when a network request is about to be made for this navigation. |
(...skipping 28 matching lines...) Expand all Loading... | |
80 // navigation. | 85 // navigation. |
81 NavigationHandle* navigation_handle() const { return navigation_handle_; } | 86 NavigationHandle* navigation_handle() const { return navigation_handle_; } |
82 | 87 |
83 private: | 88 private: |
84 NavigationHandle* navigation_handle_; | 89 NavigationHandle* navigation_handle_; |
85 }; | 90 }; |
86 | 91 |
87 } // namespace content | 92 } // namespace content |
88 | 93 |
89 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ | 94 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ |
OLD | NEW |