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

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

Issue 1859453002: components/autofill: scoped_ptr -> unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 4 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
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 COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/memory/scoped_ptr.h"
11 #include "base/supports_user_data.h" 11 #include "base/supports_user_data.h"
12 #include "components/autofill/content/browser/request_autocomplete_manager.h" 12 #include "components/autofill/content/browser/request_autocomplete_manager.h"
13 #include "components/autofill/core/browser/autofill_driver.h" 13 #include "components/autofill/core/browser/autofill_driver.h"
14 #include "components/autofill/core/browser/autofill_external_delegate.h" 14 #include "components/autofill/core/browser/autofill_external_delegate.h"
15 #include "components/autofill/core/browser/autofill_manager.h" 15 #include "components/autofill/core/browser/autofill_manager.h"
16 16
17 namespace content { 17 namespace content {
18 class BrowserContext; 18 class BrowserContext;
19 class RenderFrameHost; 19 class RenderFrameHost;
20 struct FrameNavigateParams; 20 struct FrameNavigateParams;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 AutofillExternalDelegate* autofill_external_delegate() { 74 AutofillExternalDelegate* autofill_external_delegate() {
75 return &autofill_external_delegate_; 75 return &autofill_external_delegate_;
76 } 76 }
77 77
78 AutofillManager* autofill_manager() { return autofill_manager_.get(); } 78 AutofillManager* autofill_manager() { return autofill_manager_.get(); }
79 content::RenderFrameHost* render_frame_host() { return render_frame_host_; } 79 content::RenderFrameHost* render_frame_host() { return render_frame_host_; }
80 80
81 protected: 81 protected:
82 // Sets the manager to |manager| and sets |manager|'s external delegate 82 // Sets the manager to |manager| and sets |manager|'s external delegate
83 // to |autofill_external_delegate_|. Takes ownership of |manager|. 83 // to |autofill_external_delegate_|. Takes ownership of |manager|.
84 void SetAutofillManager(scoped_ptr<AutofillManager> manager); 84 void SetAutofillManager(std::unique_ptr<AutofillManager> manager);
85 85
86 private: 86 private:
87 // Weak ref to the RenderFrameHost the driver is associated with. Should 87 // Weak ref to the RenderFrameHost the driver is associated with. Should
88 // always be non-NULL and valid for lifetime of |this|. 88 // always be non-NULL and valid for lifetime of |this|.
89 content::RenderFrameHost* const render_frame_host_; 89 content::RenderFrameHost* const render_frame_host_;
90 90
91 // The per-tab client. 91 // The per-tab client.
92 AutofillClient* client_; 92 AutofillClient* client_;
93 93
94 // AutofillManager instance via which this object drives the shared Autofill 94 // AutofillManager instance via which this object drives the shared Autofill
95 // code. 95 // code.
96 scoped_ptr<AutofillManager> autofill_manager_; 96 std::unique_ptr<AutofillManager> autofill_manager_;
97 97
98 // AutofillExternalDelegate instance that this object instantiates in the 98 // AutofillExternalDelegate instance that this object instantiates in the
99 // case where the Autofill native UI is enabled. 99 // case where the Autofill native UI is enabled.
100 AutofillExternalDelegate autofill_external_delegate_; 100 AutofillExternalDelegate autofill_external_delegate_;
101 101
102 // Driver for the interactive autocomplete dialog. 102 // Driver for the interactive autocomplete dialog.
103 RequestAutocompleteManager request_autocomplete_manager_; 103 RequestAutocompleteManager request_autocomplete_manager_;
104 }; 104 };
105 105
106 } // namespace autofill 106 } // namespace autofill
107 107
108 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_ 108 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698