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

Side by Side Diff: components/autofill/content/browser/autofill_driver_impl.h

Issue 17450010: Create AutofillDriverImpl unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase after conflict Created 7 years, 6 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 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 AutofillExternalDelegate* autofill_external_delegate() { 47 AutofillExternalDelegate* autofill_external_delegate() {
48 return autofill_external_delegate_.get(); 48 return autofill_external_delegate_.get();
49 } 49 }
50 50
51 // Sets the external delegate to |delegate| both within this class and in the 51 // Sets the external delegate to |delegate| both within this class and in the
52 // shared Autofill code. Takes ownership of |delegate|. 52 // shared Autofill code. Takes ownership of |delegate|.
53 void SetAutofillExternalDelegate( 53 void SetAutofillExternalDelegate(
54 scoped_ptr<AutofillExternalDelegate> delegate); 54 scoped_ptr<AutofillExternalDelegate> delegate);
55 55
56 AutofillManager* autofill_manager() { return &autofill_manager_; } 56 AutofillManager* autofill_manager() { return autofill_manager_.get(); }
57 57
58 private: 58 protected:
59 AutofillDriverImpl( 59 AutofillDriverImpl(
60 content::WebContents* web_contents, 60 content::WebContents* web_contents,
61 autofill::AutofillManagerDelegate* delegate, 61 autofill::AutofillManagerDelegate* delegate,
62 const std::string& app_locale, 62 const std::string& app_locale,
63 AutofillManager::AutofillDownloadManagerState enable_download_manager); 63 AutofillManager::AutofillDownloadManagerState enable_download_manager);
64 virtual ~AutofillDriverImpl(); 64 virtual ~AutofillDriverImpl();
65 65
66 // content::WebContentsObserver: 66 // content::WebContentsObserver:
67 virtual void DidNavigateMainFrame( 67 virtual void DidNavigateMainFrame(
68 const content::LoadCommittedDetails& details, 68 const content::LoadCommittedDetails& details,
69 const content::FrameNavigateParams& params) OVERRIDE; 69 const content::FrameNavigateParams& params) OVERRIDE;
70 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 70 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
71 71
72 // Sets the manager to |manager| and sets |manager|'s external delegate
73 // to |autofill_external_delegate_|. Takes ownership of |manager|.
74 void SetAutofillManager(scoped_ptr<AutofillManager> manager);
75
76 private:
72 // AutofillExternalDelegate instance that this object instantiates in the 77 // AutofillExternalDelegate instance that this object instantiates in the
73 // case where the autofill native UI is enabled. 78 // case where the autofill native UI is enabled.
74 scoped_ptr<AutofillExternalDelegate> autofill_external_delegate_; 79 scoped_ptr<AutofillExternalDelegate> autofill_external_delegate_;
75 80
76 // AutofillManager instance via which this object drives the shared Autofill 81 // AutofillManager instance via which this object drives the shared Autofill
77 // code. 82 // code.
78 AutofillManager autofill_manager_; 83 scoped_ptr<AutofillManager> autofill_manager_;
79 }; 84 };
80 85
81 } // namespace autofill 86 } // namespace autofill
82 87
83 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_ 88 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOFILL_DRIVER_IMPL_H_
OLDNEW
« no previous file with comments | « components/autofill/content/browser/DEPS ('k') | components/autofill/content/browser/autofill_driver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698