Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: chrome/browser/password_manager/chrome_password_manager_client.h

Issue 1762603002: Switch components/password_manager code from IPC messages to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.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_dispatc her.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/sync/browser/sync_credentials_filter.h" 18 #include "components/password_manager/sync/browser/sync_credentials_filter.h"
19 #include "components/prefs/pref_member.h" 19 #include "components/prefs/pref_member.h"
20 #include "content/public/browser/web_contents_observer.h" 20 #include "content/public/browser/web_contents_observer.h"
21 #include "content/public/browser/web_contents_user_data.h" 21 #include "content/public/browser/web_contents_user_data.h"
22 #include "ui/gfx/geometry/rect.h" 22 #include "ui/gfx/geometry/rect.h"
23 23
24 class Profile; 24 class Profile;
25 25
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 content::WebContents* contents, 98 content::WebContents* contents,
99 autofill::AutofillClient* autofill_client); 99 autofill::AutofillClient* autofill_client);
100 100
101 // Observer for PasswordGenerationPopup events. Used for testing. 101 // Observer for PasswordGenerationPopup events. Used for testing.
102 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); 102 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer);
103 103
104 // Returns true if the bubble UI is enabled, and false if we're still using 104 // Returns true if the bubble UI is enabled, and false if we're still using
105 // the sad old Infobar UI. 105 // the sad old Infobar UI.
106 static bool IsTheHotNewBubbleUIEnabled(); 106 static bool IsTheHotNewBubbleUIEnabled();
107 107
108 static void BindCredentialManager(
109 content::RenderFrameHost* render_frame_host,
110 password_manager::mojom::CredentialManagerRequest request);
111
108 protected: 112 protected:
109 // Callable for tests. 113 // Callable for tests.
110 ChromePasswordManagerClient(content::WebContents* web_contents, 114 ChromePasswordManagerClient(content::WebContents* web_contents,
111 autofill::AutofillClient* autofill_client); 115 autofill::AutofillClient* autofill_client);
112 116
113 private: 117 private:
114 friend class content::WebContentsUserData<ChromePasswordManagerClient>; 118 friend class content::WebContentsUserData<ChromePasswordManagerClient>;
115 119
116 // content::WebContentsObserver overrides. 120 // content::WebContentsObserver overrides.
117 bool OnMessageReceived(const IPC::Message& message, 121 bool OnMessageReceived(const IPC::Message& message,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // nothing was chosen. 163 // nothing was chosen.
160 void OnCredentialsChosen(const CredentialsCallback& callback, 164 void OnCredentialsChosen(const CredentialsCallback& callback,
161 const autofill::PasswordForm* form); 165 const autofill::PasswordForm* form);
162 166
163 Profile* const profile_; 167 Profile* const profile_;
164 168
165 password_manager::PasswordManager password_manager_; 169 password_manager::PasswordManager password_manager_;
166 170
167 password_manager::ContentPasswordManagerDriverFactory* driver_factory_; 171 password_manager::ContentPasswordManagerDriverFactory* driver_factory_;
168 172
169 password_manager::CredentialManagerDispatcher 173 // As a mojo service, will be registered into service registry
170 credential_manager_dispatcher_; 174 // of the main frame host by ChromeContentBrowserClient
175 // once main frame host was created.
176 password_manager::CredentialManagerImpl credential_manager_impl_;
171 177
172 // Observer for password generation popup. 178 // Observer for password generation popup.
173 autofill::PasswordGenerationPopupObserver* observer_; 179 autofill::PasswordGenerationPopupObserver* observer_;
174 180
175 // Controls the popup 181 // Controls the popup
176 base::WeakPtr< 182 base::WeakPtr<
177 autofill::PasswordGenerationPopupControllerImpl> popup_controller_; 183 autofill::PasswordGenerationPopupControllerImpl> popup_controller_;
178 184
179 // Set to false to disable password saving (will no longer ask if you 185 // Set to false to disable password saving (will no longer ask if you
180 // want to save passwords and also won't fill the passwords). 186 // want to save passwords and also won't fill the passwords).
181 BooleanPrefMember saving_and_filling_passwords_enabled_; 187 BooleanPrefMember saving_and_filling_passwords_enabled_;
182 188
183 const password_manager::SyncCredentialsFilter credentials_filter_; 189 const password_manager::SyncCredentialsFilter credentials_filter_;
184 190
185 std::unique_ptr<password_manager::LogManager> log_manager_; 191 std::unique_ptr<password_manager::LogManager> log_manager_;
186 192
187 // Set during 'NotifyUserCouldBeAutoSignedIn' in order to store the 193 // Set during 'NotifyUserCouldBeAutoSignedIn' in order to store the
188 // form for potential use during 'NotifySuccessfulLoginWithExistingPassword'. 194 // form for potential use during 'NotifySuccessfulLoginWithExistingPassword'.
189 std::unique_ptr<autofill::PasswordForm> possible_auto_sign_in_; 195 std::unique_ptr<autofill::PasswordForm> possible_auto_sign_in_;
190 196
191 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); 197 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient);
192 }; 198 };
193 199
194 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ 200 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/password_manager/chrome_password_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698