1 // Copyright 2018 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 UI_BASE_COCOA_SECURE_PASSWORD_INPUT_H_
6 #define UI_BASE_COCOA_SECURE_PASSWORD_INPUT_H_
7 
8 #include "base/macros.h"
9 #include "ui/base/ui_base_export.h"
10 
11 namespace ui {
12 
13 // Enables the secure password input mode while in scope.
14 class UI_BASE_EXPORT ScopedPasswordInputEnabler {
15  public:
16   ScopedPasswordInputEnabler();
17   ~ScopedPasswordInputEnabler();
18 
19   // Returns true if the password input mode is currently enabled. Useful for
20   // unit tests.
21   static bool IsPasswordInputEnabled();
22 
23  private:
24   DISALLOW_COPY_AND_ASSIGN(ScopedPasswordInputEnabler);
25 };
26 
27 }  // namespace ui
28 
29 #endif  // UI_BASE_COCOA_SECURE_PASSWORD_INPUT_H_
30