#ifndef CHROME_BROWSER_UI_WEBUI_APP_LIST_START_PAGE_HANDLER_H_
#define CHROME_BROWSER_UI_WEBUI_APP_LIST_START_PAGE_HANDLER_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/ui/app_list/recommended_apps_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_ui_message_handler.h"
namespace base {
class ListValue;
}
namespace app_list {
class RecommendedApps;
class StartPageHandler : public content::WebUIMessageHandler,
public content::NotificationObserver,
public RecommendedAppsObserver {
public:
StartPageHandler();
virtual ~StartPageHandler();
private:
virtual void RegisterMessages() OVERRIDE;
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
virtual void OnRecommendedAppsChanged() OVERRIDE;
void SendRecommendedApps();
#if defined(OS_CHROMEOS)
void OnHotwordEnabledChanged();
#endif
void HandleInitialize(const base::ListValue* args);
void HandleLaunchApp(const base::ListValue* args);
void HandleSpeechResult(const base::ListValue* args);
void HandleSpeechSoundLevel(const base::ListValue* args);
void HandleSpeechRecognition(const base::ListValue* args);
RecommendedApps* recommended_apps_;
PrefChangeRegistrar pref_change_registrar_;
content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(StartPageHandler);
};
}
#endif