| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HID_DETECTION_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HID_DETECTION_VIEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HID_DETECTION_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HID_DETECTION_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 | 11 |
| 12 namespace chromeos { | 12 namespace chromeos { |
| 13 | 13 |
| 14 class HIDDetectionModel; | 14 class HIDDetectionModel; |
| 15 | 15 |
| 16 // Interface between HID detection screen and its representation, either WebUI | 16 // Interface between HID detection screen and its representation, either WebUI |
| 17 // or Views one. Note, do not forget to call OnViewDestroyed in the | 17 // or Views one. Note, do not forget to call OnViewDestroyed in the |
| 18 // dtor. | 18 // dtor. |
| 19 class HIDDetectionView { | 19 class HIDDetectionView { |
| 20 public: | 20 public: |
| 21 virtual ~HIDDetectionView() {} | 21 virtual ~HIDDetectionView() {} |
| 22 | 22 |
| 23 virtual void PrepareToShow() = 0; | |
| 24 virtual void Show() = 0; | 23 virtual void Show() = 0; |
| 25 virtual void Hide() = 0; | 24 virtual void Hide() = 0; |
| 26 virtual void Bind(HIDDetectionModel& model) = 0; | 25 virtual void Bind(HIDDetectionModel& model) = 0; |
| 27 virtual void Unbind() = 0; | 26 virtual void Unbind() = 0; |
| 28 // Checks if we should show the screen or enough devices already present. | 27 // Checks if we should show the screen or enough devices already present. |
| 29 // Calls corresponding set of actions based on the bool result. | 28 // Calls corresponding set of actions based on the bool result. |
| 30 virtual void CheckIsScreenRequired( | 29 virtual void CheckIsScreenRequired( |
| 31 const base::Callback<void(bool)>& on_check_done) = 0; | 30 const base::Callback<void(bool)>& on_check_done) = 0; |
| 32 }; | 31 }; |
| 33 | 32 |
| 34 } // namespace chromeos | 33 } // namespace chromeos |
| 35 | 34 |
| 36 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HID_DETECTION_VIEW_H_ | 35 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HID_DETECTION_VIEW_H_ |
| OLD | NEW |