Add a minor text member to ui::MenuModel.
[chromium-blink-merge.git] / chrome / browser / ui / app_list / search / app_search_provider.h
blob530a782db8d84b72abada2533db47b1d3536a82c
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;
16 class ExtensionSet;
17 class Profile;
19 namespace app_list {
21 class AppSearchProvider : public SearchProvider,
22 public content::NotificationObserver {
23 public:
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;
32 private:
33 class App;
34 typedef ScopedVector<App> Apps;
36 // Adds extensions to apps container if they should be displayed.
37 void AddApps(const ExtensionSet* extensions, ExtensionService* service);
38 void RefreshApps();
40 // content::NotificationObserver overrides:
41 virtual void Observe(int type,
42 const content::NotificationSource& source,
43 const content::NotificationDetails& details) OVERRIDE;
45 Profile* profile_;
46 AppListControllerDelegate* list_controller_;
47 content::NotificationRegistrar registrar_;
49 Apps apps_;
51 DISALLOW_COPY_AND_ASSIGN(AppSearchProvider);
54 } // namespace app_list
56 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_SEARCH_PROVIDER_H_