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" |
11 #include "components/password_manager/core/browser/password_manager_client.h" | 11 #include "components/password_manager/core/browser/password_manager_client.h" |
12 #include "content/public/browser/web_contents_observer.h" | 12 #include "content/public/browser/web_contents_observer.h" |
13 #include "content/public/browser/web_contents_user_data.h" | 13 #include "content/public/browser/web_contents_user_data.h" |
14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
15 | 15 |
16 class Profile; | 16 class Profile; |
17 | 17 |
18 namespace autofill { | 18 namespace autofill { |
19 class PasswordGenerationPopupObserver; | 19 class PasswordGenerationPopupObserver; |
20 class PasswordGenerationPopupControllerImpl; | 20 class PasswordGenerationPopupControllerImpl; |
21 } | 21 } |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 class WebContents; | 24 class WebContents; |
25 } | 25 } |
26 | 26 |
27 namespace password_manager { | 27 namespace password_manager { |
| 28 struct CredentialInfo; |
28 class PasswordGenerationManager; | 29 class PasswordGenerationManager; |
29 class PasswordManager; | 30 class PasswordManager; |
30 } | 31 } |
31 | 32 |
32 // ChromePasswordManagerClient implements the PasswordManagerClient interface. | 33 // ChromePasswordManagerClient implements the PasswordManagerClient interface. |
33 class ChromePasswordManagerClient | 34 class ChromePasswordManagerClient |
34 : public password_manager::PasswordManagerClient, | 35 : public password_manager::PasswordManagerClient, |
35 public content::WebContentsObserver, | 36 public content::WebContentsObserver, |
36 public content::WebContentsUserData<ChromePasswordManagerClient> { | 37 public content::WebContentsUserData<ChromePasswordManagerClient> { |
37 public: | 38 public: |
(...skipping 20 matching lines...) Expand all Loading... |
58 scoped_ptr<autofill::PasswordFormFillData> fill_data) OVERRIDE; | 59 scoped_ptr<autofill::PasswordFormFillData> fill_data) OVERRIDE; |
59 virtual PrefService* GetPrefs() OVERRIDE; | 60 virtual PrefService* GetPrefs() OVERRIDE; |
60 virtual password_manager::PasswordStore* GetPasswordStore() OVERRIDE; | 61 virtual password_manager::PasswordStore* GetPasswordStore() OVERRIDE; |
61 virtual password_manager::PasswordManagerDriver* GetDriver() OVERRIDE; | 62 virtual password_manager::PasswordManagerDriver* GetDriver() OVERRIDE; |
62 virtual base::FieldTrial::Probability GetProbabilityForExperiment( | 63 virtual base::FieldTrial::Probability GetProbabilityForExperiment( |
63 const std::string& experiment_name) OVERRIDE; | 64 const std::string& experiment_name) OVERRIDE; |
64 virtual bool IsPasswordSyncEnabled() OVERRIDE; | 65 virtual bool IsPasswordSyncEnabled() OVERRIDE; |
65 virtual void OnLogRouterAvailabilityChanged(bool router_can_be_used) OVERRIDE; | 66 virtual void OnLogRouterAvailabilityChanged(bool router_can_be_used) OVERRIDE; |
66 virtual void LogSavePasswordProgress(const std::string& text) OVERRIDE; | 67 virtual void LogSavePasswordProgress(const std::string& text) OVERRIDE; |
67 virtual bool IsLoggingActive() const OVERRIDE; | 68 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; |
68 | 80 |
69 // Hides any visible generation UI. | 81 // Hides any visible generation UI. |
70 void HidePasswordGenerationPopup(); | 82 void HidePasswordGenerationPopup(); |
71 | 83 |
72 static void CreateForWebContentsWithAutofillClient( | 84 static void CreateForWebContentsWithAutofillClient( |
73 content::WebContents* contents, | 85 content::WebContents* contents, |
74 autofill::AutofillClient* autofill_client); | 86 autofill::AutofillClient* autofill_client); |
75 | 87 |
76 // Convenience method to allow //chrome code easy access to a PasswordManager | 88 // Convenience method to allow //chrome code easy access to a PasswordManager |
77 // from a WebContents instance. | 89 // from a WebContents instance. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 AutofillForSyncCredentialsState autofill_sync_state_; | 178 AutofillForSyncCredentialsState autofill_sync_state_; |
167 | 179 |
168 // If the sync credential was filtered during autofill. Used for statistics | 180 // If the sync credential was filtered during autofill. Used for statistics |
169 // reporting. | 181 // reporting. |
170 bool sync_credential_was_filtered_; | 182 bool sync_credential_was_filtered_; |
171 | 183 |
172 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 184 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
173 }; | 185 }; |
174 | 186 |
175 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 187 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
OLD | NEW |