OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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> |
| 9 |
8 #include "base/string16.h" | 10 #include "base/string16.h" |
9 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
10 | 12 |
11 // Ways that the Instant suggested text is autocompleted into the omnibox. | 13 // Ways that the Instant suggested text is autocompleted into the omnibox. |
12 enum InstantCompleteBehavior { | 14 enum InstantCompleteBehavior { |
13 // Autocomplete the suggestion immediately. | 15 // Autocomplete the suggestion immediately. |
14 INSTANT_COMPLETE_NOW, | 16 INSTANT_COMPLETE_NOW, |
15 | 17 |
16 // Do not autocomplete the suggestion. The suggestion may still be displayed | 18 // Do not autocomplete the suggestion. The suggestion may still be displayed |
17 // in the omnibox, but not made a part of the omnibox text by default (e.g., | 19 // in the omnibox, but not made a part of the omnibox text by default (e.g., |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 88 |
87 // Query suggestions and search results relevant when the user is typing in | 89 // Query suggestions and search results relevant when the user is typing in |
88 // the omnibox. | 90 // the omnibox. |
89 INSTANT_SHOWN_QUERY_SUGGESTIONS, | 91 INSTANT_SHOWN_QUERY_SUGGESTIONS, |
90 | 92 |
91 // ZeroSuggest suggestions relevant when the user has focused in the omnibox, | 93 // ZeroSuggest suggestions relevant when the user has focused in the omnibox, |
92 // but not yet typed anything. | 94 // but not yet typed anything. |
93 INSTANT_SHOWN_ZERO_SUGGESTIONS, | 95 INSTANT_SHOWN_ZERO_SUGGESTIONS, |
94 }; | 96 }; |
95 | 97 |
| 98 // The alignment of the theme background image. |
| 99 enum ThemeBackgroundImageAlignment { |
| 100 THEME_BKGRND_IMAGE_ALIGN_CENTER, |
| 101 THEME_BKGRND_IMAGE_ALIGN_LEFT, |
| 102 THEME_BKGRND_IMAGE_ALIGN_TOP, |
| 103 THEME_BKGRND_IMAGE_ALIGN_RIGHT, |
| 104 THEME_BKGRND_IMAGE_ALIGN_BOTTOM, |
| 105 }; |
| 106 |
| 107 // The tiling of the theme background image. |
| 108 enum ThemeBackgroundImageTiling { |
| 109 THEME_BKGRND_IMAGE_NO_REPEAT, |
| 110 THEME_BKGRND_IMAGE_REPEAT_X, |
| 111 THEME_BKGRND_IMAGE_REPEAT_Y, |
| 112 THEME_BKGRND_IMAGE_REPEAT, |
| 113 }; |
| 114 |
| 115 struct ThemeBackgroundInfo { |
| 116 ThemeBackgroundInfo(); |
| 117 ~ThemeBackgroundInfo(); |
| 118 |
| 119 // The theme background color in RGBA format where the R, G, B and A values |
| 120 // are between 0 and 255 inclusive and always valid. |
| 121 int color_r; |
| 122 int color_g; |
| 123 int color_b; |
| 124 int color_a; |
| 125 |
| 126 // The theme id for the theme background image. |
| 127 // Value is only valid if there's a custom theme background image. |
| 128 std::string theme_id; |
| 129 |
| 130 // The theme background image horizontal alignment is only valid if |theme_id| |
| 131 // is valid. |
| 132 ThemeBackgroundImageAlignment image_horizontal_alignment; |
| 133 |
| 134 // The theme background image vertical alignment is only valid if |theme_id| |
| 135 // is valid. |
| 136 ThemeBackgroundImageAlignment image_vertical_alignment; |
| 137 |
| 138 // The theme background image tiling is only valid if |theme_id| is valid. |
| 139 ThemeBackgroundImageTiling image_tiling; |
| 140 |
| 141 // The theme background image height. |
| 142 // Value is only valid if |theme_id| is valid. |
| 143 uint16 image_height; |
| 144 }; |
| 145 |
96 #endif // CHROME_COMMON_INSTANT_TYPES_H_ | 146 #endif // CHROME_COMMON_INSTANT_TYPES_H_ |
OLD | NEW |