Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: chrome/browser/chromeos/ui/password_echo_controller.h

Issue 2279163002: cros: Bind password echo with TouchView mode
Patch Set: do not run for mash to fix mash test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/ui/password_echo_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698