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

Unified Diff: athena/extensions/shell/shell_search_controller_factory.cc

Issue 640103002: Adds full-functional search results for Athena on Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix DEPS Created 6 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: athena/extensions/shell/shell_search_controller_factory.cc
diff --git a/athena/extensions/shell/shell_search_controller_factory.cc b/athena/extensions/shell/shell_search_controller_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d8df1ec6fa3c8aefa15a813924d2c3e3dee226ab
--- /dev/null
+++ b/athena/extensions/shell/shell_search_controller_factory.cc
@@ -0,0 +1,37 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "athena/extensions/shell/shell_search_controller_factory.h"
+
+#include "athena/extensions/shell/url_search_provider.h"
+#include "ui/app_list/search_controller.h"
+
+namespace athena {
+
+ShellSearchControllerFactory::ShellSearchControllerFactory(
+ content::BrowserContext* browser_context)
+ : browser_context_(browser_context) {
+}
+
+ShellSearchControllerFactory::~ShellSearchControllerFactory() {
+}
+
+scoped_ptr<app_list::SearchController> ShellSearchControllerFactory::Create(
+ app_list::SearchBoxModel* search_box,
+ app_list::AppListModel::SearchResults* results) {
+ scoped_ptr<app_list::SearchController> controller(
+ new app_list::SearchController(
+ search_box, results, NULL /* no history */));
+ controller->AddProvider(app_list::Mixer::MAIN_GROUP,
+ scoped_ptr<app_list::SearchProvider>(
+ new UrlSearchProvider(browser_context_)));
+ return controller.Pass();
+}
+
+scoped_ptr<SearchControllerFactory> CreateSearchControllerFactory(
+ content::BrowserContext* context) {
+ return make_scoped_ptr(new ShellSearchControllerFactory(context));
+}
+
+} // namespace athena
« no previous file with comments | « athena/extensions/shell/shell_search_controller_factory.h ('k') | athena/extensions/shell/url_search_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698