OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 : public content::WebContentsObserver, | 38 : public content::WebContentsObserver, |
39 public content::WebContentsUserData<ManagePasswordsUIController>, | 39 public content::WebContentsUserData<ManagePasswordsUIController>, |
40 public password_manager::PasswordStore::Observer, | 40 public password_manager::PasswordStore::Observer, |
41 public PasswordsModelDelegate, | 41 public PasswordsModelDelegate, |
42 public PasswordsClientUIDelegate { | 42 public PasswordsClientUIDelegate { |
43 public: | 43 public: |
44 ~ManagePasswordsUIController() override; | 44 ~ManagePasswordsUIController() override; |
45 | 45 |
46 // PasswordsClientUIDelegate: | 46 // PasswordsClientUIDelegate: |
47 void OnPasswordSubmitted( | 47 void OnPasswordSubmitted( |
48 scoped_ptr<password_manager::PasswordFormManager> form_manager) override; | 48 std::unique_ptr<password_manager::PasswordFormManager> form_manager) |
| 49 override; |
49 void OnUpdatePasswordSubmitted( | 50 void OnUpdatePasswordSubmitted( |
50 scoped_ptr<password_manager::PasswordFormManager> form_manager) override; | 51 std::unique_ptr<password_manager::PasswordFormManager> form_manager) |
| 52 override; |
51 bool OnChooseCredentials( | 53 bool OnChooseCredentials( |
52 ScopedVector<autofill::PasswordForm> local_credentials, | 54 ScopedVector<autofill::PasswordForm> local_credentials, |
53 ScopedVector<autofill::PasswordForm> federated_credentials, | 55 ScopedVector<autofill::PasswordForm> federated_credentials, |
54 const GURL& origin, | 56 const GURL& origin, |
55 const ManagePasswordsState::CredentialsCallback& callback) override; | 57 const ManagePasswordsState::CredentialsCallback& callback) override; |
56 void OnAutoSignin(ScopedVector<autofill::PasswordForm> local_forms, | 58 void OnAutoSignin(ScopedVector<autofill::PasswordForm> local_forms, |
57 const GURL& origin) override; | 59 const GURL& origin) override; |
58 void OnPromptEnableAutoSignin() override; | 60 void OnPromptEnableAutoSignin() override; |
59 void OnAutomaticPasswordSave( | 61 void OnAutomaticPasswordSave( |
60 scoped_ptr<password_manager::PasswordFormManager> form_manager) override; | 62 std::unique_ptr<password_manager::PasswordFormManager> form_manager) |
| 63 override; |
61 void OnPasswordAutofilled( | 64 void OnPasswordAutofilled( |
62 const autofill::PasswordFormMap& password_form_map, | 65 const autofill::PasswordFormMap& password_form_map, |
63 const GURL& origin, | 66 const GURL& origin, |
64 const std::vector<scoped_ptr<autofill::PasswordForm>>* federated_matches) | 67 const std::vector<std::unique_ptr<autofill::PasswordForm>>* |
65 override; | 68 federated_matches) override; |
66 | 69 |
67 // PasswordStore::Observer: | 70 // PasswordStore::Observer: |
68 void OnLoginsChanged( | 71 void OnLoginsChanged( |
69 const password_manager::PasswordStoreChangeList& changes) override; | 72 const password_manager::PasswordStoreChangeList& changes) override; |
70 | 73 |
71 // Set the state of the Omnibox icon, and possibly show the associated bubble | 74 // Set the state of the Omnibox icon, and possibly show the associated bubble |
72 // without user interaction. | 75 // without user interaction. |
73 virtual void UpdateIconAndBubbleState(ManagePasswordsIconView* icon); | 76 virtual void UpdateIconAndBubbleState(ManagePasswordsIconView* icon); |
74 | 77 |
75 bool IsAutomaticallyOpeningBubble() const { | 78 bool IsAutomaticallyOpeningBubble() const { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // the state to MANAGE_STATE. | 158 // the state to MANAGE_STATE. |
156 void DestroyAccountChooser(); | 159 void DestroyAccountChooser(); |
157 | 160 |
158 // content::WebContentsObserver: | 161 // content::WebContentsObserver: |
159 void WebContentsDestroyed() override; | 162 void WebContentsDestroyed() override; |
160 | 163 |
161 // The wrapper around current state and data. | 164 // The wrapper around current state and data. |
162 ManagePasswordsState passwords_data_; | 165 ManagePasswordsState passwords_data_; |
163 | 166 |
164 // The controller for the blocking dialogs. | 167 // The controller for the blocking dialogs. |
165 scoped_ptr<PasswordDialogControllerImpl> dialog_controller_; | 168 std::unique_ptr<PasswordDialogControllerImpl> dialog_controller_; |
166 | 169 |
167 BubbleStatus bubble_status_; | 170 BubbleStatus bubble_status_; |
168 | 171 |
169 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); | 172 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); |
170 }; | 173 }; |
171 | 174 |
172 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 175 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
OLD | NEW |