Upstream version 11.39.266.0
[platform/framework/web/crosswalk.git] / src / ui / base / page_transition_types_list.h
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Intentionally no include guards because this file is meant to be included
6 // inside a macro to generate enum values.
7
8 // Types of transitions between pages. These are stored in the history
9 // database to separate visits, and are reported by the renderer for page
10 // navigations.
11 //
12 // WARNING: don't change these numbers. They are written directly into the
13 // history database, so future versions will need the same values to match
14 // the enums.
15 //
16 // A type is made of a core value and a set of qualifiers. A type has one
17 // core value and 0 or or more qualifiers.
18
19 // User got to this page by clicking a link on another page.
20 PAGE_TRANSITION(LINK, 0)
21
22 // User got this page by typing the URL in the URL bar.  This should not be
23 // used for cases where the user selected a choice that didn't look at all
24 // like a URL; see GENERATED below.
25 //
26 // We also use this for other "explicit" navigation actions.
27 PAGE_TRANSITION(TYPED, 1)
28
29 // User got to this page through a suggestion in the UI, for example)
30 // through the destinations page.
31 PAGE_TRANSITION(AUTO_BOOKMARK, 2)
32
33 // This is a subframe navigation. This is any content that is automatically
34 // loaded in a non-toplevel frame. For example, if a page consists of
35 // several frames containing ads, those ad URLs will have this transition
36 // type. The user may not even realize the content in these pages is a
37 // separate frame, so may not care about the URL (see MANUAL below).
38 PAGE_TRANSITION(AUTO_SUBFRAME, 3)
39
40 // For subframe navigations that are explicitly requested by the user and
41 // generate new navigation entries in the back/forward list. These are
42 // probably more important than frames that were automatically loaded in
43 // the background because the user probably cares about the fact that this
44 // link was loaded.
45 PAGE_TRANSITION(MANUAL_SUBFRAME, 4)
46
47 // User got to this page by typing in the URL bar and selecting an entry
48 // that did not look like a URL.  For example, a match might have the URL
49 // of a Google search result page, but appear like "Search Google for ...".
50 // These are not quite the same as TYPED navigations because the user
51 // didn't type or see the destination URL.
52 // See also KEYWORD.
53 PAGE_TRANSITION(GENERATED, 5)
54
55 // This is a toplevel navigation. This is any content that is automatically
56 // loaded in a toplevel frame.  For example, opening a tab to show the ASH
57 // screen saver, opening the devtools window, opening the NTP after the safe
58 // browsing warning, opening web-based dialog boxes are examples of
59 // AUTO_TOPLEVEL navigations.
60 PAGE_TRANSITION(AUTO_TOPLEVEL, 6)
61
62 // The user filled out values in a form and submitted it. NOTE that in
63 // some situations submitting a form does not result in this transition
64 // type. This can happen if the form uses script to submit the contents.
65 PAGE_TRANSITION(FORM_SUBMIT, 7)
66
67 // The user "reloaded" the page, either by hitting the reload button or by
68 // hitting enter in the address bar.  NOTE: This is distinct from the
69 // concept of whether a particular load uses "reload semantics" (i.e.
70 // bypasses cached data).  For this reason, lots of code needs to pass
71 // around the concept of whether a load should be treated as a "reload"
72 // separately from their tracking of this transition type, which is mainly
73 // used for proper scoring for consumers who care about how frequently a
74 // user typed/visited a particular URL.
75 //
76 // SessionRestore and undo tab close use this transition type too.
77 PAGE_TRANSITION(RELOAD, 8)
78
79 // The url was generated from a replaceable keyword other than the default
80 // search provider. If the user types a keyword (which also applies to
81 // tab-to-search) in the omnibox this qualifier is applied to the transition
82 // type of the generated url. TemplateURLModel then may generate an
83 // additional visit with a transition type of KEYWORD_GENERATED against the
84 // url 'http://' + keyword. For example, if you do a tab-to-search against
85 // wikipedia the generated url has a transition qualifer of KEYWORD, and
86 // TemplateURLModel generates a visit for 'wikipedia.org' with a transition
87 // type of KEYWORD_GENERATED.
88 PAGE_TRANSITION(KEYWORD, 9)
89
90 // Corresponds to a visit generated for a keyword. See description of
91 // KEYWORD for more details.
92 PAGE_TRANSITION(KEYWORD_GENERATED, 10)
93
94 // ADDING NEW CORE VALUE? Be sure to update the LAST_CORE and CORE_MASK
95 // values below.  Also update CoreTransitionString().
96 PAGE_TRANSITION(LAST_CORE,   PAGE_TRANSITION_KEYWORD_GENERATED)
97 PAGE_TRANSITION(CORE_MASK, 0xFF)
98
99 // Qualifiers
100 // Any of the core values above can be augmented by one or more qualifiers.
101 // These qualifiers further define the transition.
102
103 // A managed user attempted to visit a URL but was blocked.
104 PAGE_TRANSITION(BLOCKED, 0x00800000)
105
106 // User used the Forward or Back button to navigate among browsing history.
107 PAGE_TRANSITION(FORWARD_BACK, 0x01000000)
108
109 // User used the address bar to trigger this navigation.
110 PAGE_TRANSITION(FROM_ADDRESS_BAR, 0x02000000)
111
112 // User is navigating to the home page.
113 PAGE_TRANSITION(HOME_PAGE, 0x04000000)
114
115 // The transition originated from an external application; the exact definition
116 // of this is embedder dependent.
117 PAGE_TRANSITION(FROM_API, 0x08000000)
118
119 // The beginning of a navigation chain.
120 PAGE_TRANSITION(CHAIN_START, 0x10000000)
121
122 // The last transition in a redirect chain.
123 PAGE_TRANSITION(CHAIN_END, 0x20000000)
124
125 // Redirects caused by JavaScript or a meta refresh tag on the page.
126 PAGE_TRANSITION(CLIENT_REDIRECT, 0x40000000)
127
128 // Redirects sent from the server by HTTP headers. It might be nice to
129 // break this out into 2 types in the future, permanent or temporary, if we
130 // can get that information from WebKit.
131 PAGE_TRANSITION(SERVER_REDIRECT, 0x80000000)
132
133 // Used to test whether a transition involves a redirect.
134 PAGE_TRANSITION(IS_REDIRECT_MASK, 0xC0000000)
135
136 // General mask defining the bits used for the qualifiers.
137 PAGE_TRANSITION(QUALIFIER_MASK, 0xFFFFFF00)