This source file includes following definitions.
- SetDelegate
- DeclareLocalizedValues
- Initialize
- RegisterMessages
- HandleButtonPressed
- HandleContextChanged
#include "chrome/browser/ui/webui/chromeos/login/screen_manager_handler.h"
namespace {
const char kJsApiButtonPressed[] = "buttonPressed";
const char kJsApiContextChanged[] = "contextChanged";
}
namespace chromeos {
ScreenManagerHandler::ScreenManagerHandler()
: delegate_(NULL) {
}
ScreenManagerHandler::~ScreenManagerHandler() {
}
void ScreenManagerHandler::SetDelegate(Delegate* delegate) {
delegate_ = delegate;
}
void ScreenManagerHandler::DeclareLocalizedValues(
LocalizedValuesBuilder* builder) {
}
void ScreenManagerHandler::Initialize() {
}
void ScreenManagerHandler::RegisterMessages() {
AddCallback(kJsApiButtonPressed,
&ScreenManagerHandler::HandleButtonPressed);
AddCallback(kJsApiContextChanged,
&ScreenManagerHandler::HandleContextChanged);
}
void ScreenManagerHandler::HandleButtonPressed(const std::string& screen_name,
const std::string& button_id) {
if (delegate_)
delegate_->OnButtonPressed(screen_name, button_id);
}
void ScreenManagerHandler::HandleContextChanged(
const std::string& screen_name,
const base::DictionaryValue* diff) {
if (delegate_)
delegate_->OnContextChanged(screen_name, diff);
}
}