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_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "components/password_manager/content/browser/content_credential_manager
_dispatcher.h" | 10 #include "components/password_manager/content/browser/content_credential_manager
_dispatcher.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 public content::WebContentsObserver, | 37 public content::WebContentsObserver, |
38 public content::WebContentsUserData<ChromePasswordManagerClient> { | 38 public content::WebContentsUserData<ChromePasswordManagerClient> { |
39 public: | 39 public: |
40 virtual ~ChromePasswordManagerClient(); | 40 virtual ~ChromePasswordManagerClient(); |
41 | 41 |
42 // PasswordManagerClient implementation. | 42 // PasswordManagerClient implementation. |
43 virtual bool IsAutomaticPasswordSavingEnabled() const override; | 43 virtual bool IsAutomaticPasswordSavingEnabled() const override; |
44 virtual bool IsPasswordManagerEnabledForCurrentPage() const override; | 44 virtual bool IsPasswordManagerEnabledForCurrentPage() const override; |
45 virtual bool ShouldFilterAutofillResult( | 45 virtual bool ShouldFilterAutofillResult( |
46 const autofill::PasswordForm& form) override; | 46 const autofill::PasswordForm& form) override; |
| 47 virtual std::string GetSyncUsername() const override; |
47 virtual bool IsSyncAccountCredential( | 48 virtual bool IsSyncAccountCredential( |
48 const std::string& username, const std::string& origin) const override; | 49 const std::string& username, const std::string& origin) const override; |
49 virtual void AutofillResultsComputed() override; | 50 virtual void AutofillResultsComputed() override; |
50 virtual bool PromptUserToSavePassword( | 51 virtual bool PromptUserToSavePassword( |
51 scoped_ptr<password_manager::PasswordFormManager> form_to_save) override; | 52 scoped_ptr<password_manager::PasswordFormManager> form_to_save) override; |
52 virtual void AutomaticPasswordSave( | 53 virtual void AutomaticPasswordSave( |
53 scoped_ptr<password_manager::PasswordFormManager> saved_form_manager) | 54 scoped_ptr<password_manager::PasswordFormManager> saved_form_manager) |
54 override; | 55 override; |
55 virtual void PasswordWasAutofilled( | 56 virtual void PasswordWasAutofilled( |
56 const autofill::PasswordFormMap& best_matches) const override; | 57 const autofill::PasswordFormMap& best_matches) const override; |
57 virtual void PasswordAutofillWasBlocked( | 58 virtual void PasswordAutofillWasBlocked( |
58 const autofill::PasswordFormMap& best_matches) const override; | 59 const autofill::PasswordFormMap& best_matches) const override; |
59 virtual void AuthenticateAutofillAndFillForm( | 60 virtual void AuthenticateAutofillAndFillForm( |
60 scoped_ptr<autofill::PasswordFormFillData> fill_data) override; | 61 scoped_ptr<autofill::PasswordFormFillData> fill_data) override; |
61 virtual PrefService* GetPrefs() override; | 62 virtual PrefService* GetPrefs() override; |
62 virtual password_manager::PasswordStore* GetPasswordStore() override; | 63 virtual password_manager::PasswordStore* GetPasswordStore() override; |
63 virtual password_manager::PasswordManagerDriver* GetDriver() override; | 64 virtual password_manager::PasswordManagerDriver* GetDriver() override; |
64 virtual base::FieldTrial::Probability GetProbabilityForExperiment( | 65 virtual base::FieldTrial::Probability GetProbabilityForExperiment( |
65 const std::string& experiment_name) override; | 66 const std::string& experiment_name) override; |
66 virtual bool IsPasswordSyncEnabled() override; | 67 virtual bool IsPasswordSyncEnabled( |
| 68 password_manager::CustomPassphraseState state) override; |
67 virtual void OnLogRouterAvailabilityChanged(bool router_can_be_used) override; | 69 virtual void OnLogRouterAvailabilityChanged(bool router_can_be_used) override; |
68 virtual void LogSavePasswordProgress(const std::string& text) override; | 70 virtual void LogSavePasswordProgress(const std::string& text) override; |
69 virtual bool IsLoggingActive() const override; | 71 virtual bool IsLoggingActive() const override; |
70 | 72 |
71 // Hides any visible generation UI. | 73 // Hides any visible generation UI. |
72 void HidePasswordGenerationPopup(); | 74 void HidePasswordGenerationPopup(); |
73 | 75 |
74 static void CreateForWebContentsWithAutofillClient( | 76 static void CreateForWebContentsWithAutofillClient( |
75 content::WebContents* contents, | 77 content::WebContents* contents, |
76 autofill::AutofillClient* autofill_client); | 78 autofill::AutofillClient* autofill_client); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // reporting. | 173 // reporting. |
172 bool sync_credential_was_filtered_; | 174 bool sync_credential_was_filtered_; |
173 | 175 |
174 // Allows authentication callbacks to be destroyed when this client is gone. | 176 // Allows authentication callbacks to be destroyed when this client is gone. |
175 base::WeakPtrFactory<ChromePasswordManagerClient> weak_factory_; | 177 base::WeakPtrFactory<ChromePasswordManagerClient> weak_factory_; |
176 | 178 |
177 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 179 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
178 }; | 180 }; |
179 | 181 |
180 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 182 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
OLD | NEW |