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_password_manager_d
river.h" | 11 #include "components/password_manager/content/browser/content_password_manager_d
river.h" |
11 #include "components/password_manager/core/browser/password_manager_client.h" | 12 #include "components/password_manager/core/browser/password_manager_client.h" |
12 #include "content/public/browser/web_contents_observer.h" | 13 #include "content/public/browser/web_contents_observer.h" |
13 #include "content/public/browser/web_contents_user_data.h" | 14 #include "content/public/browser/web_contents_user_data.h" |
14 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
15 | 16 |
16 class Profile; | 17 class Profile; |
17 | 18 |
18 namespace autofill { | 19 namespace autofill { |
19 class PasswordGenerationPopupObserver; | 20 class PasswordGenerationPopupObserver; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 scoped_ptr<autofill::PasswordFormFillData> fill_data) OVERRIDE; | 60 scoped_ptr<autofill::PasswordFormFillData> fill_data) OVERRIDE; |
60 virtual PrefService* GetPrefs() OVERRIDE; | 61 virtual PrefService* GetPrefs() OVERRIDE; |
61 virtual password_manager::PasswordStore* GetPasswordStore() OVERRIDE; | 62 virtual password_manager::PasswordStore* GetPasswordStore() OVERRIDE; |
62 virtual password_manager::PasswordManagerDriver* GetDriver() OVERRIDE; | 63 virtual password_manager::PasswordManagerDriver* GetDriver() OVERRIDE; |
63 virtual base::FieldTrial::Probability GetProbabilityForExperiment( | 64 virtual base::FieldTrial::Probability GetProbabilityForExperiment( |
64 const std::string& experiment_name) OVERRIDE; | 65 const std::string& experiment_name) OVERRIDE; |
65 virtual bool IsPasswordSyncEnabled() OVERRIDE; | 66 virtual bool IsPasswordSyncEnabled() OVERRIDE; |
66 virtual void OnLogRouterAvailabilityChanged(bool router_can_be_used) OVERRIDE; | 67 virtual void OnLogRouterAvailabilityChanged(bool router_can_be_used) OVERRIDE; |
67 virtual void LogSavePasswordProgress(const std::string& text) OVERRIDE; | 68 virtual void LogSavePasswordProgress(const std::string& text) OVERRIDE; |
68 virtual bool IsLoggingActive() const OVERRIDE; | 69 virtual bool IsLoggingActive() const OVERRIDE; |
69 virtual void OnNotifyFailedSignIn( | |
70 int request_id, | |
71 const password_manager::CredentialInfo&) OVERRIDE; | |
72 virtual void OnNotifySignedIn( | |
73 int request_id, | |
74 const password_manager::CredentialInfo&) OVERRIDE; | |
75 virtual void OnNotifySignedOut(int request_id) OVERRIDE; | |
76 virtual void OnRequestCredential( | |
77 int request_id, | |
78 bool zero_click_only, | |
79 const std::vector<GURL>& federations) OVERRIDE; | |
80 | 70 |
81 // Hides any visible generation UI. | 71 // Hides any visible generation UI. |
82 void HidePasswordGenerationPopup(); | 72 void HidePasswordGenerationPopup(); |
83 | 73 |
84 static void CreateForWebContentsWithAutofillClient( | 74 static void CreateForWebContentsWithAutofillClient( |
85 content::WebContents* contents, | 75 content::WebContents* contents, |
86 autofill::AutofillClient* autofill_client); | 76 autofill::AutofillClient* autofill_client); |
87 | 77 |
88 // Convenience method to allow //chrome code easy access to a PasswordManager | 78 // Convenience method to allow //chrome code easy access to a PasswordManager |
89 // from a WebContents instance. | 79 // from a WebContents instance. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // website. | 144 // website. |
155 bool IsURLPasswordWebsiteReauth(const GURL& url) const; | 145 bool IsURLPasswordWebsiteReauth(const GURL& url) const; |
156 | 146 |
157 // Sets |autofill_state_| based on experiment and flag values. | 147 // Sets |autofill_state_| based on experiment and flag values. |
158 void SetUpAutofillSyncState(); | 148 void SetUpAutofillSyncState(); |
159 | 149 |
160 Profile* const profile_; | 150 Profile* const profile_; |
161 | 151 |
162 password_manager::ContentPasswordManagerDriver driver_; | 152 password_manager::ContentPasswordManagerDriver driver_; |
163 | 153 |
| 154 password_manager::ContentCredentialManagerDispatcher |
| 155 credential_manager_dispatcher_; |
| 156 |
164 // Observer for password generation popup. | 157 // Observer for password generation popup. |
165 autofill::PasswordGenerationPopupObserver* observer_; | 158 autofill::PasswordGenerationPopupObserver* observer_; |
166 | 159 |
167 // Controls the popup | 160 // Controls the popup |
168 base::WeakPtr< | 161 base::WeakPtr< |
169 autofill::PasswordGenerationPopupControllerImpl> popup_controller_; | 162 autofill::PasswordGenerationPopupControllerImpl> popup_controller_; |
170 | 163 |
171 // True if |this| is registered with some LogRouter which can accept logs. | 164 // True if |this| is registered with some LogRouter which can accept logs. |
172 bool can_use_log_router_; | 165 bool can_use_log_router_; |
173 | 166 |
174 // How to handle the sync credential in ShouldFilterAutofillResult(). | 167 // How to handle the sync credential in ShouldFilterAutofillResult(). |
175 AutofillForSyncCredentialsState autofill_sync_state_; | 168 AutofillForSyncCredentialsState autofill_sync_state_; |
176 | 169 |
177 // If the sync credential was filtered during autofill. Used for statistics | 170 // If the sync credential was filtered during autofill. Used for statistics |
178 // reporting. | 171 // reporting. |
179 bool sync_credential_was_filtered_; | 172 bool sync_credential_was_filtered_; |
180 | 173 |
181 // Allows authentication callbacks to be destroyed when this client is gone. | 174 // Allows authentication callbacks to be destroyed when this client is gone. |
182 base::WeakPtrFactory<ChromePasswordManagerClient> weak_factory_; | 175 base::WeakPtrFactory<ChromePasswordManagerClient> weak_factory_; |
183 | 176 |
184 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 177 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
185 }; | 178 }; |
186 | 179 |
187 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 180 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
OLD | NEW |