OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_COMMON_PAGE_TRANSITION_TYPES_H__ | 5 #ifndef CHROME_COMMON_PAGE_TRANSITION_TYPES_H__ |
6 #define CHROME_COMMON_PAGE_TRANSITION_TYPES_H__ | 6 #define CHROME_COMMON_PAGE_TRANSITION_TYPES_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 // ADDING NEW CORE VALUE? Be sure to update the LAST_CORE and CORE_MASK | 96 // ADDING NEW CORE VALUE? Be sure to update the LAST_CORE and CORE_MASK |
97 // values below. Also update CoreTransitionString(). | 97 // values below. Also update CoreTransitionString(). |
98 LAST_CORE = KEYWORD_GENERATED, | 98 LAST_CORE = KEYWORD_GENERATED, |
99 CORE_MASK = 0xFF, | 99 CORE_MASK = 0xFF, |
100 | 100 |
101 // Qualifiers | 101 // Qualifiers |
102 // Any of the core values above can be augmented by one or more qualifiers. | 102 // Any of the core values above can be augmented by one or more qualifiers. |
103 // These qualifiers further define the transition. | 103 // These qualifiers further define the transition. |
104 | 104 |
| 105 // User used the Forward or Back button to navigate among browsing history. |
| 106 FORWARD_BACK = 0x01000000, |
| 107 |
105 // The beginning of a navigation chain. | 108 // The beginning of a navigation chain. |
106 CHAIN_START = 0x10000000, | 109 CHAIN_START = 0x10000000, |
107 | 110 |
108 // The last transition in a redirect chain. | 111 // The last transition in a redirect chain. |
109 CHAIN_END = 0x20000000, | 112 CHAIN_END = 0x20000000, |
110 | 113 |
111 // Redirects caused by JavaScript or a meta refresh tag on the page. | 114 // Redirects caused by JavaScript or a meta refresh tag on the page. |
112 CLIENT_REDIRECT = 0x40000000, | 115 CLIENT_REDIRECT = 0x40000000, |
113 | 116 |
114 // Redirects sent from the server by HTTP headers. It might be nice to | 117 // Redirects sent from the server by HTTP headers. It might be nice to |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 return static_cast<Type>(type & ~QUALIFIER_MASK); | 153 return static_cast<Type>(type & ~QUALIFIER_MASK); |
151 } | 154 } |
152 | 155 |
153 // Return the qualifier | 156 // Return the qualifier |
154 static int32 GetQualifier(Type type) { | 157 static int32 GetQualifier(Type type) { |
155 return type & QUALIFIER_MASK; | 158 return type & QUALIFIER_MASK; |
156 } | 159 } |
157 | 160 |
158 // Return a string version of the core type values. | 161 // Return a string version of the core type values. |
159 static const char* CoreTransitionString(Type type); | 162 static const char* CoreTransitionString(Type type); |
| 163 |
| 164 // Return a string version of the qualifier type values. |
| 165 static const char* QualifierString(Type type); |
160 }; | 166 }; |
161 | 167 |
162 #endif // CHROME_COMMON_PAGE_TRANSITION_TYPES_H__ | 168 #endif // CHROME_COMMON_PAGE_TRANSITION_TYPES_H__ |
OLD | NEW |