1 // Copyright 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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_AUTOLAUNCH_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_AUTOLAUNCH_SCREEN_HANDLER_H_
8 #include "base/compiler_specific.h"
9 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h"
10 #include "chrome/browser/chromeos/login/screens/kiosk_autolaunch_screen_actor.h"
11 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
12 #include "content/public/browser/web_ui.h"
16 // WebUI implementation of KioskAutolaunchScreenActor.
17 class KioskAutolaunchScreenHandler
: public KioskAutolaunchScreenActor
,
18 public KioskAppManagerObserver
,
19 public BaseScreenHandler
{
21 KioskAutolaunchScreenHandler();
22 virtual ~KioskAutolaunchScreenHandler();
24 // KioskAutolaunchScreenActor implementation:
25 virtual void Show() OVERRIDE
;
26 virtual void SetDelegate(Delegate
* delegate
) OVERRIDE
;
28 // KioskAppManagerObserver overrides:
29 virtual void OnKioskAppsSettingsChanged() OVERRIDE
;
30 virtual void OnKioskAppDataChanged(const std::string
& app_id
) OVERRIDE
;
32 // BaseScreenHandler implementation:
33 virtual void DeclareLocalizedValues(LocalizedValuesBuilder
* builder
) OVERRIDE
;
34 virtual void Initialize() OVERRIDE
;
36 // WebUIMessageHandler implementation:
37 virtual void RegisterMessages() OVERRIDE
;
40 // Updates auto-start UI assets on JS side.
41 void UpdateKioskApp();
43 // JS messages handlers.
44 void HandleOnCancel();
45 void HandleOnConfirm();
46 void HandleOnVisible();
50 // Keeps whether screen should be shown right after initialization.
54 DISALLOW_COPY_AND_ASSIGN(KioskAutolaunchScreenHandler
);
57 } // namespace chromeos
59 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_AUTOLAUNCH_SCREEN_HANDLER_H_