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

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: 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 | « no previous file | chrome/browser/instant/instant_controller.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 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_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 11 matching lines...) Expand all
22 #include "content/public/common/page_transition_types.h" 22 #include "content/public/common/page_transition_types.h"
23 #include "googleurl/src/gurl.h" 23 #include "googleurl/src/gurl.h"
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 TabContents; 30 class TabContents;
31 class TemplateURL; 31 class TemplateURL;
32 struct ThemeBackgroundInfo;
32 33
33 namespace chrome { 34 namespace chrome {
34 class BrowserInstantController; 35 class BrowserInstantController;
35 } 36 }
36 37
37 // InstantController maintains a WebContents that is intended to give a preview 38 // InstantController maintains a WebContents that is intended to give a preview
38 // of search suggestions and results. InstantController is owned by Browser via 39 // of search suggestions and results. InstantController is owned by Browser via
39 // BrowserInstantController. 40 // BrowserInstantController.
40 class InstantController { 41 class InstantController {
41 public: 42 public:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // the loader which will notify the renderer. 92 // the loader which will notify the renderer.
92 void SearchModeChanged(const chrome::search::Mode& old_mode, 93 void SearchModeChanged(const chrome::search::Mode& old_mode,
93 const chrome::search::Mode& new_mode); 94 const chrome::search::Mode& new_mode);
94 95
95 // The user switched tabs. Hide the preview if needed. 96 // The user switched tabs. Hide the preview if needed.
96 void ActiveTabChanged(); 97 void ActiveTabChanged();
97 98
98 // Sets whether Instant should show result previews. 99 // Sets whether Instant should show result previews.
99 void SetInstantEnabled(bool instant_enabled); 100 void SetInstantEnabled(bool instant_enabled);
100 101
102 // The theme has changed. Pass the message down to the loader which will
103 // notify the renderer.
104 void ThemeChanged(const ThemeBackgroundInfo& theme_info);
105
106 // The theme area height has changed. Pass the message down to the loader
107 // which will notify the renderer.
108 void ThemeAreaHeightChanged(int height);
109
101 // Returns the transition type of the last AutocompleteMatch passed to Update. 110 // Returns the transition type of the last AutocompleteMatch passed to Update.
102 content::PageTransition last_transition_type() const { 111 content::PageTransition last_transition_type() const {
103 return last_transition_type_; 112 return last_transition_type_;
104 } 113 }
105 114
106 const InstantModel* model() const { return &model_; } 115 const InstantModel* model() const { return &model_; }
107 116
108 // Invoked by InstantLoader when it has suggested text. 117 // Invoked by InstantLoader when it has suggested text.
109 void SetSuggestions(InstantLoader* loader, 118 void SetSuggestions(InstantLoader* loader,
110 const std::vector<InstantSuggestion>& suggestions); 119 const std::vector<InstantSuggestion>& suggestions);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 249
241 // The timestamp at which query editing began. This value is used when the 250 // The timestamp at which query editing began. This value is used when the
242 // first set of suggestions is processed and cleared when the overlay is 251 // first set of suggestions is processed and cleared when the overlay is
243 // hidden. 252 // hidden.
244 base::Time first_interaction_time_; 253 base::Time first_interaction_time_;
245 254
246 DISALLOW_COPY_AND_ASSIGN(InstantController); 255 DISALLOW_COPY_AND_ASSIGN(InstantController);
247 }; 256 };
248 257
249 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 258 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698