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

Side by Side Diff: chrome/browser/instant/instant_controller.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: fixed to only send ht change when there's theme image 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_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 12 matching lines...) Expand all
23 #include "ui/gfx/native_widget_types.h" 23 #include "ui/gfx/native_widget_types.h"
24 #include "ui/gfx/rect.h" 24 #include "ui/gfx/rect.h"
25 25
26 struct AutocompleteMatch; 26 struct AutocompleteMatch;
27 class AutocompleteProvider; 27 class AutocompleteProvider;
28 class InstantLoader; 28 class InstantLoader;
29 class PrefService; 29 class PrefService;
30 class Profile; 30 class Profile;
31 class TabContents; 31 class TabContents;
32 class TemplateURL; 32 class TemplateURL;
33 struct ThemeBackgroundInfo;
33 34
34 namespace chrome { 35 namespace chrome {
35 class BrowserInstantController; 36 class BrowserInstantController;
36 } 37 }
37 38
38 // InstantController maintains a WebContents that is intended to give a 39 // InstantController maintains a WebContents that is intended to give a
39 // preview of search results. InstantController is owned by Browser via 40 // preview of search results. InstantController is owned by Browser via
40 // BrowserInstantController. 41 // BrowserInstantController.
41 // 42 //
42 // At any time the WebContents maintained by InstantController may be hidden 43 // At any time the WebContents maintained by InstantController may be hidden
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void OnAutocompleteLostFocus(gfx::NativeView view_gaining_focus); 129 void OnAutocompleteLostFocus(gfx::NativeView view_gaining_focus);
129 130
130 // The autocomplete edit has gained focus. Preload the Instant URL of the 131 // The autocomplete edit has gained focus. Preload the Instant URL of the
131 // default search engine, in anticipation of the user typing a query. 132 // default search engine, in anticipation of the user typing a query.
132 void OnAutocompleteGotFocus(); 133 void OnAutocompleteGotFocus();
133 134
134 // The active tab's "NTP status" has changed. Pass the message down to the 135 // The active tab's "NTP status" has changed. Pass the message down to the
135 // loader which will notify the renderer. 136 // loader which will notify the renderer.
136 void OnActiveTabModeChanged(bool active_tab_is_ntp); 137 void OnActiveTabModeChanged(bool active_tab_is_ntp);
137 138
139 // The theme has changed. Pass the message down to the loader which will
140 // notify the renderer.
141 void OnThemeChanged(const ThemeBackgroundInfo& theme_info);
142
143 // The theme area height has changed. Pass the message down to the loader
144 // which will notify the renderer.
145 void OnThemeAreaHeightChanged(int height);
146
138 // Returns whether the preview will be committed when the mouse or touch 147 // Returns whether the preview will be committed when the mouse or touch
139 // pointer is released. 148 // pointer is released.
140 bool commit_on_pointer_release() const; 149 bool commit_on_pointer_release() const;
141 150
142 // Returns the transition type of the last AutocompleteMatch passed to Update. 151 // Returns the transition type of the last AutocompleteMatch passed to Update.
143 content::PageTransition last_transition_type() const { 152 content::PageTransition last_transition_type() const {
144 return last_transition_type_; 153 return last_transition_type_;
145 } 154 }
146 155
147 const InstantModel* model() const { return &model_; } 156 const InstantModel* model() const { return &model_; }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // Search terms extraction (for autocomplete history matches) doesn't work 284 // Search terms extraction (for autocomplete history matches) doesn't work
276 // on Instant URLs. So, whenever the user commits an Instant search, we add 285 // on Instant URLs. So, whenever the user commits an Instant search, we add
277 // an equivalent non-Instant search URL to history, so that the search shows 286 // an equivalent non-Instant search URL to history, so that the search shows
278 // up in autocomplete history matches. 287 // up in autocomplete history matches.
279 GURL url_for_history_; 288 GURL url_for_history_;
280 289
281 DISALLOW_COPY_AND_ASSIGN(InstantController); 290 DISALLOW_COPY_AND_ASSIGN(InstantController);
282 }; 291 };
283 292
284 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 293 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | chrome/common/instant_types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698