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

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: fix 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..6ce12401d80a3d2b54f447be6694e72724883a67 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/media/media_stream_infobar_delegate.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/recommended_apps.h"
+#include "chrome/browser/ui/app_list/start_page_observer.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/url_constants.h"
@@ -138,6 +139,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();
}
« no previous file with comments | « chrome/browser/ui/app_list/start_page_service.h ('k') | chrome/browser/ui/webui/app_list/start_page_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698