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

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: Rebase 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
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.cc ('k') | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3f827b24878c7ab9c488f3e8461c332438bea775..06cdf909ae62b3c972ef793b5599a4f0db035652 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 {
@@ -194,9 +197,6 @@ 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);
-
// Called when someone else swapped in a different contents in the |overlay_|.
void SwappedOverlayContents();
@@ -340,6 +340,9 @@ class InstantController : public InstantPage::Delegate {
bool is_search_type) OVERRIDE;
virtual void InstantPageLoadFailed(content::WebContents* contents) OVERRIDE;
+ // Overridden from InstantServiceObserver:
+ virtual void ThemeInfoChanged(const ThemeBackgroundInfo& theme_info) OVERRIDE;
+
// Invoked by the InstantLoader when the Instant page wants to delete a
// Most Visited item.
virtual void DeleteMostVisitedItem(const GURL& url) OVERRIDE;
@@ -430,6 +433,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,
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.cc ('k') | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698