#ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_SEARCH_PROVIDER_H_
#define CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_SEARCH_PROVIDER_H_
#include "base/basictypes.h"
#include "base/memory/scoped_vector.h"
#include "chrome/browser/ui/app_list/search/search_provider.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
class AppListControllerDelegate;
class ExtensionService;
class Profile;
namespace extensions {
class ExtensionSet;
}
namespace app_list {
class AppSearchProvider : public SearchProvider,
public content::NotificationObserver {
public:
AppSearchProvider(Profile* profile,
AppListControllerDelegate* list_controller);
virtual ~AppSearchProvider();
virtual void Start(const base::string16& query) OVERRIDE;
virtual void Stop() OVERRIDE;
private:
class App;
typedef ScopedVector<App> Apps;
void AddApps(const extensions::ExtensionSet& extensions);
void RefreshApps();
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
Profile* profile_;
AppListControllerDelegate* list_controller_;
content::NotificationRegistrar registrar_;
Apps apps_;
DISALLOW_COPY_AND_ASSIGN(AppSearchProvider);
};
}
#endif