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

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

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: ... and without breaking stuff. Created 3 years, 8 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_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 22 matching lines...) Expand all
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 and also from 37 // This can only be returned from WillStartRequest and also from
38 // WillRedirectRequest when PlzNavigate is enabled. This will result in an 38 // WillRedirectRequest when PlzNavigate is enabled. This will result in an
39 // error page for net::ERR_BLOCKED_BY_CLIENT being loaded in the frame that 39 // error page for net::ERR_BLOCKED_BY_CLIENT being loaded in the frame that
40 // is navigated. 40 // is navigated.
41 BLOCK_REQUEST, 41 BLOCK_REQUEST,
42 42
43 // Blocks a navigation taking place in a subframe, and collapses the frame
44 // owner element in the parent document (i.e. removes it from the layout).
45 // This can only be returned from WillStartRequest, and also from
46 // WillRedirectRequest when PlzNavigate is enabled.
47 BLOCK_REQUEST_AND_COLLAPSE,
48
43 // Blocks a navigation due to rules asserted by a response (for instance, 49 // Blocks a navigation due to rules asserted by a response (for instance,
44 // embedding restrictions like 'X-Frame-Options'). This result will only 50 // embedding restrictions like 'X-Frame-Options'). This result will only
45 // be returned from WillProcessResponse. 51 // be returned from WillProcessResponse.
46 BLOCK_RESPONSE, 52 BLOCK_RESPONSE,
47 }; 53 };
48 54
49 NavigationThrottle(NavigationHandle* navigation_handle); 55 NavigationThrottle(NavigationHandle* navigation_handle);
50 virtual ~NavigationThrottle(); 56 virtual ~NavigationThrottle();
51 57
52 // Called when a network request is about to be made for this navigation. 58 // Called when a network request is about to be made for this navigation.
(...skipping 28 matching lines...) Expand all
81 // navigation. 87 // navigation.
82 NavigationHandle* navigation_handle() const { return navigation_handle_; } 88 NavigationHandle* navigation_handle() const { return navigation_handle_; }
83 89
84 private: 90 private:
85 NavigationHandle* navigation_handle_; 91 NavigationHandle* navigation_handle_;
86 }; 92 };
87 93
88 } // namespace content 94 } // namespace content
89 95
90 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ 96 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698