1 // Copyright 2014 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_CONTROLLER_PAIRING_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_CONTROLLER_PAIRING_SCREEN_HANDLER_H_ 7 8 #include "base/macros.h" 9 #include "chrome/browser/chromeos/login/screens/controller_pairing_screen_actor.h" 10 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 11 12 namespace chromeos { 13 14 class ControllerPairingScreenHandler : public ControllerPairingScreenActor, 15 public BaseScreenHandler { 16 public: 17 ControllerPairingScreenHandler(); 18 virtual ~ControllerPairingScreenHandler(); 19 20 private: 21 void HandleUserActed(const std::string& action); 22 void HandleContextChanged(const base::DictionaryValue* diff); 23 24 // Overridden from BaseScreenHandler: 25 virtual void Initialize() OVERRIDE; 26 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE; 27 28 // Overridden from content::WebUIMessageHandler: 29 virtual void RegisterMessages() OVERRIDE; 30 31 // Overridden from ControllerPairingScreenActor: 32 virtual void Show() OVERRIDE; 33 virtual void Hide() OVERRIDE; 34 virtual void SetDelegate(Delegate* delegate) OVERRIDE; 35 virtual void OnContextChanged(const base::DictionaryValue& diff) OVERRIDE; 36 virtual content::BrowserContext* GetBrowserContext() OVERRIDE; 37 38 ControllerPairingScreenActor::Delegate* delegate_; 39 bool show_on_init_; 40 41 DISALLOW_COPY_AND_ASSIGN(ControllerPairingScreenHandler); 42 }; 43 44 } // namespace chromeos 45 46 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_CONTROLLER_PAIRING_SCREEN_HANDLER_H_ 47