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

Unified Diff: chrome/browser/ui/app_list/start_page_service.h

Issue 55433002: Propagates the search result of start page to the app-list search box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: observer Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/start_page_service.h
diff --git a/chrome/browser/ui/app_list/start_page_service.h b/chrome/browser/ui/app_list/start_page_service.h
index f729ec022956db1ad42325cf0d15e14d6195ad6b..261c6af221a85771845080d580e11605c2f06796 100644
--- a/chrome/browser/ui/app_list/start_page_service.h
+++ b/chrome/browser/ui/app_list/start_page_service.h
@@ -10,6 +10,8 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/observer_list.h"
+#include "base/strings/string16.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "content/public/browser/web_contents.h"
@@ -32,8 +34,12 @@ class StartPageService : public BrowserContextKeyedService {
// Gets the instance for the given profile.
static StartPageService* Get(Profile* profile);
+ void AddObserver(StartPageObserver* observer);
+ void RemoveObserver(StartPageObserver* observer);
+
content::WebContents* contents() { return contents_.get(); }
RecommendedApps* recommended_apps() { return recommended_apps_.get(); }
+ void OnSearch(const base::string16& query);
private:
// A BrowserContextKeyedServiceFactory for this service.
@@ -59,6 +65,7 @@ class StartPageService : public BrowserContextKeyedService {
scoped_ptr<StartPageWebContentsDelegate> contents_delegate_;
scoped_ptr<ExitObserver> exit_observer_;
scoped_ptr<RecommendedApps> recommended_apps_;
+ ObserverList<StartPageObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(StartPageService);
};

Powered by Google App Engine
This is Rietveld 408576698