Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / password_manager / password_manager_delegate_impl.h
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_IMPL_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_IMPL_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/password_manager/password_manager_delegate.h"
11 #include "content/public/browser/web_contents_user_data.h"
12
13 namespace content {
14 class WebContents;
15 }
16
17 class PasswordManagerDelegateImpl
18     : public PasswordManagerDelegate,
19       public content::WebContentsUserData<PasswordManagerDelegateImpl> {
20  public:
21   virtual ~PasswordManagerDelegateImpl();
22
23   // PasswordManagerDelegate implementation.
24   virtual void FillPasswordForm(
25       const autofill::PasswordFormFillData& form_data) OVERRIDE;
26   virtual void AddSavePasswordInfoBarIfPermitted(
27       PasswordFormManager* form_to_save) OVERRIDE;
28   virtual Profile* GetProfile() OVERRIDE;
29   virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE;
30
31  private:
32   explicit PasswordManagerDelegateImpl(content::WebContents* web_contents);
33   friend class content::WebContentsUserData<PasswordManagerDelegateImpl>;
34
35   content::WebContents* web_contents_;
36
37   DISALLOW_COPY_AND_ASSIGN(PasswordManagerDelegateImpl);
38 };
39
40 #endif  // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_IMPL_H_