1 // Copyright 2015 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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_API_H_
10 #include "base/macros.h"
11 #include "chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h"
12 #include "chrome/browser/ui/passwords/password_manager_presenter.h"
13 #include "extensions/browser/extension_function.h"
15 namespace extensions
{
17 class PasswordsPrivateCanPasswordAccountBeManagedFunction
:
18 public UIThreadExtensionFunction
{
20 PasswordsPrivateCanPasswordAccountBeManagedFunction() {}
21 DECLARE_EXTENSION_FUNCTION("passwordsPrivate.canPasswordAccountBeManaged",
22 PASSWORDSPRIVATE_CANPASSWORDACCOUNTBEMANAGED
);
25 ~PasswordsPrivateCanPasswordAccountBeManagedFunction() override
;
27 // ExtensionFunction overrides.
28 ResponseAction
Run() override
;
31 DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateCanPasswordAccountBeManagedFunction
);
34 class PasswordsPrivateRemoveSavedPasswordFunction
:
35 public UIThreadExtensionFunction
{
37 PasswordsPrivateRemoveSavedPasswordFunction() {}
38 DECLARE_EXTENSION_FUNCTION("passwordsPrivate.removeSavedPassword",
39 PASSWORDSPRIVATE_REMOVESAVEDPASSWORD
);
42 ~PasswordsPrivateRemoveSavedPasswordFunction() override
;
44 // ExtensionFunction overrides.
45 ResponseAction
Run() override
;
48 DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateRemoveSavedPasswordFunction
);
51 class PasswordsPrivateRemovePasswordExceptionFunction
:
52 public UIThreadExtensionFunction
{
54 PasswordsPrivateRemovePasswordExceptionFunction() {}
55 DECLARE_EXTENSION_FUNCTION("passwordsPrivate.removePasswordException",
56 PASSWORDSPRIVATE_REMOVEPASSWORDEXCEPTION
);
59 ~PasswordsPrivateRemovePasswordExceptionFunction() override
;
61 // ExtensionFunction overrides.
62 ResponseAction
Run() override
;
65 DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateRemovePasswordExceptionFunction
);
68 class PasswordsPrivateRequestPlaintextPasswordFunction
:
69 public UIThreadExtensionFunction
{
71 PasswordsPrivateRequestPlaintextPasswordFunction() {}
72 DECLARE_EXTENSION_FUNCTION("passwordsPrivate.requestPlaintextPassword",
73 PASSWORDSPRIVATE_REQUESTPLAINTEXTPASSWORD
);
76 ~PasswordsPrivateRequestPlaintextPasswordFunction() override
;
78 // ExtensionFunction overrides.
79 ResponseAction
Run() override
;
82 DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateRequestPlaintextPasswordFunction
);
85 } // namespace extensions
87 #endif // CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_API_H_