Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: content/common/frame_message_enums.h

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Rebase. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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,
34 44
35 // Last guard value, so we can use it for validity checks. 45 // Last guard value, so we can use it for validity checks.
36 NAVIGATE_TYPE_LAST = NORMAL, 46 NAVIGATE_TYPE_LAST = DIFFERENT_DOCUMENT,
37 }; 47 };
48
49 static bool IsReload(Value value) {
50 return value == RELOAD || value == RELOAD_BYPASSING_CACHE ||
51 value == RELOAD_ORIGINAL_REQUEST_URL;
52 }
53
54 static bool IsSameDocument(Value value) {
55 return value == SAME_DOCUMENT || value == HISTORY_SAME_DOCUMENT;
56 }
57
58 static bool IsHistory(Value value) {
59 return value == HISTORY_SAME_DOCUMENT ||
60 value == HISTORY_DIFFERENT_DOCUMENT;
61 }
38 }; 62 };
39 63
40 struct FrameMsg_UILoadMetricsReportType { 64 struct FrameMsg_UILoadMetricsReportType {
41 public: 65 public:
42 enum Value { 66 enum Value {
43 // Do not report metrics for this load. 67 // Do not report metrics for this load.
44 NO_REPORT, 68 NO_REPORT,
45 69
46 // Report metrics for this load, that originated from clicking on a link. 70 // Report metrics for this load, that originated from clicking on a link.
47 REPORT_LINK, 71 REPORT_LINK,
48 72
49 // Report metrics for this load, that originated from an Android OS intent. 73 // Report metrics for this load, that originated from an Android OS intent.
50 REPORT_INTENT, 74 REPORT_INTENT,
51 75
52 REPORT_TYPE_LAST = REPORT_INTENT, 76 REPORT_TYPE_LAST = REPORT_INTENT,
53 }; 77 };
54 }; 78 };
55 79
56 #endif // CONTENT_COMMON_FRAME_MESSAGE_ENUMS_H_ 80 #endif // CONTENT_COMMON_FRAME_MESSAGE_ENUMS_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698