| 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 | |
| 108 // The beginning of a navigation chain. | 105 // The beginning of a navigation chain. |
| 109 CHAIN_START = 0x10000000, | 106 CHAIN_START = 0x10000000, |
| 110 | 107 |
| 111 // The last transition in a redirect chain. | 108 // The last transition in a redirect chain. |
| 112 CHAIN_END = 0x20000000, | 109 CHAIN_END = 0x20000000, |
| 113 | 110 |
| 114 // Redirects caused by JavaScript or a meta refresh tag on the page. | 111 // Redirects caused by JavaScript or a meta refresh tag on the page. |
| 115 CLIENT_REDIRECT = 0x40000000, | 112 CLIENT_REDIRECT = 0x40000000, |
| 116 | 113 |
| 117 // Redirects sent from the server by HTTP headers. It might be nice to | 114 // 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... |
| 153 return static_cast<Type>(type & ~QUALIFIER_MASK); | 150 return static_cast<Type>(type & ~QUALIFIER_MASK); |
| 154 } | 151 } |
| 155 | 152 |
| 156 // Return the qualifier | 153 // Return the qualifier |
| 157 static int32 GetQualifier(Type type) { | 154 static int32 GetQualifier(Type type) { |
| 158 return type & QUALIFIER_MASK; | 155 return type & QUALIFIER_MASK; |
| 159 } | 156 } |
| 160 | 157 |
| 161 // Return a string version of the core type values. | 158 // Return a string version of the core type values. |
| 162 static const char* CoreTransitionString(Type type); | 159 static const char* CoreTransitionString(Type type); |
| 163 | |
| 164 // Return a string version of the qualifier type values. | |
| 165 static const char* QualifierString(Type type); | |
| 166 }; | 160 }; |
| 167 | 161 |
| 168 #endif // CHROME_COMMON_PAGE_TRANSITION_TYPES_H__ | 162 #endif // CHROME_COMMON_PAGE_TRANSITION_TYPES_H__ |
| OLD | NEW |