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

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 and chris's comments 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
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 // Specifies information required for NTP Instant overlay to adopt the browser's
99 // theme.
100 struct ThemeBackgroundInfo {
101 ThemeBackgroundInfo();
102 ~ThemeBackgroundInfo();
103
104 // The theme background color in RGBA format where the R, G, B and A values
105 // are between 0 and 255 inclusive and always valid.
106 int color_r;
107 int color_g;
108 int color_b;
109 int color_a;
palmer 2012/11/19 22:23:20 Wasn't A supposed to be a double between 0 and 1?
kuan 2012/11/20 00:12:44 the original type is an int, which i convert to do
110
111 // The theme id for the theme background image.
112 // Value is only valid if there's a custom theme background image.
113 std::string theme_id;
114
115 // The theme background image alignment is only valid if |theme_id| is valid.
116 int image_alignment;
117
118 // The theme background image tiling is only valid if |theme_id| is valid.
119 int image_tiling;
120
121 // The theme background image height.
122 // Value is only valid if |theme_id| is valid.
123 uint16 image_height;
124 };
125
96 #endif // CHROME_COMMON_INSTANT_TYPES_H_ 126 #endif // CHROME_COMMON_INSTANT_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698