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

Unified Diff: chrome/browser/ui/search/instant_controller.h

Issue 16413002: Moved theme related state from BrowserInstantController to InstantService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/search/instant_controller.h
diff --git a/chrome/browser/ui/search/instant_controller.h b/chrome/browser/ui/search/instant_controller.h
index cdb170bc55056603a11d19153bc4153811765d35..c98b6ae3cce6ca294553498c911162ea8a2ebda4 100644
--- a/chrome/browser/ui/search/instant_controller.h
+++ b/chrome/browser/ui/search/instant_controller.h
@@ -16,6 +16,7 @@
#include "base/strings/string16.h"
#include "base/time.h"
#include "base/timer.h"
+#include "chrome/browser/search/instant_service_observer.h"
#include "chrome/browser/ui/omnibox/omnibox_edit_model.h"
#include "chrome/browser/ui/search/instant_commit_type.h"
#include "chrome/browser/ui/search/instant_overlay_model.h"
@@ -37,6 +38,7 @@ class AutocompleteResult;
class BrowserInstantController;
class InstantNTP;
class InstantOverlay;
+class InstantService;
class InstantTab;
class TemplateURL;
@@ -66,7 +68,8 @@ class WebContents;
// only an InstantOverlay instance is kept.
//
// InstantController is owned by Browser via BrowserInstantController.
-class InstantController : public InstantPage::Delegate {
+class InstantController : public InstantPage::Delegate,
+ public InstantServiceObserver {
public:
// For reporting fallbacks to local overlay.
enum InstantFallbackReason {
@@ -193,8 +196,8 @@ class InstantController : public InstantPage::Delegate {
// applicable if |extended_enabled_| is true.
void SetInstantEnabled(bool instant_enabled, bool use_local_page_only);
- // The theme has changed. Pass the message to the overlay page.
- void ThemeChanged(const ThemeBackgroundInfo& theme_info);
+ // Overridden from InstantServiceObserver:
samarth 2013/06/19 05:34:54 This can be private I think.
kmadhusu 2013/06/19 17:43:30 Done.
+ virtual void ThemeInfoChanged(const ThemeBackgroundInfo& theme_info) OVERRIDE;
// Called when someone else swapped in a different contents in the |overlay_|.
void SwappedOverlayContents();
@@ -442,6 +445,9 @@ class InstantController : public InstantPage::Delegate {
size_t autocomplete_match_index,
InstantAutocompleteResult* result);
+ // Returns the InstantService for the browser profile.
+ InstantService* GetInstantService() const;
+
BrowserInstantController* const browser_;
// Whether the extended API and regular API are enabled. If both are false,

Powered by Google App Engine
This is Rietveld 408576698