Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / app_list / search / app_search_provider.h
blob5fe3762e3d54c3cd8aae9f8f5a56001e9bba2cf4
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 Profile;
18 namespace extensions {
19 class ExtensionSet;
22 namespace app_list {
24 class AppSearchProvider : public SearchProvider,
25 public content::NotificationObserver {
26 public:
27 AppSearchProvider(Profile* profile,
28 AppListControllerDelegate* list_controller);
29 virtual ~AppSearchProvider();
31 // SearchProvider overrides:
32 virtual void Start(const base::string16& query) OVERRIDE;
33 virtual void Stop() OVERRIDE;
35 private:
36 class App;
37 typedef ScopedVector<App> Apps;
39 // Adds extensions to apps container if they should be displayed.
40 void AddApps(const extensions::ExtensionSet& extensions,
41 ExtensionService* service);
42 void RefreshApps();
44 // content::NotificationObserver overrides:
45 virtual void Observe(int type,
46 const content::NotificationSource& source,
47 const content::NotificationDetails& details) OVERRIDE;
49 Profile* profile_;
50 AppListControllerDelegate* list_controller_;
51 content::NotificationRegistrar registrar_;
53 Apps apps_;
55 DISALLOW_COPY_AND_ASSIGN(AppSearchProvider);
58 } // namespace app_list
60 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_SEARCH_PROVIDER_H_