Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/common/instant_types.h

Issue 11413018: alternate ntp: implement searchbox api for instant overlay to adopt themes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed sreeram's comments, fixed to not set theme fields if no theme Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_notification_types.h ('k') | chrome/common/instant_types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « chrome/common/chrome_notification_types.h ('k') | chrome/common/instant_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698