| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DOM_UI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_DOM_UI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_ |
| 6 #define CHROME_BROWSER_DOM_UI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_ | 6 #define CHROME_BROWSER_DOM_UI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "chrome/browser/dom_ui/options/options_ui.h" | 11 #include "chrome/browser/dom_ui/options/options_ui.h" |
| 12 #include "chrome/browser/password_manager/password_store.h" | 12 #include "chrome/browser/password_manager/password_store.h" |
| 13 | 13 |
| 14 class PasswordManagerHandler : public OptionsPageUIHandler { | 14 class PasswordManagerHandler : public OptionsPageUIHandler { |
| 15 public: | 15 public: |
| 16 PasswordManagerHandler(); | 16 PasswordManagerHandler(); |
| 17 virtual ~PasswordManagerHandler(); | 17 virtual ~PasswordManagerHandler(); |
| 18 | 18 |
| 19 // OptionsUIHandler implementation. | 19 // OptionsUIHandler implementation. |
| 20 virtual void GetLocalizedValues(DictionaryValue* localized_strings); | 20 virtual void GetLocalizedValues(DictionaryValue* localized_strings); |
| 21 | 21 |
| 22 virtual void Initialize(); | 22 virtual void Initialize(); |
| 23 | 23 |
| 24 virtual void RegisterMessages(); | 24 virtual void RegisterMessages(); |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 // The password store associated with the currently active profile. | 27 // The password store associated with the currently active profile. |
| 28 PasswordStore* GetPasswordStore(); | 28 PasswordStore* GetPasswordStore(); |
| 29 | 29 |
| 30 // Fired when user clicks 'show saved passwords' button in personal page. | 30 // Called when the JS PasswordManager object is initialized. |
| 31 void LoadLists(const ListValue* args); | 31 void UpdatePasswordLists(const ListValue* args); |
| 32 | 32 |
| 33 // Remove an entry. | 33 // Remove an entry. |
| 34 // @param value the entry index to be removed. | 34 // @param value the entry index to be removed. |
| 35 void RemoveSavedPassword(const ListValue* args); | 35 void RemoveSavedPassword(const ListValue* args); |
| 36 | 36 |
| 37 // Remove an password exception. | 37 // Remove an password exception. |
| 38 // @param value the entry index to be removed. | 38 // @param value the entry index to be removed. |
| 39 void RemovePasswordException(const ListValue* args); | 39 void RemovePasswordException(const ListValue* args); |
| 40 | 40 |
| 41 // Remove all saved passwords | 41 // Remove all saved passwords |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 std::vector<webkit_glue::PasswordForm*> password_list_; | 110 std::vector<webkit_glue::PasswordForm*> password_list_; |
| 111 std::vector<webkit_glue::PasswordForm*> password_exception_list_; | 111 std::vector<webkit_glue::PasswordForm*> password_exception_list_; |
| 112 | 112 |
| 113 // User's pref | 113 // User's pref |
| 114 std::string languages_; | 114 std::string languages_; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(PasswordManagerHandler); | 116 DISALLOW_COPY_AND_ASSIGN(PasswordManagerHandler); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 #endif // CHROME_BROWSER_DOM_UI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_ | 119 #endif // CHROME_BROWSER_DOM_UI_OPTIONS_PASSWORD_MANAGER_HANDLER_H_ |
| OLD | NEW |