OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_INSTANT_TYPES_H_ | 5 #ifndef CHROME_COMMON_INSTANT_TYPES_H_ |
6 #define CHROME_COMMON_INSTANT_TYPES_H_ | 6 #define CHROME_COMMON_INSTANT_TYPES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "content/public/common/page_transition_types.h" |
11 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
12 | 13 |
13 // Ways that the Instant suggested text is autocompleted into the omnibox. | 14 // Ways that the Instant suggested text is autocompleted into the omnibox. |
14 enum InstantCompleteBehavior { | 15 enum InstantCompleteBehavior { |
15 // Autocomplete the suggestion immediately. | 16 // Autocomplete the suggestion immediately. |
16 INSTANT_COMPLETE_NOW, | 17 INSTANT_COMPLETE_NOW, |
17 | 18 |
18 // Do not autocomplete the suggestion. The suggestion may still be displayed | 19 // Do not autocomplete the suggestion. The suggestion may still be displayed |
19 // in the omnibox, but not made a part of the omnibox text by default (e.g., | 20 // in the omnibox, but not made a part of the omnibox text by default (e.g., |
20 // by displaying the suggestion as non-highlighted, non-selected gray text). | 21 // by displaying the suggestion as non-highlighted, non-selected gray text). |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 57 |
57 // The type of the result, as returned by AutocompleteMatch::TypeToString(). | 58 // The type of the result, as returned by AutocompleteMatch::TypeToString(). |
58 string16 type; | 59 string16 type; |
59 | 60 |
60 // The description (title), same as AutocompleteMatch::description. | 61 // The description (title), same as AutocompleteMatch::description. |
61 string16 description; | 62 string16 description; |
62 | 63 |
63 // The URL of the match, same as AutocompleteMatch::destination_url. | 64 // The URL of the match, same as AutocompleteMatch::destination_url. |
64 string16 destination_url; | 65 string16 destination_url; |
65 | 66 |
| 67 // The transition type to use when the user opens this match. Same as |
| 68 // AutocompleteMatch::transition. |
| 69 content::PageTransition transition; |
| 70 |
66 // The relevance score of this match, same as AutocompleteMatch::relevance. | 71 // The relevance score of this match, same as AutocompleteMatch::relevance. |
67 int relevance; | 72 int relevance; |
68 }; | 73 }; |
69 | 74 |
70 // How to interpret the size (height or width) of the Instant overlay (preview). | 75 // How to interpret the size (height or width) of the Instant overlay (preview). |
71 enum InstantSizeUnits { | 76 enum InstantSizeUnits { |
72 // As an absolute number of pixels. | 77 // As an absolute number of pixels. |
73 INSTANT_SIZE_PIXELS, | 78 INSTANT_SIZE_PIXELS, |
74 | 79 |
75 // As a percentage of the height or width of the containing (parent) view. | 80 // As a percentage of the height or width of the containing (parent) view. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 145 |
141 // The theme background image tiling is only valid if |theme_id| is valid. | 146 // The theme background image tiling is only valid if |theme_id| is valid. |
142 ThemeBackgroundImageTiling image_tiling; | 147 ThemeBackgroundImageTiling image_tiling; |
143 | 148 |
144 // The theme background image height. | 149 // The theme background image height. |
145 // Value is only valid if |theme_id| is valid. | 150 // Value is only valid if |theme_id| is valid. |
146 uint16 image_height; | 151 uint16 image_height; |
147 }; | 152 }; |
148 | 153 |
149 #endif // CHROME_COMMON_INSTANT_TYPES_H_ | 154 #endif // CHROME_COMMON_INSTANT_TYPES_H_ |
OLD | NEW |