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

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

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.cc
diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc
index 06d6501d14a9b9b8ccf259cb830f86c857565f11..c4ab693bdd16821df7ab968d912c07fe4d88219f 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -138,6 +138,18 @@ StartPageService::StartPageService(Profile* profile)
StartPageService::~StartPageService() {}
+void StartPageService::AddObserver(StartPageObserver* observer) {
+ observers_.AddObserver(observer);
+}
+
+void StartPageService::RemoveObserver(StartPageObserver* observer) {
+ observers_.RemoveObserver(observer);
+}
+
+void StartPageService::OnSearch(const base::string16& query) {
+ FOR_EACH_OBSERVER(StartPageObserver, observers_, OnSearch(query));
+}
+
void StartPageService::Shutdown() {
contents_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698