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..1c1c5a35795810ff195030b19131b83c4df5ab81 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 |instant_| to update theme information for NTP. |
samarth
2013/06/19 00:14:36
The "by |instant_|" part doesn't make sense here.
kmadhusu
2013/06/19 02:27:24
Fixed.
|
+ void UpdateThemeInfo(); |
+ |
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_; |