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

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

Issue 184103016: Autofill: Refactoring to support fetching password after a username is selected (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error on Chrome OS. Created 6 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 | Annotate | Revision Log
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 "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"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual PasswordManagerDriver* GetDriver() OVERRIDE; 46 virtual PasswordManagerDriver* GetDriver() OVERRIDE;
47 virtual base::FieldTrial::Probability GetProbabilityForExperiment( 47 virtual base::FieldTrial::Probability GetProbabilityForExperiment(
48 const std::string& experiment_name) OVERRIDE; 48 const std::string& experiment_name) OVERRIDE;
49 virtual bool IsPasswordSyncEnabled() OVERRIDE; 49 virtual bool IsPasswordSyncEnabled() OVERRIDE;
50 virtual void SetLogger(PasswordManagerLogger* logger) OVERRIDE; 50 virtual void SetLogger(PasswordManagerLogger* logger) OVERRIDE;
51 virtual void LogSavePasswordProgress(const std::string& text) OVERRIDE; 51 virtual void LogSavePasswordProgress(const std::string& text) OVERRIDE;
52 52
53 // Hides any visible generation UI. 53 // Hides any visible generation UI.
54 void HidePasswordGenerationPopup(); 54 void HidePasswordGenerationPopup();
55 55
56 static void CreateForWebContentsWithAutofillManagerDelegate(
57 content::WebContents* contents,
58 autofill::AutofillManagerDelegate* delegate);
59
56 // Convenience method to allow //chrome code easy access to a PasswordManager 60 // Convenience method to allow //chrome code easy access to a PasswordManager
57 // from a WebContents instance. 61 // from a WebContents instance.
58 static PasswordManager* GetManagerFromWebContents( 62 static PasswordManager* GetManagerFromWebContents(
59 content::WebContents* contents); 63 content::WebContents* contents);
60 64
61 // Convenience method to allow //chrome code easy access to a 65 // Convenience method to allow //chrome code easy access to a
62 // PasswordGenerationManager from a WebContents instance. 66 // PasswordGenerationManager from a WebContents instance.
63 static PasswordGenerationManager* GetGenerationManagerFromWebContents( 67 static PasswordGenerationManager* GetGenerationManagerFromWebContents(
64 content::WebContents* contents); 68 content::WebContents* contents);
65 69
66 // Observer for PasswordGenerationPopup events. Used for testing. 70 // Observer for PasswordGenerationPopup events. Used for testing.
67 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); 71 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer);
68 72
69 private: 73 private:
70 explicit ChromePasswordManagerClient(content::WebContents* web_contents); 74 ChromePasswordManagerClient(
75 content::WebContents* web_contents,
76 autofill::AutofillManagerDelegate* autofill_manager_delegate);
71 friend class content::WebContentsUserData<ChromePasswordManagerClient>; 77 friend class content::WebContentsUserData<ChromePasswordManagerClient>;
72 78
73 // content::WebContentsObserver overrides. 79 // content::WebContentsObserver overrides.
74 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 80 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
75 81
76 // Callback method to be triggered when authentication is successful for a 82 // Callback method to be triggered when authentication is successful for a
77 // given password authentication request. If authentication is disabled or 83 // given password authentication request. If authentication is disabled or
78 // not supported, this will be triggered directly. 84 // not supported, this will be triggered directly.
79 void CommitFillPasswordForm(autofill::PasswordFormFillData* fill_data); 85 void CommitFillPasswordForm(autofill::PasswordFormFillData* fill_data);
80 86
(...skipping 28 matching lines...) Expand all
109 115
110 // Points to an active logger instance to use for, e.g., reporting progress on 116 // Points to an active logger instance to use for, e.g., reporting progress on
111 // saving passwords. If there is no active logger (most of the time), the 117 // saving passwords. If there is no active logger (most of the time), the
112 // pointer will be NULL. 118 // pointer will be NULL.
113 PasswordManagerLogger* logger_; 119 PasswordManagerLogger* logger_;
114 120
115 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); 121 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient);
116 }; 122 };
117 123
118 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ 124 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698