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 <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <utility> | 11 #include <utility> |
10 | 12 |
11 #include "base/basictypes.h" | |
12 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
14 | 15 |
15 // ID used by Instant code to refer to objects (e.g. Autocomplete results, Most | 16 // ID used by Instant code to refer to objects (e.g. Autocomplete results, Most |
16 // Visited items) that the Instant page needs access to. | 17 // Visited items) that the Instant page needs access to. |
17 typedef int InstantRestrictedID; | 18 typedef int InstantRestrictedID; |
18 | 19 |
19 // A wrapper to hold Instant suggested text and its metadata. Used to tell the | 20 // A wrapper to hold Instant suggested text and its metadata. Used to tell the |
20 // server what suggestion to prefetch. | 21 // server what suggestion to prefetch. |
21 struct InstantSuggestion { | 22 struct InstantSuggestion { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 55 |
55 // The RGBA color components for the text and links of the theme. | 56 // The RGBA color components for the text and links of the theme. |
56 struct RGBAColor { | 57 struct RGBAColor { |
57 RGBAColor(); | 58 RGBAColor(); |
58 ~RGBAColor(); | 59 ~RGBAColor(); |
59 | 60 |
60 bool operator==(const RGBAColor& rhs) const; | 61 bool operator==(const RGBAColor& rhs) const; |
61 | 62 |
62 // The color in RGBA format where the R, G, B and A values | 63 // The color in RGBA format where the R, G, B and A values |
63 // are between 0 and 255 inclusive and always valid. | 64 // are between 0 and 255 inclusive and always valid. |
64 uint8 r; | 65 uint8_t r; |
65 uint8 g; | 66 uint8_t g; |
66 uint8 b; | 67 uint8_t b; |
67 uint8 a; | 68 uint8_t a; |
68 }; | 69 }; |
69 | 70 |
70 // Theme background settings for the NTP. | 71 // Theme background settings for the NTP. |
71 struct ThemeBackgroundInfo { | 72 struct ThemeBackgroundInfo { |
72 ThemeBackgroundInfo(); | 73 ThemeBackgroundInfo(); |
73 ~ThemeBackgroundInfo(); | 74 ~ThemeBackgroundInfo(); |
74 | 75 |
75 bool operator==(const ThemeBackgroundInfo& rhs) const; | 76 bool operator==(const ThemeBackgroundInfo& rhs) const; |
76 | 77 |
77 // True if the default theme is selected. | 78 // True if the default theme is selected. |
(...skipping 27 matching lines...) Expand all Loading... |
105 | 106 |
106 // The theme background image vertical alignment is only valid if |theme_id| | 107 // The theme background image vertical alignment is only valid if |theme_id| |
107 // is valid. | 108 // is valid. |
108 ThemeBackgroundImageAlignment image_vertical_alignment; | 109 ThemeBackgroundImageAlignment image_vertical_alignment; |
109 | 110 |
110 // The theme background image tiling is only valid if |theme_id| is valid. | 111 // The theme background image tiling is only valid if |theme_id| is valid. |
111 ThemeBackgroundImageTiling image_tiling; | 112 ThemeBackgroundImageTiling image_tiling; |
112 | 113 |
113 // The theme background image height. | 114 // The theme background image height. |
114 // Value is only valid if |theme_id| is valid. | 115 // Value is only valid if |theme_id| is valid. |
115 uint16 image_height; | 116 uint16_t image_height; |
116 | 117 |
117 // True if theme has attribution logo. | 118 // True if theme has attribution logo. |
118 // Value is only valid if |theme_id| is valid. | 119 // Value is only valid if |theme_id| is valid. |
119 bool has_attribution; | 120 bool has_attribution; |
120 | 121 |
121 // True if theme has an alternate logo. | 122 // True if theme has an alternate logo. |
122 bool logo_alternate; | 123 bool logo_alternate; |
123 }; | 124 }; |
124 | 125 |
125 struct InstantMostVisitedItem { | 126 struct InstantMostVisitedItem { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 183 |
183 // The optional assisted query stats, aka AQS, used for logging purposes. | 184 // The optional assisted query stats, aka AQS, used for logging purposes. |
184 // This string contains impressions of all autocomplete matches shown | 185 // This string contains impressions of all autocomplete matches shown |
185 // at the query submission time. For privacy reasons, we require the | 186 // at the query submission time. For privacy reasons, we require the |
186 // search provider to support HTTPS protocol in order to receive the AQS | 187 // search provider to support HTTPS protocol in order to receive the AQS |
187 // param. | 188 // param. |
188 // For more details, see http://goto.google.com/binary-clients-logging. | 189 // For more details, see http://goto.google.com/binary-clients-logging. |
189 base::string16 assisted_query_stats; | 190 base::string16 assisted_query_stats; |
190 }; | 191 }; |
191 #endif // CHROME_COMMON_INSTANT_TYPES_H_ | 192 #endif // CHROME_COMMON_INSTANT_TYPES_H_ |
OLD | NEW |