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 CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ |
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/optional.h" | 9 #include "base/optional.h" |
10 #include "chrome/common/page_load_metrics/page_load_timing.h" | 10 #include "chrome/common/page_load_metrics/page_load_timing.h" |
11 #include "content/public/browser/navigation_handle.h" | 11 #include "content/public/browser/navigation_handle.h" |
12 #include "third_party/WebKit/public/web/WebInputEvent.h" | 12 #include "third_party/WebKit/public/web/WebInputEvent.h" |
13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
14 | 14 |
15 namespace page_load_metrics { | 15 namespace page_load_metrics { |
16 | 16 |
17 // This enum represents how a page load ends. If the action occurs before the | 17 // This enum represents how a page load ends. If the action occurs before the |
18 // page load finishes (or reaches some point like first paint), then we consider | 18 // page load finishes (or reaches some point like first paint), then we consider |
19 // the load to be aborted. | 19 // the load to be aborted. |
20 enum UserAbortType { | 20 enum UserAbortType { |
21 // Represents no abort. | 21 // Represents no abort. |
22 ABORT_NONE, | 22 ABORT_NONE, |
23 | 23 |
24 // If the user presses reload or shift-reload. | 24 // If the user presses reload or shift-reload. |
25 ABORT_RELOAD, | 25 ABORT_RELOAD, |
26 | 26 |
27 // The user presses the back/forward button. | 27 // The user presses the back/forward button. |
28 ABORT_FORWARD_BACK, | 28 ABORT_FORWARD_BACK, |
29 | 29 |
| 30 // The navigation is replaced with a navigation with the qualifier |
| 31 // ui::PAGE_TRANSITION_CLIENT_REDIRECT, which is caused by Javascript, or the |
| 32 // meta refresh tag. |
| 33 ABORT_CLIENT_REDIRECT, |
| 34 |
30 // If the navigation is replaced by a new navigation. This includes link | 35 // If the navigation is replaced by a new navigation. This includes link |
31 // clicks, typing in the omnibox (not a reload), and form submissions. | 36 // clicks, typing in the omnibox (not a reload), and form submissions. |
32 ABORT_NEW_NAVIGATION, | 37 ABORT_NEW_NAVIGATION, |
33 | 38 |
34 // If the user presses the stop X button. | 39 // If the user presses the stop X button. |
35 ABORT_STOP, | 40 ABORT_STOP, |
36 | 41 |
37 // If the navigation is aborted by closing the tab or browser. | 42 // If the navigation is aborted by closing the tab or browser. |
38 ABORT_CLOSE, | 43 ABORT_CLOSE, |
39 | 44 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // loads that result in downloads or 204s are aborted by the system, and are | 205 // loads that result in downloads or 204s are aborted by the system, and are |
201 // also included as failed provisional loads. | 206 // also included as failed provisional loads. |
202 virtual void OnFailedProvisionalLoad( | 207 virtual void OnFailedProvisionalLoad( |
203 const FailedProvisionalLoadInfo& failed_provisional_load_info, | 208 const FailedProvisionalLoadInfo& failed_provisional_load_info, |
204 const PageLoadExtraInfo& extra_info) {} | 209 const PageLoadExtraInfo& extra_info) {} |
205 }; | 210 }; |
206 | 211 |
207 } // namespace page_load_metrics | 212 } // namespace page_load_metrics |
208 | 213 |
209 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ | 214 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_ |
OLD | NEW |