X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fpassword_manager%2Fchrome_password_manager_client.h;h=f57fc3b5652ae426c7f119945ea7a18b700c5dc7;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=f41cf73a827e09c20ac1459ecfa4833a69ed7bd0;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/password_manager/chrome_password_manager_client.h b/src/chrome/browser/password_manager/chrome_password_manager_client.h index f41cf73..f57fc3b 100644 --- a/src/chrome/browser/password_manager/chrome_password_manager_client.h +++ b/src/chrome/browser/password_manager/chrome_password_manager_client.h @@ -13,8 +13,6 @@ #include "content/public/browser/web_contents_user_data.h" #include "ui/gfx/rect.h" -class PasswordGenerationManager; -class PasswordManager; class Profile; namespace autofill { @@ -26,48 +24,64 @@ namespace content { class WebContents; } +namespace password_manager { +class PasswordGenerationManager; +class PasswordManager; +} + // ChromePasswordManagerClient implements the PasswordManagerClient interface. class ChromePasswordManagerClient - : public PasswordManagerClient, + : public password_manager::PasswordManagerClient, public content::WebContentsObserver, public content::WebContentsUserData { public: virtual ~ChromePasswordManagerClient(); // PasswordManagerClient implementation. - virtual void PromptUserToSavePassword(PasswordFormManager* form_to_save) - OVERRIDE; + virtual bool IsAutomaticPasswordSavingEnabled() const OVERRIDE; + virtual void PromptUserToSavePassword( + password_manager::PasswordFormManager* form_to_save) OVERRIDE; virtual void PasswordWasAutofilled( const autofill::PasswordFormMap& best_matches) const OVERRIDE; + virtual void PasswordAutofillWasBlocked( + const autofill::PasswordFormMap& best_matches) const OVERRIDE; virtual void AuthenticateAutofillAndFillForm( scoped_ptr fill_data) OVERRIDE; virtual PrefService* GetPrefs() OVERRIDE; - virtual PasswordStore* GetPasswordStore() OVERRIDE; - virtual PasswordManagerDriver* GetDriver() OVERRIDE; + virtual password_manager::PasswordStore* GetPasswordStore() OVERRIDE; + virtual password_manager::PasswordManagerDriver* GetDriver() OVERRIDE; virtual base::FieldTrial::Probability GetProbabilityForExperiment( const std::string& experiment_name) OVERRIDE; virtual bool IsPasswordSyncEnabled() OVERRIDE; - virtual void SetLogger(PasswordManagerLogger* logger) OVERRIDE; + virtual void SetLogger(password_manager::PasswordManagerLogger* logger) + OVERRIDE; virtual void LogSavePasswordProgress(const std::string& text) OVERRIDE; + virtual bool IsLoggingActive() const OVERRIDE; // Hides any visible generation UI. void HidePasswordGenerationPopup(); + static void CreateForWebContentsWithAutofillManagerDelegate( + content::WebContents* contents, + autofill::AutofillManagerDelegate* delegate); + // Convenience method to allow //chrome code easy access to a PasswordManager // from a WebContents instance. - static PasswordManager* GetManagerFromWebContents( + static password_manager::PasswordManager* GetManagerFromWebContents( content::WebContents* contents); // Convenience method to allow //chrome code easy access to a // PasswordGenerationManager from a WebContents instance. - static PasswordGenerationManager* GetGenerationManagerFromWebContents( - content::WebContents* contents); + static password_manager::PasswordGenerationManager* + GetGenerationManagerFromWebContents(content::WebContents* contents); // Observer for PasswordGenerationPopup events. Used for testing. void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); private: - explicit ChromePasswordManagerClient(content::WebContents* web_contents); + ChromePasswordManagerClient( + content::WebContents* web_contents, + autofill::AutofillManagerDelegate* autofill_manager_delegate); friend class content::WebContentsUserData; // content::WebContentsObserver overrides. @@ -95,7 +109,7 @@ class ChromePasswordManagerClient Profile* GetProfile(); - ContentPasswordManagerDriver driver_; + password_manager::ContentPasswordManagerDriver driver_; // Observer for password generation popup. autofill::PasswordGenerationPopupObserver* observer_; @@ -110,7 +124,7 @@ class ChromePasswordManagerClient // Points to an active logger instance to use for, e.g., reporting progress on // saving passwords. If there is no active logger (most of the time), the // pointer will be NULL. - PasswordManagerLogger* logger_; + password_manager::PasswordManagerLogger* logger_; DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); };