#ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_CHARGER_REPLACEMENT_HANDLER_H_
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_CHARGER_REPLACEMENT_HANDLER_H_
#include "base/compiler_specific.h"
#include "content/public/browser/web_ui_message_handler.h"
#include "ui/gfx/native_widget_types.h"
class PrefRegistrySimple;
namespace chromeos {
class ChargerReplacementDialog;
class ChargerReplacementHandler : public content::WebUIMessageHandler {
public:
enum SpringChargerStatus {
CHARGER_UNKNOWN,
CONFIRM_SAFE_CHARGER,
CONFIRM_NOT_ORDER_NEW_CHARGER,
CONFIRM_NEW_CHARGER_ORDERED_ONLINE,
CONFIRM_ORDER_NEW_CHARGER_BY_PHONE,
USE_BAD_CHARGER_AFTER_ORDER_ONLINE,
USE_BAD_CHARGER_AFTER_ORDER_BY_PHONE,
};
explicit ChargerReplacementHandler(ChargerReplacementDialog* dialog);
virtual ~ChargerReplacementHandler();
static void RegisterPrefs(PrefRegistrySimple* registry);
static SpringChargerStatus GetChargerStatusPref();
static void SetChargerStatusPref(SpringChargerStatus status);
virtual void RegisterMessages() OVERRIDE;
static void GetLocalizedValues(base::DictionaryValue* localized_strings);
void set_charger_window(gfx::NativeWindow window) {
charger_window_ = window;
}
private:
void ConfirmSafeCharger(const base::ListValue* args);
void ConfirmNotOrderNewCharger(const base::ListValue* args);
void ConfirmChargerOrderedOnline(const base::ListValue* args);
void ConfirmChargerOrderByPhone(const base::ListValue* args);
void ConfirmStillUseBadCharger(const base::ListValue* args);
void ShowLink(const base::ListValue* args);
gfx::NativeWindow charger_window_;
ChargerReplacementDialog* dialog_;
DISALLOW_COPY_AND_ASSIGN(ChargerReplacementHandler);
};
}
#endif