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(int request_id, |
| 77 bool zero_click_only, |
| 78 std::vector<GURL> federations) OVERRIDE; |
68 | 79 |
69 // Hides any visible generation UI. | 80 // Hides any visible generation UI. |
70 void HidePasswordGenerationPopup(); | 81 void HidePasswordGenerationPopup(); |
71 | 82 |
72 static void CreateForWebContentsWithAutofillClient( | 83 static void CreateForWebContentsWithAutofillClient( |
73 content::WebContents* contents, | 84 content::WebContents* contents, |
74 autofill::AutofillClient* autofill_client); | 85 autofill::AutofillClient* autofill_client); |
75 | 86 |
76 // Convenience method to allow //chrome code easy access to a PasswordManager | 87 // Convenience method to allow //chrome code easy access to a PasswordManager |
77 // from a WebContents instance. | 88 // from a WebContents instance. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 AutofillForSyncCredentialsState autofill_sync_state_; | 173 AutofillForSyncCredentialsState autofill_sync_state_; |
163 | 174 |
164 // If the sync credential was filtered during autofill. Used for statistics | 175 // If the sync credential was filtered during autofill. Used for statistics |
165 // reporting. | 176 // reporting. |
166 bool sync_credential_was_filtered_; | 177 bool sync_credential_was_filtered_; |
167 | 178 |
168 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 179 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
169 }; | 180 }; |
170 | 181 |
171 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 182 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
OLD | NEW |