OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_CHROMEOS_UI_PASSWORD_ECHO_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_UI_PASSWORD_ECHO_CONTROLLER_H_ |
| 7 |
| 8 #include "ash/common/shell_observer.h" |
| 9 #include "base/macros.h" |
| 10 |
| 11 namespace chromeos { |
| 12 |
| 13 // Manages password echo behavior for renderers and TextFields. The current |
| 14 // behavior is to enable password echo when TouchView mode is on and disable |
| 15 // it when TouchView mode is off. |
| 16 class PasswordEchoController : ash::ShellObserver { |
| 17 public: |
| 18 PasswordEchoController(); |
| 19 ~PasswordEchoController() override; |
| 20 |
| 21 // Gets the current instance. Returns nullptr if there is no current instance. |
| 22 static PasswordEchoController* Get(); |
| 23 |
| 24 bool enabled() const { return enabled_; } |
| 25 |
| 26 private: |
| 27 void SetEnabled(bool enabled); |
| 28 void UpdateWebkitPreferences(); |
| 29 |
| 30 // ash::ShellObserver |
| 31 void OnMaximizeModeStarted() override; |
| 32 void OnMaximizeModeEnded() override; |
| 33 |
| 34 // Whether password echo is enabled. |
| 35 bool enabled_ = false; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(PasswordEchoController); |
| 38 }; |
| 39 |
| 40 } // namespace chromeos |
| 41 |
| 42 #endif // CHROME_BROWSER_CHROMEOS_UI_PASSWORD_ECHO_CONTROLLER_H_ |
OLD | NEW |