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_COMMON_FRAME_MESSAGE_ENUMS_H_ | 5 #ifndef CONTENT_COMMON_FRAME_MESSAGE_ENUMS_H_ |
6 #define CONTENT_COMMON_FRAME_MESSAGE_ENUMS_H_ | 6 #define CONTENT_COMMON_FRAME_MESSAGE_ENUMS_H_ |
7 | 7 |
8 #include "content/common/accessibility_mode_enums.h" | 8 #include "content/common/accessibility_mode_enums.h" |
9 | 9 |
10 struct FrameMsg_Navigate_Type { | 10 struct FrameMsg_Navigate_Type { |
(...skipping 11 matching lines...) Expand all Loading... |
22 // The navigation is the result of session restore and should honor the | 22 // The navigation is the result of session restore and should honor the |
23 // page's cache policy while restoring form state. This is set to true if | 23 // page's cache policy while restoring form state. This is set to true if |
24 // restoring a tab/session from the previous session and the previous | 24 // restoring a tab/session from the previous session and the previous |
25 // session did not crash. If this is not set and the page was restored then | 25 // session did not crash. If this is not set and the page was restored then |
26 // the page's cache policy is ignored and we load from the cache. | 26 // the page's cache policy is ignored and we load from the cache. |
27 RESTORE, | 27 RESTORE, |
28 | 28 |
29 // Like RESTORE, except that the navigation contains POST data. | 29 // Like RESTORE, except that the navigation contains POST data. |
30 RESTORE_WITH_POST, | 30 RESTORE_WITH_POST, |
31 | 31 |
32 // Navigation type not categorized by the other types. | 32 // History navigation inside the same document. |
33 NORMAL, | 33 HISTORY_SAME_DOCUMENT, |
| 34 |
| 35 // History navigation to a different document. |
| 36 HISTORY_DIFFERENT_DOCUMENT, |
| 37 |
| 38 // Navigation inside the same document. It occurs when the part of the url |
| 39 // that is modified is after the '#' part. |
| 40 SAME_DOCUMENT, |
| 41 |
| 42 // Navigation to another document. |
| 43 DIFFERENT_DOCUMENT, |
| 44 |
| 45 // Used as a default value. Can be used to assert that the navigation |
| 46 // classification has been done. |
| 47 UNSPECIFIED, |
34 | 48 |
35 // Last guard value, so we can use it for validity checks. | 49 // Last guard value, so we can use it for validity checks. |
36 NAVIGATE_TYPE_LAST = NORMAL, | 50 NAVIGATE_TYPE_LAST = UNSPECIFIED, |
37 }; | 51 }; |
| 52 |
| 53 static bool IsReload(Value value) { |
| 54 return value == RELOAD || value == RELOAD_BYPASSING_CACHE || |
| 55 value == RELOAD_ORIGINAL_REQUEST_URL; |
| 56 } |
| 57 |
| 58 static bool IsSameDocument(Value value) { |
| 59 return value == SAME_DOCUMENT || value == HISTORY_SAME_DOCUMENT; |
| 60 } |
| 61 |
| 62 static bool IsHistory(Value value) { |
| 63 return value == HISTORY_SAME_DOCUMENT || |
| 64 value == HISTORY_DIFFERENT_DOCUMENT; |
| 65 } |
38 }; | 66 }; |
39 | 67 |
40 struct FrameMsg_UILoadMetricsReportType { | 68 struct FrameMsg_UILoadMetricsReportType { |
41 public: | 69 public: |
42 enum Value { | 70 enum Value { |
43 // Do not report metrics for this load. | 71 // Do not report metrics for this load. |
44 NO_REPORT, | 72 NO_REPORT, |
45 | 73 |
46 // Report metrics for this load, that originated from clicking on a link. | 74 // Report metrics for this load, that originated from clicking on a link. |
47 REPORT_LINK, | 75 REPORT_LINK, |
48 | 76 |
49 // Report metrics for this load, that originated from an Android OS intent. | 77 // Report metrics for this load, that originated from an Android OS intent. |
50 REPORT_INTENT, | 78 REPORT_INTENT, |
51 | 79 |
52 REPORT_TYPE_LAST = REPORT_INTENT, | 80 REPORT_TYPE_LAST = REPORT_INTENT, |
53 }; | 81 }; |
54 }; | 82 }; |
55 | 83 |
56 #endif // CONTENT_COMMON_FRAME_MESSAGE_ENUMS_H_ | 84 #endif // CONTENT_COMMON_FRAME_MESSAGE_ENUMS_H_ |
OLD | NEW |