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_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
25 #include "ui/gfx/rect.h" | 25 #include "ui/gfx/rect.h" |
26 | 26 |
27 struct AutocompleteMatch; | 27 struct AutocompleteMatch; |
28 class AutocompleteProvider; | 28 class AutocompleteProvider; |
29 class InstantLoader; | 29 class InstantLoader; |
30 class PrefService; | 30 class PrefService; |
31 class Profile; | 31 class Profile; |
32 class TabContents; | 32 class TabContents; |
33 class TemplateURL; | 33 class TemplateURL; |
| 34 struct ThemeBackgroundInfo; |
34 | 35 |
35 namespace chrome { | 36 namespace chrome { |
36 class BrowserInstantController; | 37 class BrowserInstantController; |
37 } | 38 } |
38 | 39 |
39 // InstantController maintains a WebContents that is intended to give a | 40 // InstantController maintains a WebContents that is intended to give a |
40 // preview of search results. InstantController is owned by Browser via | 41 // preview of search results. InstantController is owned by Browser via |
41 // BrowserInstantController. | 42 // BrowserInstantController. |
42 // | 43 // |
43 // At any time the WebContents maintained by InstantController may be hidden | 44 // At any time the WebContents maintained by InstantController may be hidden |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 void OnAutocompleteLostFocus(gfx::NativeView view_gaining_focus); | 130 void OnAutocompleteLostFocus(gfx::NativeView view_gaining_focus); |
130 | 131 |
131 // The autocomplete edit has gained focus. Preload the Instant URL of the | 132 // The autocomplete edit has gained focus. Preload the Instant URL of the |
132 // default search engine, in anticipation of the user typing a query. | 133 // default search engine, in anticipation of the user typing a query. |
133 void OnAutocompleteGotFocus(); | 134 void OnAutocompleteGotFocus(); |
134 | 135 |
135 // The search mode in the active tab has changed. Pass the message down to | 136 // The search mode in the active tab has changed. Pass the message down to |
136 // the loader which will notify the renderer. | 137 // the loader which will notify the renderer. |
137 void OnActiveTabModeChanged(chrome::search::Mode new_mode); | 138 void OnActiveTabModeChanged(chrome::search::Mode new_mode); |
138 | 139 |
| 140 // The theme has changed. Pass the message down to the loader which will |
| 141 // notify the renderer. |
| 142 void OnThemeChanged(const ThemeBackgroundInfo& theme_info); |
| 143 |
| 144 // The theme area height has changed. Pass the message down to the loader |
| 145 // which will notify the renderer. |
| 146 void OnThemeAreaHeightChanged(int height); |
| 147 |
139 // Returns whether the preview will be committed when the mouse or touch | 148 // Returns whether the preview will be committed when the mouse or touch |
140 // pointer is released. | 149 // pointer is released. |
141 bool commit_on_pointer_release() const; | 150 bool commit_on_pointer_release() const; |
142 | 151 |
143 // Returns the transition type of the last AutocompleteMatch passed to Update. | 152 // Returns the transition type of the last AutocompleteMatch passed to Update. |
144 content::PageTransition last_transition_type() const { | 153 content::PageTransition last_transition_type() const { |
145 return last_transition_type_; | 154 return last_transition_type_; |
146 } | 155 } |
147 | 156 |
148 const InstantModel* model() const { return &model_; } | 157 const InstantModel* model() const { return &model_; } |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 293 |
285 // The timestamp at which query editing began. This value is used when the | 294 // The timestamp at which query editing began. This value is used when the |
286 // first set of suggestions is processed and cleared when the overlay is | 295 // first set of suggestions is processed and cleared when the overlay is |
287 // hidden. | 296 // hidden. |
288 base::Time first_interaction_time_; | 297 base::Time first_interaction_time_; |
289 | 298 |
290 DISALLOW_COPY_AND_ASSIGN(InstantController); | 299 DISALLOW_COPY_AND_ASSIGN(InstantController); |
291 }; | 300 }; |
292 | 301 |
293 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 302 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
OLD | NEW |