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_password_manager_d
river.h" | 10 #include "components/password_manager/content/browser/content_password_manager_d
river.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 virtual void PasswordAutofillWasBlocked( | 46 virtual void PasswordAutofillWasBlocked( |
47 const autofill::PasswordFormMap& best_matches) const OVERRIDE; | 47 const autofill::PasswordFormMap& best_matches) const OVERRIDE; |
48 virtual void AuthenticateAutofillAndFillForm( | 48 virtual void AuthenticateAutofillAndFillForm( |
49 scoped_ptr<autofill::PasswordFormFillData> fill_data) OVERRIDE; | 49 scoped_ptr<autofill::PasswordFormFillData> fill_data) OVERRIDE; |
50 virtual PrefService* GetPrefs() OVERRIDE; | 50 virtual PrefService* GetPrefs() OVERRIDE; |
51 virtual password_manager::PasswordStore* GetPasswordStore() OVERRIDE; | 51 virtual password_manager::PasswordStore* GetPasswordStore() OVERRIDE; |
52 virtual password_manager::PasswordManagerDriver* GetDriver() OVERRIDE; | 52 virtual password_manager::PasswordManagerDriver* GetDriver() OVERRIDE; |
53 virtual base::FieldTrial::Probability GetProbabilityForExperiment( | 53 virtual base::FieldTrial::Probability GetProbabilityForExperiment( |
54 const std::string& experiment_name) OVERRIDE; | 54 const std::string& experiment_name) OVERRIDE; |
55 virtual bool IsPasswordSyncEnabled() OVERRIDE; | 55 virtual bool IsPasswordSyncEnabled() OVERRIDE; |
56 virtual void SetLogger(password_manager::PasswordManagerLogger* logger) | 56 virtual void OnLogRouterAvailabilityChanged(bool router_can_be_used) OVERRIDE; |
57 OVERRIDE; | |
58 virtual void LogSavePasswordProgress(const std::string& text) OVERRIDE; | 57 virtual void LogSavePasswordProgress(const std::string& text) OVERRIDE; |
59 virtual bool IsLoggingActive() const OVERRIDE; | 58 virtual bool IsLoggingActive() const OVERRIDE; |
60 | 59 |
61 // Hides any visible generation UI. | 60 // Hides any visible generation UI. |
62 void HidePasswordGenerationPopup(); | 61 void HidePasswordGenerationPopup(); |
63 | 62 |
64 static void CreateForWebContentsWithAutofillManagerDelegate( | 63 static void CreateForWebContentsWithAutofillManagerDelegate( |
65 content::WebContents* contents, | 64 content::WebContents* contents, |
66 autofill::AutofillManagerDelegate* delegate); | 65 autofill::AutofillManagerDelegate* delegate); |
67 | 66 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // The popup will be anchored at |element_bounds|. The generated password | 99 // The popup will be anchored at |element_bounds|. The generated password |
101 // will be no longer than |max_length|. | 100 // will be no longer than |max_length|. |
102 void ShowPasswordGenerationPopup(const gfx::RectF& bounds, | 101 void ShowPasswordGenerationPopup(const gfx::RectF& bounds, |
103 int max_length, | 102 int max_length, |
104 const autofill::PasswordForm& form); | 103 const autofill::PasswordForm& form); |
105 | 104 |
106 // Causes the password editing UI to be shown anchored at |element_bounds|. | 105 // Causes the password editing UI to be shown anchored at |element_bounds|. |
107 void ShowPasswordEditingPopup( | 106 void ShowPasswordEditingPopup( |
108 const gfx::RectF& bounds, const autofill::PasswordForm& form); | 107 const gfx::RectF& bounds, const autofill::PasswordForm& form); |
109 | 108 |
110 Profile* GetProfile(); | 109 Profile* const profile_; |
111 | 110 |
112 password_manager::ContentPasswordManagerDriver driver_; | 111 password_manager::ContentPasswordManagerDriver driver_; |
113 | 112 |
114 // Observer for password generation popup. | 113 // Observer for password generation popup. |
115 autofill::PasswordGenerationPopupObserver* observer_; | 114 autofill::PasswordGenerationPopupObserver* observer_; |
116 | 115 |
117 // Controls the popup | 116 // Controls the popup |
118 base::WeakPtr< | 117 base::WeakPtr< |
119 autofill::PasswordGenerationPopupControllerImpl> popup_controller_; | 118 autofill::PasswordGenerationPopupControllerImpl> popup_controller_; |
120 | 119 |
121 // Allows authentication callbacks to be destroyed when this client is gone. | 120 // Allows authentication callbacks to be destroyed when this client is gone. |
122 base::WeakPtrFactory<ChromePasswordManagerClient> weak_factory_; | 121 base::WeakPtrFactory<ChromePasswordManagerClient> weak_factory_; |
123 | 122 |
124 // Points to an active logger instance to use for, e.g., reporting progress on | 123 // True if |this| is registered with some LogRouter which can accept logs. |
125 // saving passwords. If there is no active logger (most of the time), the | 124 bool can_use_log_router_; |
126 // pointer will be NULL. | |
127 password_manager::PasswordManagerLogger* logger_; | |
128 | 125 |
129 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 126 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
130 }; | 127 }; |
131 | 128 |
132 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 129 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
OLD | NEW |