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

Unified Diff: chrome/browser/ui/webui/app_list/start_page_handler.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
« no previous file with comments | « chrome/browser/ui/webui/app_list/start_page_handler.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/app_list/start_page_handler.cc
diff --git a/chrome/browser/ui/webui/app_list/start_page_handler.cc b/chrome/browser/ui/webui/app_list/start_page_handler.cc
index be7e7abe485104dbf5c409bd65239c4369479131..9de1d1816ba7feee49f02f9e7a3ec040927663b7 100644
--- a/chrome/browser/ui/webui/app_list/start_page_handler.cc
+++ b/chrome/browser/ui/webui/app_list/start_page_handler.cc
@@ -64,6 +64,9 @@ void StartPageHandler::RegisterMessages() {
web_ui()->RegisterMessageCallback(
"launchApp",
base::Bind(&StartPageHandler::HandleLaunchApp, base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "search",
+ base::Bind(&StartPageHandler::HandleSearch, base::Unretained(this)));
}
void StartPageHandler::OnRecommendedAppsChanged() {
@@ -118,4 +121,11 @@ void StartPageHandler::HandleLaunchApp(const base::ListValue* args) {
ui::EF_NONE);
}
+void StartPageHandler::HandleSearch(const base::ListValue* args) {
+ base::string16 query;
+ CHECK(args->GetString(0, &query));
+
+ StartPageService::Get(Profile::FromWebUI(web_ui()))->OnSearch(query);
+}
+
} // namespace app_list
« no previous file with comments | « chrome/browser/ui/webui/app_list/start_page_handler.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698