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 |