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 CONTENT_COMMON_PAGE_TRANSITION_TYPES_H_ | 5 #ifndef CONTENT_COMMON_PAGE_TRANSITION_TYPES_H_ |
6 #define CONTENT_COMMON_PAGE_TRANSITION_TYPES_H_ | 6 #define CONTENT_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 |
11 // This class is for scoping only. | 11 // This class is for scoping only. |
12 class PageTransition { | 12 class PageTransition { |
13 public: | 13 public: |
14 // Types of transitions between pages. These are stored in the history | 14 // Types of transitions between pages. These are stored in the history |
15 // database to separate visits, and are reported by the renderer for page | 15 // database to separate visits, and are reported by the renderer for page |
16 // navigations. | 16 // navigations. |
17 // | 17 // |
18 // WARNING: don't change these numbers. They are written directly into the | 18 // WARNING: don't change these numbers. They are written directly into the |
19 // history database, so future versions will need the same values to match | 19 // history database, so future versions will need the same values to match |
20 // the enums. | 20 // the enums. |
21 // | 21 // |
22 // A type is made of a core value and a set of qualifiers. A type has one | 22 // A type is made of a core value and a set of qualifiers. A type has one |
23 // core value and 0 or or more qualifiers. | 23 // core value and 0 or or more qualifiers. |
24 enum { | 24 enum TypeEnum { |
25 // User got to this page by clicking a link on another page. | 25 // User got to this page by clicking a link on another page. |
26 LINK = 0, | 26 LINK = 0, |
27 | 27 |
28 // User got this page by typing the URL in the URL bar. This should not be | 28 // User got this page by typing the URL in the URL bar. This should not be |
29 // used for cases where the user selected a choice that didn't look at all | 29 // used for cases where the user selected a choice that didn't look at all |
30 // like a URL; see GENERATED below. | 30 // like a URL; see GENERATED below. |
31 // | 31 // |
32 // We also use this for other "explicit" navigation actions. | 32 // We also use this for other "explicit" navigation actions. |
33 TYPED = 1, | 33 TYPED = 1, |
34 | 34 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // Return the qualifier | 156 // Return the qualifier |
157 static int32 GetQualifier(Type type) { | 157 static int32 GetQualifier(Type type) { |
158 return type & QUALIFIER_MASK; | 158 return type & QUALIFIER_MASK; |
159 } | 159 } |
160 | 160 |
161 // Return a string version of the core type values. | 161 // Return a string version of the core type values. |
162 static const char* CoreTransitionString(Type type); | 162 static const char* CoreTransitionString(Type type); |
163 }; | 163 }; |
164 | 164 |
165 #endif // CONTENT_COMMON_PAGE_TRANSITION_TYPES_H_ | 165 #endif // CONTENT_COMMON_PAGE_TRANSITION_TYPES_H_ |
OLD | NEW |