OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_ |
6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_ | 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // network error code for the failure. |has_stale_copy_in_cache| is true if | 42 // network error code for the failure. |has_stale_copy_in_cache| is true if |
43 // there is a stale copy of the unreachable page in cache. | 43 // there is a stale copy of the unreachable page in cache. |
44 virtual void OnRequestFailed(bool has_stale_copy_in_cache, int net_error) = 0; | 44 virtual void OnRequestFailed(bool has_stale_copy_in_cache, int net_error) = 0; |
45 | 45 |
46 // Called after the network request has begun on the IO thread at time | 46 // Called after the network request has begun on the IO thread at time |
47 // |timestamp|. This is just a thread hop but is used to compare timing | 47 // |timestamp|. This is just a thread hop but is used to compare timing |
48 // against the pre-PlzNavigate codepath which didn't start the network request | 48 // against the pre-PlzNavigate codepath which didn't start the network request |
49 // until after the renderer was initialized. | 49 // until after the renderer was initialized. |
50 virtual void OnRequestStarted(base::TimeTicks timestamp) = 0; | 50 virtual void OnRequestStarted(base::TimeTicks timestamp) = 0; |
51 | 51 |
| 52 // Called when a ServiceWorker was found for the navigation. |
| 53 virtual void OnServiceWorkerEncountered() = 0; |
| 54 |
52 protected: | 55 protected: |
53 NavigationURLLoaderDelegate() {} | 56 NavigationURLLoaderDelegate() {} |
54 virtual ~NavigationURLLoaderDelegate() {} | 57 virtual ~NavigationURLLoaderDelegate() {} |
55 | 58 |
56 private: | 59 private: |
57 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderDelegate); | 60 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderDelegate); |
58 }; | 61 }; |
59 | 62 |
60 } // namespace content | 63 } // namespace content |
61 | 64 |
62 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_ | 65 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_DELEGATE_H_ |
OLD | NEW |