1 // Copyright (c) 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 #include "chrome/browser/ui/webui/chromeos/login/screen_manager_handler.h"
9 const char kJsApiButtonPressed
[] = "buttonPressed";
10 const char kJsApiContextChanged
[] = "contextChanged";
16 ScreenManagerHandler::ScreenManagerHandler()
20 ScreenManagerHandler::~ScreenManagerHandler() {
23 void ScreenManagerHandler::SetDelegate(Delegate
* delegate
) {
27 void ScreenManagerHandler::DeclareLocalizedValues(
28 LocalizedValuesBuilder
* builder
) {
31 void ScreenManagerHandler::Initialize() {
34 void ScreenManagerHandler::RegisterMessages() {
35 AddCallback(kJsApiButtonPressed
,
36 &ScreenManagerHandler::HandleButtonPressed
);
37 AddCallback(kJsApiContextChanged
,
38 &ScreenManagerHandler::HandleContextChanged
);
41 void ScreenManagerHandler::HandleButtonPressed(const std::string
& screen_name
,
42 const std::string
& button_id
) {
44 delegate_
->OnButtonPressed(screen_name
, button_id
);
47 void ScreenManagerHandler::HandleContextChanged(
48 const std::string
& screen_name
,
49 const base::DictionaryValue
* diff
) {
51 delegate_
->OnContextChanged(screen_name
, diff
);
54 } // namespace chromeos