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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 // Called when a server redirect is received by the navigation. | 49 // Called when a server redirect is received by the navigation. |
50 // | 50 // |
51 // The implementer is responsible for ensuring that the WebContents this | 51 // The implementer is responsible for ensuring that the WebContents this |
52 // throttle is associated with remain alive during the duration of this | 52 // throttle is associated with remain alive during the duration of this |
53 // method. Failing to do so will result in use-after-free bugs. Should the | 53 // method. Failing to do so will result in use-after-free bugs. Should the |
54 // implementer need to destroy the WebContents, it should return CANCEL, | 54 // implementer need to destroy the WebContents, it should return CANCEL, |
55 // CANCEL_AND_IGNORE or DEFER and perform the destruction asynchronously. | 55 // CANCEL_AND_IGNORE or DEFER and perform the destruction asynchronously. |
56 virtual ThrottleCheckResult WillRedirectRequest(); | 56 virtual ThrottleCheckResult WillRedirectRequest(); |
57 | 57 |
| 58 // Called when a response's headers and metadata are available. |
| 59 // |
| 60 // The implementer is responsible for ensuring that the WebContents this |
| 61 // throttle is associated with remain alive during the duration of this |
| 62 // method. Failing to do so will result in use-after-free bugs. Should the |
| 63 // implementer need to destroy the WebContents, it should return CANCEL, |
| 64 // CANCEL_AND_IGNORE and perform the destruction asynchronously. |
| 65 virtual ThrottleCheckResult WillProcessResponse(); |
| 66 |
58 // The NavigationHandle that is tracking the information related to this | 67 // The NavigationHandle that is tracking the information related to this |
59 // navigation. | 68 // navigation. |
60 NavigationHandle* navigation_handle() const { return navigation_handle_; } | 69 NavigationHandle* navigation_handle() const { return navigation_handle_; } |
61 | 70 |
62 private: | 71 private: |
63 NavigationHandle* navigation_handle_; | 72 NavigationHandle* navigation_handle_; |
64 }; | 73 }; |
65 | 74 |
66 } // namespace content | 75 } // namespace content |
67 | 76 |
68 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ | 77 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_ |
OLD | NEW |