| Index: chrome/browser/chromeos/ui/password_echo_controller.h
|
| diff --git a/chrome/browser/chromeos/ui/password_echo_controller.h b/chrome/browser/chromeos/ui/password_echo_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1c53962782a8189e0a2fffee6398143fdd13b4d6
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/ui/password_echo_controller.h
|
| @@ -0,0 +1,42 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_CHROMEOS_UI_PASSWORD_ECHO_CONTROLLER_H_
|
| +#define CHROME_BROWSER_CHROMEOS_UI_PASSWORD_ECHO_CONTROLLER_H_
|
| +
|
| +#include "ash/common/shell_observer.h"
|
| +#include "base/macros.h"
|
| +
|
| +namespace chromeos {
|
| +
|
| +// Manages password echo behavior for renderers and TextFields. The current
|
| +// behavior is to enable password echo when TouchView mode is on and disable
|
| +// it when TouchView mode is off.
|
| +class PasswordEchoController : ash::ShellObserver {
|
| + public:
|
| + PasswordEchoController();
|
| + ~PasswordEchoController() override;
|
| +
|
| + // Gets the current instance. Returns nullptr if there is no current instance.
|
| + static PasswordEchoController* Get();
|
| +
|
| + bool enabled() const { return enabled_; }
|
| +
|
| + private:
|
| + void SetEnabled(bool enabled);
|
| + void UpdateWebkitPreferences();
|
| +
|
| + // ash::ShellObserver
|
| + void OnMaximizeModeStarted() override;
|
| + void OnMaximizeModeEnded() override;
|
| +
|
| + // Whether password echo is enabled.
|
| + bool enabled_ = false;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(PasswordEchoController);
|
| +};
|
| +
|
| +} // namespace chromeos
|
| +
|
| +#endif // CHROME_BROWSER_CHROMEOS_UI_PASSWORD_ECHO_CONTROLLER_H_
|
|
|