Chromium Code Reviews| Index: content/common/frame_message_enums.h |
| diff --git a/content/common/frame_message_enums.h b/content/common/frame_message_enums.h |
| index 3d9f84a510f2fcdb3c775c06d1fed12c1f428cdd..42673c3785bea4743ab636f8f052f3a1b7609890 100644 |
| --- a/content/common/frame_message_enums.h |
| +++ b/content/common/frame_message_enums.h |
| @@ -29,12 +29,40 @@ struct FrameMsg_Navigate_Type { |
| // Like RESTORE, except that the navigation contains POST data. |
| RESTORE_WITH_POST, |
| - // Navigation type not categorized by the other types. |
| - NORMAL, |
| + // History navigation inside the same document. |
| + HISTORY_SAME_DOCUMENT, |
| + |
| + // History navigation to a different document. |
| + HISTORY_DIFFERENT_DOCUMENT, |
| + |
| + // Navigation inside the same document. It occurs when the part of the url |
| + // that is modified is after the '#' part. |
| + SAME_DOCUMENT, |
| + |
| + // Navigation to another document. |
| + DIFFERENT_DOCUMENT, |
| + |
| + // Used as a default value. Can be used to assert that the navigation |
| + // classification has been done. |
| + UNSPECIFIED, |
|
nasko
2017/01/23 19:10:13
Can we avoid having such value? We should know the
arthursonzogni
2017/01/24 15:17:04
It is used in the default constructor of CommonNav
nasko
2017/01/24 16:59:35
Using DIFFERENT_DOCUMENT sgtm, since it is the mos
|
| // Last guard value, so we can use it for validity checks. |
| - NAVIGATE_TYPE_LAST = NORMAL, |
| + NAVIGATE_TYPE_LAST = UNSPECIFIED, |
| }; |
| + |
| + static bool IsReload(Value value) { |
| + return value == RELOAD || value == RELOAD_BYPASSING_CACHE || |
| + value == RELOAD_ORIGINAL_REQUEST_URL; |
| + } |
| + |
| + static bool IsSameDocument(Value value) { |
| + return value == SAME_DOCUMENT || value == HISTORY_SAME_DOCUMENT; |
| + } |
| + |
| + static bool IsHistory(Value value) { |
| + return value == HISTORY_SAME_DOCUMENT || |
| + value == HISTORY_DIFFERENT_DOCUMENT; |
| + } |
| }; |
| struct FrameMsg_UILoadMetricsReportType { |