Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.h

Issue 2900693002: [Password Manager] Convert |pending_login_managers_| to an array of scoped_refptr (Closed)
Patch Set: Rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h"
12 #include "chrome/browser/ui/passwords/manage_passwords_state.h" 13 #include "chrome/browser/ui/passwords/manage_passwords_state.h"
13 #include "chrome/browser/ui/passwords/passwords_client_ui_delegate.h" 14 #include "chrome/browser/ui/passwords/passwords_client_ui_delegate.h"
14 #include "chrome/browser/ui/passwords/passwords_model_delegate.h" 15 #include "chrome/browser/ui/passwords/passwords_model_delegate.h"
15 #include "chrome/common/features.h" 16 #include "chrome/common/features.h"
16 #include "components/password_manager/core/browser/password_store.h" 17 #include "components/password_manager/core/browser/password_store.h"
17 #include "content/public/browser/web_contents_observer.h" 18 #include "content/public/browser/web_contents_observer.h"
18 #include "content/public/browser/web_contents_user_data.h" 19 #include "content/public/browser/web_contents_user_data.h"
19 20
20 namespace content { 21 namespace content {
21 class WebContents; 22 class WebContents;
(...skipping 15 matching lines...) Expand all
37 class ManagePasswordsUIController 38 class ManagePasswordsUIController
38 : public content::WebContentsObserver, 39 : public content::WebContentsObserver,
39 public content::WebContentsUserData<ManagePasswordsUIController>, 40 public content::WebContentsUserData<ManagePasswordsUIController>,
40 public password_manager::PasswordStore::Observer, 41 public password_manager::PasswordStore::Observer,
41 public PasswordsModelDelegate, 42 public PasswordsModelDelegate,
42 public PasswordsClientUIDelegate { 43 public PasswordsClientUIDelegate {
43 public: 44 public:
44 ~ManagePasswordsUIController() override; 45 ~ManagePasswordsUIController() override;
45 46
46 // PasswordsClientUIDelegate: 47 // PasswordsClientUIDelegate:
47 void OnPasswordSubmitted( 48 void OnPasswordSubmitted(scoped_refptr<password_manager::PasswordFormManager>
48 std::unique_ptr<password_manager::PasswordFormManager> form_manager) 49 form_manager) override;
49 override;
50 void OnUpdatePasswordSubmitted( 50 void OnUpdatePasswordSubmitted(
51 std::unique_ptr<password_manager::PasswordFormManager> form_manager) 51 scoped_refptr<password_manager::PasswordFormManager> form_manager)
52 override; 52 override;
53 bool OnChooseCredentials( 53 bool OnChooseCredentials(
54 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials, 54 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials,
55 const GURL& origin, 55 const GURL& origin,
56 const ManagePasswordsState::CredentialsCallback& callback) override; 56 const ManagePasswordsState::CredentialsCallback& callback) override;
57 void OnAutoSignin( 57 void OnAutoSignin(
58 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, 58 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms,
59 const GURL& origin) override; 59 const GURL& origin) override;
60 void OnPromptEnableAutoSignin() override; 60 void OnPromptEnableAutoSignin() override;
61 void OnAutomaticPasswordSave( 61 void OnAutomaticPasswordSave(
62 std::unique_ptr<password_manager::PasswordFormManager> form_manager) 62 scoped_refptr<password_manager::PasswordFormManager> form_manager)
63 override; 63 override;
64 void OnPasswordAutofilled( 64 void OnPasswordAutofilled(
65 const std::map<base::string16, const autofill::PasswordForm*>& 65 const std::map<base::string16, const autofill::PasswordForm*>&
66 password_form_map, 66 password_form_map,
67 const GURL& origin, 67 const GURL& origin,
68 const std::vector<const autofill::PasswordForm*>* federated_matches) 68 const std::vector<const autofill::PasswordForm*>* federated_matches)
69 override; 69 override;
70 70
71 // PasswordStore::Observer: 71 // PasswordStore::Observer:
72 void OnLoginsChanged( 72 void OnLoginsChanged(
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // Thus, OnBubbleHidden() can be called after the new one is shown. By that 184 // Thus, OnBubbleHidden() can be called after the new one is shown. By that
185 // time the internal state of ManagePasswordsUIController has nothing to do 185 // time the internal state of ManagePasswordsUIController has nothing to do
186 // with the old bubble. 186 // with the old bubble.
187 // Invalidating all the weak pointers will detach the current bubble. 187 // Invalidating all the weak pointers will detach the current bubble.
188 base::WeakPtrFactory<ManagePasswordsUIController> weak_ptr_factory_; 188 base::WeakPtrFactory<ManagePasswordsUIController> weak_ptr_factory_;
189 189
190 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); 190 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController);
191 }; 191 };
192 192
193 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ 193 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_test.cc ('k') | chrome/browser/ui/passwords/manage_passwords_ui_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698