Chromium Code Reviews| Index: chrome/browser/search/instant_service.h |
| diff --git a/chrome/browser/search/instant_service.h b/chrome/browser/search/instant_service.h |
| index 4832dedc21ef65289c1739bd4138519831b228e5..a6d4aa28996f7dcc6088842da67f8cf99f9ac8ff 100644 |
| --- a/chrome/browser/search/instant_service.h |
| +++ b/chrome/browser/search/instant_service.h |
| @@ -14,6 +14,7 @@ |
| #include "base/compiler_specific.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/weak_ptr.h" |
| +#include "base/observer_list.h" |
| #include "chrome/browser/history/history_types.h" |
| #include "chrome/common/instant_types.h" |
| #include "components/browser_context_keyed_service/browser_context_keyed_service.h" |
| @@ -22,7 +23,9 @@ |
| class GURL; |
| class InstantIOContext; |
| +class InstantServiceObserver; |
| class Profile; |
| +class ThemeService; |
| namespace net { |
| class URLRequest; |
| @@ -40,6 +43,10 @@ class InstantService : public BrowserContextKeyedService, |
| void AddInstantProcess(int process_id); |
| bool IsInstantProcess(int process_id) const; |
| + // Adds/Removes InstantService observers. |
| + void AddObserver(InstantServiceObserver* observer); |
| + void RemoveObserver(InstantServiceObserver* observer); |
| + |
| #if defined(UNIT_TEST) |
| int GetInstantProcessCount() const { |
| return process_ids_.size(); |
| @@ -64,6 +71,9 @@ class InstantService : public BrowserContextKeyedService, |
| void GetCurrentMostVisitedItems( |
| std::vector<InstantMostVisitedItem>* items) const; |
| + // Invoked by the InstantController to update theme information for NTP. |
| + void UpdateThemeInfo(); |
|
samarth
2013/06/19 05:34:54
TODO: calling this from InstantController really s
kmadhusu
2013/06/19 17:43:30
Added TODO.
|
| + |
| private: |
| // Overridden from BrowserContextKeyedService: |
| virtual void Shutdown() OVERRIDE; |
| @@ -78,6 +88,9 @@ class InstantService : public BrowserContextKeyedService, |
| // SendMostVisitedItems. |
| void OnMostVisitedItemsReceived(const history::MostVisitedURLList& data); |
| + // Theme changed notification handler. |
| + void OnThemeChanged(ThemeService* theme_service); |
| + |
| Profile* const profile_; |
| // The process ids associated with Instant processes. |
| @@ -86,6 +99,11 @@ class InstantService : public BrowserContextKeyedService, |
| // InstantMostVisitedItems sent to the Instant Pages. |
| std::vector<InstantMostVisitedItem> most_visited_items_; |
| + // Theme-related data for NTP overlay to adopt themes. |
| + ThemeBackgroundInfo theme_info_; |
| + |
| + ObserverList<InstantServiceObserver> observers_; |
| + |
| content::NotificationRegistrar registrar_; |
| scoped_refptr<InstantIOContext> instant_io_context_; |