Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 | 47 |
| 48 AutofillExternalDelegate* autofill_external_delegate() { | 48 AutofillExternalDelegate* autofill_external_delegate() { |
| 49 return autofill_external_delegate_.get(); | 49 return autofill_external_delegate_.get(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 // Sets the external delegate to |delegate| both within this class and in the | 52 // Sets the external delegate to |delegate| both within this class and in the |
| 53 // shared Autofill code. Takes ownership of |delegate|. | 53 // shared Autofill code. Takes ownership of |delegate|. |
| 54 void SetAutofillExternalDelegate( | 54 void SetAutofillExternalDelegate( |
| 55 scoped_ptr<AutofillExternalDelegate> delegate); | 55 scoped_ptr<AutofillExternalDelegate> delegate); |
| 56 | 56 |
| 57 AutofillManager* autofill_manager() { return &autofill_manager_; } | 57 AutofillManager* autofill_manager() { return autofill_manager_.get(); } |
| 58 | 58 |
| 59 private: | 59 protected: |
| 60 AutofillDriverImpl( | 60 AutofillDriverImpl( |
| 61 content::WebContents* web_contents, | 61 content::WebContents* web_contents, |
| 62 autofill::AutofillManagerDelegate* delegate, | 62 autofill::AutofillManagerDelegate* delegate, |
| 63 const std::string& app_locale, | 63 const std::string& app_locale, |
| 64 AutofillManager::AutofillDownloadManagerState enable_download_manager, | 64 AutofillManager::AutofillDownloadManagerState enable_download_manager, |
| 65 bool enable_native_ui); | 65 bool enable_native_ui); |
| 66 virtual ~AutofillDriverImpl(); | 66 virtual ~AutofillDriverImpl(); |
| 67 | 67 |
| 68 // content::WebContentsObserver: | 68 // content::WebContentsObserver: |
| 69 virtual void DidNavigateMainFrame( | 69 virtual void DidNavigateMainFrame( |
| 70 const content::LoadCommittedDetails& details, | 70 const content::LoadCommittedDetails& details, |
| 71 const content::FrameNavigateParams& params) OVERRIDE; | 71 const content::FrameNavigateParams& params) OVERRIDE; |
| 72 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 72 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 73 | 73 |
| 74 // Sets the manager to |manager|. Takes ownership of |manager|. | |
|
Ilya Sherman
2013/06/21 20:19:24
nit: Please document that the manager's external d
blundell
2013/06/22 06:29:06
Done.
| |
| 75 void SetAutofillManager(scoped_ptr<AutofillManager> manager); | |
| 76 | |
| 77 private: | |
| 78 | |
|
Ilya Sherman
2013/06/21 20:19:24
nit: Spurious newline.
blundell
2013/06/22 06:29:06
Done.
| |
| 74 // AutofillExternalDelegate instance that this object instantiates in the | 79 // AutofillExternalDelegate instance that this object instantiates in the |
| 75 // case where the autofill native UI is enabled. | 80 // case where the autofill native UI is enabled. |
| 76 scoped_ptr<AutofillExternalDelegate> autofill_external_delegate_; | 81 scoped_ptr<AutofillExternalDelegate> autofill_external_delegate_; |
| 77 | 82 |
| 78 // AutofillManager instance via which this object drives the shared Autofill | 83 // AutofillManager instance via which this object drives the shared Autofill |
| 79 // code. | 84 // code. |
| 80 AutofillManager autofill_manager_; | 85 scoped_ptr<AutofillManager> autofill_manager_; |
| 81 }; | 86 }; |
| 82 | 87 |
| 83 } // namespace autofill | 88 } // namespace autofill |
| 84 | 89 |
| 85 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_ | 90 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_ |
| OLD | NEW |