| 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 <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "components/autofill/content/common/autofill_driver.mojom.h" | 13 #include "components/autofill/content/common/autofill_driver.mojom.h" |
| 14 #include "components/password_manager/content/browser/content_password_manager_d
river_factory.h" | 14 #include "components/password_manager/content/browser/content_password_manager_d
river_factory.h" |
| 15 #include "components/password_manager/content/browser/credential_manager_impl.h" | 15 #include "components/password_manager/content/browser/credential_manager_impl.h" |
| 16 #include "components/password_manager/core/browser/password_manager.h" | 16 #include "components/password_manager/core/browser/password_manager.h" |
| 17 #include "components/password_manager/core/browser/password_manager_client.h" | 17 #include "components/password_manager/core/browser/password_manager_client.h" |
| 18 #include "components/password_manager/core/browser/password_reuse_detection_mana
ger.h" | 18 #include "components/password_manager/core/browser/password_reuse_detection_mana
ger.h" |
| 19 #include "components/password_manager/sync/browser/sync_credentials_filter.h" | 19 #include "components/password_manager/sync/browser/sync_credentials_filter.h" |
| 20 #include "components/prefs/pref_member.h" | 20 #include "components/prefs/pref_member.h" |
| 21 #include "content/public/browser/render_widget_host.h" | 21 #include "content/public/browser/render_widget_host.h" |
| 22 #include "content/public/browser/web_contents_binding_set.h" | 22 #include "content/public/browser/web_contents_binding_set.h" |
| 23 #include "content/public/browser/web_contents_observer.h" | 23 #include "content/public/browser/web_contents_observer.h" |
| 24 #include "content/public/browser/web_contents_user_data.h" | 24 #include "content/public/browser/web_contents_user_data.h" |
| 25 #include "services/service_manager/public/cpp/bind_source_info.h" |
| 25 #include "ui/gfx/geometry/rect.h" | 26 #include "ui/gfx/geometry/rect.h" |
| 26 | 27 |
| 27 class Profile; | 28 class Profile; |
| 28 | 29 |
| 29 namespace autofill { | 30 namespace autofill { |
| 30 class PasswordGenerationPopupObserver; | 31 class PasswordGenerationPopupObserver; |
| 31 class PasswordGenerationPopupControllerImpl; | 32 class PasswordGenerationPopupControllerImpl; |
| 32 } | 33 } |
| 33 | 34 |
| 34 namespace content { | 35 namespace content { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 114 |
| 114 static void CreateForWebContentsWithAutofillClient( | 115 static void CreateForWebContentsWithAutofillClient( |
| 115 content::WebContents* contents, | 116 content::WebContents* contents, |
| 116 autofill::AutofillClient* autofill_client); | 117 autofill::AutofillClient* autofill_client); |
| 117 | 118 |
| 118 // Observer for PasswordGenerationPopup events. Used for testing. | 119 // Observer for PasswordGenerationPopup events. Used for testing. |
| 119 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); | 120 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); |
| 120 | 121 |
| 121 static void BindCredentialManager( | 122 static void BindCredentialManager( |
| 122 content::RenderFrameHost* render_frame_host, | 123 content::RenderFrameHost* render_frame_host, |
| 124 const service_manager::BindSourceInfo& source_info, |
| 123 password_manager::mojom::CredentialManagerRequest request); | 125 password_manager::mojom::CredentialManagerRequest request); |
| 124 | 126 |
| 125 // A helper method to determine whether a save/update bubble can be shown | 127 // A helper method to determine whether a save/update bubble can be shown |
| 126 // on this |url|. | 128 // on this |url|. |
| 127 static bool CanShowBubbleOnURL(const GURL& url); | 129 static bool CanShowBubbleOnURL(const GURL& url); |
| 128 | 130 |
| 129 protected: | 131 protected: |
| 130 // Callable for tests. | 132 // Callable for tests. |
| 131 ChromePasswordManagerClient(content::WebContents* web_contents, | 133 ChromePasswordManagerClient(content::WebContents* web_contents, |
| 132 autofill::AutofillClient* autofill_client); | 134 autofill::AutofillClient* autofill_client); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 std::unique_ptr<password_manager::LogManager> log_manager_; | 209 std::unique_ptr<password_manager::LogManager> log_manager_; |
| 208 | 210 |
| 209 // Set during 'NotifyUserCouldBeAutoSignedIn' in order to store the | 211 // Set during 'NotifyUserCouldBeAutoSignedIn' in order to store the |
| 210 // form for potential use during 'NotifySuccessfulLoginWithExistingPassword'. | 212 // form for potential use during 'NotifySuccessfulLoginWithExistingPassword'. |
| 211 std::unique_ptr<autofill::PasswordForm> possible_auto_sign_in_; | 213 std::unique_ptr<autofill::PasswordForm> possible_auto_sign_in_; |
| 212 | 214 |
| 213 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 215 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
| 214 }; | 216 }; |
| 215 | 217 |
| 216 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 218 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
| OLD | NEW |