Mac: Fix performance issues with remote CoreAnimation
[chromium-blink-merge.git] / athena / extensions / chrome / chrome_search_controller_factory.cc
blobd39c79881ce6b1dca8994d54d9b1c83cae860338
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "athena/extensions/chrome/chrome_search_controller_factory.h"
7 #include "athena/extensions/chrome/app_list_controller_delegate_athena.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/app_list/search/search_controller_factory.h"
11 namespace athena {
13 ChromeSearchControllerFactory::ChromeSearchControllerFactory(
14 content::BrowserContext* browser_context)
15 : browser_context_(browser_context) {
18 ChromeSearchControllerFactory::~ChromeSearchControllerFactory() {
21 scoped_ptr<app_list::SearchController> ChromeSearchControllerFactory::Create(
22 app_list::SearchBoxModel* search_box,
23 app_list::AppListModel::SearchResults* results) {
24 list_controller_.reset(new AppListControllerDelegateAthena());
25 return app_list::CreateSearchController(
26 Profile::FromBrowserContext(browser_context_),
27 search_box,
28 results,
29 list_controller_.get());
32 scoped_ptr<SearchControllerFactory> CreateSearchControllerFactory(
33 content::BrowserContext* context) {
34 return make_scoped_ptr(new ChromeSearchControllerFactory(context));
37 } // namespace athena