| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 INSTANT_SIZE_PERCENT, | 123 INSTANT_SIZE_PERCENT, |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 // The alignment of the theme background image. | 126 // The alignment of the theme background image. |
| 127 enum ThemeBackgroundImageAlignment { | 127 enum ThemeBackgroundImageAlignment { |
| 128 THEME_BKGRND_IMAGE_ALIGN_CENTER, | 128 THEME_BKGRND_IMAGE_ALIGN_CENTER, |
| 129 THEME_BKGRND_IMAGE_ALIGN_LEFT, | 129 THEME_BKGRND_IMAGE_ALIGN_LEFT, |
| 130 THEME_BKGRND_IMAGE_ALIGN_TOP, | 130 THEME_BKGRND_IMAGE_ALIGN_TOP, |
| 131 THEME_BKGRND_IMAGE_ALIGN_RIGHT, | 131 THEME_BKGRND_IMAGE_ALIGN_RIGHT, |
| 132 THEME_BKGRND_IMAGE_ALIGN_BOTTOM, | 132 THEME_BKGRND_IMAGE_ALIGN_BOTTOM, |
| 133 THEME_BKGRND_INVALID_ALIGNMENT, |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 // The tiling of the theme background image. | 136 // The tiling of the theme background image. |
| 136 enum ThemeBackgroundImageTiling { | 137 enum ThemeBackgroundImageTiling { |
| 137 THEME_BKGRND_IMAGE_NO_REPEAT, | 138 THEME_BKGRND_IMAGE_NO_REPEAT, |
| 138 THEME_BKGRND_IMAGE_REPEAT_X, | 139 THEME_BKGRND_IMAGE_REPEAT_X, |
| 139 THEME_BKGRND_IMAGE_REPEAT_Y, | 140 THEME_BKGRND_IMAGE_REPEAT_Y, |
| 140 THEME_BKGRND_IMAGE_REPEAT, | 141 THEME_BKGRND_IMAGE_REPEAT, |
| 142 THEME_BKGRND_INVALID_REPEAT, |
| 141 }; | 143 }; |
| 142 | 144 |
| 143 struct ThemeBackgroundInfo { | 145 struct ThemeBackgroundInfo { |
| 144 ThemeBackgroundInfo(); | 146 ThemeBackgroundInfo(); |
| 145 ~ThemeBackgroundInfo(); | 147 ~ThemeBackgroundInfo(); |
| 146 | 148 |
| 149 void Initialize(); |
| 150 bool IsValid() const; |
| 151 bool operator==(const ThemeBackgroundInfo& rhs) const; |
| 152 |
| 147 // The theme background color in RGBA format where the R, G, B and A values | 153 // The theme background color in RGBA format where the R, G, B and A values |
| 148 // are between 0 and 255 inclusive and always valid. | 154 // are between 0 and 255 inclusive and always valid. |
| 149 int color_r; | 155 int color_r; |
| 150 int color_g; | 156 int color_g; |
| 151 int color_b; | 157 int color_b; |
| 152 int color_a; | 158 int color_a; |
| 153 | 159 |
| 154 // The theme id for the theme background image. | 160 // The theme id for the theme background image. |
| 155 // Value is only valid if there's a custom theme background image. | 161 // Value is only valid if there's a custom theme background image. |
| 156 std::string theme_id; | 162 std::string theme_id; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 182 // The title of the Most Visited page. May be empty, in which case the |url| | 188 // The title of the Most Visited page. May be empty, in which case the |url| |
| 183 // is used as the title. | 189 // is used as the title. |
| 184 string16 title; | 190 string16 title; |
| 185 }; | 191 }; |
| 186 | 192 |
| 187 // An InstantMostVisitedItem along with its assigned restricted ID. | 193 // An InstantMostVisitedItem along with its assigned restricted ID. |
| 188 typedef std::pair<InstantRestrictedID, InstantMostVisitedItem> | 194 typedef std::pair<InstantRestrictedID, InstantMostVisitedItem> |
| 189 InstantMostVisitedItemIDPair; | 195 InstantMostVisitedItemIDPair; |
| 190 | 196 |
| 191 #endif // CHROME_COMMON_INSTANT_TYPES_H_ | 197 #endif // CHROME_COMMON_INSTANT_TYPES_H_ |
| OLD | NEW |