Chromium Code Reviews| OLD | NEW | 
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_ARC_KIOSK_SPLASH_SCREEN_HANDLER_H _ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_ARC_KIOSK_SPLASH_SCREEN_HANDLER_H _ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "chrome/browser/chromeos/login/screens/arc_kiosk_splash_screen_actor.h" | |
| 12 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | |
| 13 | |
| 14 namespace base { | |
| 15 class DictionaryValue; | |
| 16 } | |
| 17 | |
| 18 namespace chromeos { | |
| 19 | |
| 20 // A class that handles the WebUI hooks for the ARC kiosk splash screen. | |
| 21 class ArcKioskSplashScreenHandler : public BaseScreenHandler, | |
| 22 public ArcKioskSplashScreenActor { | |
| 23 public: | |
| 24 ArcKioskSplashScreenHandler(); | |
| 25 ~ArcKioskSplashScreenHandler() override; | |
| 26 | |
| 27 // BaseScreenHandler implementation: | |
| 
 
achuithb
2017/02/03 00:35:00
Can you make everything below this private? I beli
 
Sergey Poromov
2017/02/03 15:15:36
Done.
 
 | |
| 28 void DeclareLocalizedValues( | |
| 29 ::login::LocalizedValuesBuilder* builder) override; | |
| 30 void Initialize() override; | |
| 31 | |
| 32 // WebUIMessageHandler implementation: | |
| 33 void RegisterMessages() override; | |
| 34 | |
| 35 // ArcKioskSplashScreenActor implementation: | |
| 36 void Show() override; | |
| 37 void UpdateArcKioskState(ArcKioskState state) override; | |
| 38 void SetDelegate(ArcKioskSplashScreenHandler::Delegate* delegate) override; | |
| 39 | |
| 40 private: | |
| 41 void PopulateAppInfo(base::DictionaryValue* out_info); | |
| 42 void SetLaunchText(const std::string& text); | |
| 43 int GetProgressMessageFromState(ArcKioskState state); | |
| 44 void HandleCancelArcKioskLaunch(); | |
| 45 | |
| 46 ArcKioskSplashScreenHandler::Delegate* delegate_; | |
| 
 
achuithb
2017/02/03 00:35:00
= nullptr;
 
Sergey Poromov
2017/02/03 15:15:36
Done.
 
 | |
| 47 bool show_on_init_; | |
| 
 
achuithb
2017/02/03 00:35:00
initialize this here rather than ctor
 
Sergey Poromov
2017/02/03 15:15:36
Done.
 
 | |
| 48 | |
| 49 DISALLOW_COPY_AND_ASSIGN(ArcKioskSplashScreenHandler); | |
| 50 }; | |
| 51 | |
| 52 } // namespace chromeos | |
| 53 | |
| 54 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_ARC_KIOSK_SPLASH_SCREEN_HANDLE R_H_ | |
| OLD | NEW |