OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DELEGA
TE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DELEGA
TE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DELEGA
TE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DELEGA
TE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 26 matching lines...) Expand all Loading... |
37 class PasswordsPrivateDelegate : public KeyedService { | 37 class PasswordsPrivateDelegate : public KeyedService { |
38 public: | 38 public: |
39 ~PasswordsPrivateDelegate() override {} | 39 ~PasswordsPrivateDelegate() override {} |
40 | 40 |
41 // An interface used to notify clients (observers) of this object that | 41 // An interface used to notify clients (observers) of this object that |
42 // saved passwords, password exceptions, and plaintext passwords are ready to | 42 // saved passwords, password exceptions, and plaintext passwords are ready to |
43 // be consumed by the UI. Register an observer via | 43 // be consumed by the UI. Register an observer via |
44 // PasswordsPrivateDelegate::AddObserver(). | 44 // PasswordsPrivateDelegate::AddObserver(). |
45 class Observer { | 45 class Observer { |
46 public: | 46 public: |
47 virtual void OnSavedPasswordsListChanged(const std::vector<linked_ptr< | 47 virtual void OnSavedPasswordsListChanged( |
48 api::passwords_private::PasswordUiEntry>>& entries) {} | 48 const std::vector<api::passwords_private::PasswordUiEntry>& entries) {} |
49 virtual void OnPasswordExceptionsListChanged( | 49 virtual void OnPasswordExceptionsListChanged( |
50 const std::vector<std::string>& exceptions) {} | 50 const std::vector<std::string>& exceptions) {} |
51 virtual void OnPlaintextPasswordFetched( | 51 virtual void OnPlaintextPasswordFetched( |
52 const std::string& origin_url, | 52 const std::string& origin_url, |
53 const std::string& username, | 53 const std::string& username, |
54 const std::string& plaintext_password) {} | 54 const std::string& plaintext_password) {} |
55 | 55 |
56 protected: | 56 protected: |
57 virtual ~Observer() {} | 57 virtual ~Observer() {} |
58 }; | 58 }; |
(...skipping 26 matching lines...) Expand all Loading... |
85 // |native_window| The Chrome host window; will be used to show an OS-level | 85 // |native_window| The Chrome host window; will be used to show an OS-level |
86 // authentication dialog if necessary. | 86 // authentication dialog if necessary. |
87 virtual void RequestShowPassword(const std::string& origin_url, | 87 virtual void RequestShowPassword(const std::string& origin_url, |
88 const std::string& username, | 88 const std::string& username, |
89 content::WebContents* web_contents) = 0; | 89 content::WebContents* web_contents) = 0; |
90 }; | 90 }; |
91 | 91 |
92 } // namespace extensions | 92 } // namespace extensions |
93 | 93 |
94 #endif // CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DEL
EGATE_H_ | 94 #endif // CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DEL
EGATE_H_ |
OLD | NEW |