1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_SEARCH_PROVIDER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_SEARCH_PROVIDER_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_vector.h"
10 #include "chrome/browser/ui/app_list/search/search_provider.h"
11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h"
14 class AppListControllerDelegate
;
15 class ExtensionService
;
21 class AppSearchProvider
: public SearchProvider
,
22 public content::NotificationObserver
{
24 AppSearchProvider(Profile
* profile
,
25 AppListControllerDelegate
* list_controller
);
26 virtual ~AppSearchProvider();
28 // SearchProvider overrides:
29 virtual void Start(const base::string16
& query
) OVERRIDE
;
30 virtual void Stop() OVERRIDE
;
34 typedef ScopedVector
<App
> Apps
;
36 // Adds extensions to apps container if they should be displayed.
37 void AddApps(const ExtensionSet
* extensions
, ExtensionService
* service
);
40 // content::NotificationObserver overrides:
41 virtual void Observe(int type
,
42 const content::NotificationSource
& source
,
43 const content::NotificationDetails
& details
) OVERRIDE
;
46 AppListControllerDelegate
* list_controller_
;
47 content::NotificationRegistrar registrar_
;
51 DISALLOW_COPY_AND_ASSIGN(AppSearchProvider
);
54 } // namespace app_list
56 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_SEARCH_PROVIDER_H_