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

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: Created 7 years, 2 months 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..e56862e60bd0ba1a731beea79c11d78446060a8f 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -24,6 +24,8 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "ui/app_list/app_list_model.h"
+#include "ui/app_list/search_box_model.h"
namespace app_list {
@@ -115,6 +117,7 @@ StartPageService* StartPageService::Get(Profile* profile) {
StartPageService::StartPageService(Profile* profile)
: profile_(profile),
+ model_(NULL),
exit_observer_(new ExitObserver(this)),
recommended_apps_(new RecommendedApps(profile)) {
contents_.reset(content::WebContents::Create(
@@ -142,4 +145,16 @@ void StartPageService::Shutdown() {
contents_.reset();
}
+void StartPageService::SetAppListModel(AppListModel* model) {
+ DCHECK(model == NULL || model_ == NULL);
+ model_ = model;
+}
+
+void StartPageService::OnSearch(const base::string16& query) {
+ if (!model_)
+ return;
+
+ model_->search_box()->SetText(query);
+}
+
} // namespace app_list

Powered by Google App Engine
This is Rietveld 408576698