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

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

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 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_FACTORY_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_FACTORY_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_FACTORY_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/supports_user_data.h" 10 #include "base/supports_user_data.h"
11 #include "components/autofill/content/common/autofill_driver.mojom.h" 11 #include "components/autofill/content/common/autofill_driver.mojom.h"
12 #include "components/autofill/core/browser/autofill_driver_factory.h" 12 #include "components/autofill/core/browser/autofill_driver_factory.h"
13 #include "components/autofill/core/browser/autofill_manager.h" 13 #include "components/autofill/core/browser/autofill_manager.h"
14 #include "content/public/browser/web_contents_observer.h" 14 #include "content/public/browser/web_contents_observer.h"
15 #include "services/service_manager/public/cpp/bind_source_info.h"
15 16
16 namespace content { 17 namespace content {
17 class RenderFrameHost; 18 class RenderFrameHost;
18 } 19 }
19 20
20 namespace autofill { 21 namespace autofill {
21 22
22 class ContentAutofillDriver; 23 class ContentAutofillDriver;
23 24
24 // Manages lifetime of ContentAutofillDriver. One Factory per WebContents 25 // Manages lifetime of ContentAutofillDriver. One Factory per WebContents
25 // creates one Driver per RenderFrame. 26 // creates one Driver per RenderFrame.
26 class ContentAutofillDriverFactory : public AutofillDriverFactory, 27 class ContentAutofillDriverFactory : public AutofillDriverFactory,
27 public content::WebContentsObserver, 28 public content::WebContentsObserver,
28 public base::SupportsUserData::Data { 29 public base::SupportsUserData::Data {
29 public: 30 public:
30 ~ContentAutofillDriverFactory() override; 31 ~ContentAutofillDriverFactory() override;
31 32
32 static void CreateForWebContentsAndDelegate( 33 static void CreateForWebContentsAndDelegate(
33 content::WebContents* contents, 34 content::WebContents* contents,
34 AutofillClient* client, 35 AutofillClient* client,
35 const std::string& app_locale, 36 const std::string& app_locale,
36 AutofillManager::AutofillDownloadManagerState enable_download_manager); 37 AutofillManager::AutofillDownloadManagerState enable_download_manager);
37 static ContentAutofillDriverFactory* FromWebContents( 38 static ContentAutofillDriverFactory* FromWebContents(
38 content::WebContents* contents); 39 content::WebContents* contents);
39 static void BindAutofillDriver(content::RenderFrameHost* render_frame_host, 40 static void BindAutofillDriver(
40 mojom::AutofillDriverRequest request); 41 content::RenderFrameHost* render_frame_host,
42 const service_manager::BindSourceInfo& source_info,
43 mojom::AutofillDriverRequest request);
41 44
42 // Gets the |ContentAutofillDriver| associated with |render_frame_host|. 45 // Gets the |ContentAutofillDriver| associated with |render_frame_host|.
43 // |render_frame_host| must be owned by |web_contents()|. 46 // |render_frame_host| must be owned by |web_contents()|.
44 ContentAutofillDriver* DriverForFrame( 47 ContentAutofillDriver* DriverForFrame(
45 content::RenderFrameHost* render_frame_host); 48 content::RenderFrameHost* render_frame_host);
46 49
47 // content::WebContentsObserver: 50 // content::WebContentsObserver:
48 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; 51 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
49 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; 52 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
50 void DidFinishNavigation( 53 void DidFinishNavigation(
51 content::NavigationHandle* navigation_handle) override; 54 content::NavigationHandle* navigation_handle) override;
52 void WasHidden() override; 55 void WasHidden() override;
53 56
54 static const char kContentAutofillDriverFactoryWebContentsUserDataKey[]; 57 static const char kContentAutofillDriverFactoryWebContentsUserDataKey[];
55 58
56 private: 59 private:
57 ContentAutofillDriverFactory( 60 ContentAutofillDriverFactory(
58 content::WebContents* web_contents, 61 content::WebContents* web_contents,
59 AutofillClient* client, 62 AutofillClient* client,
60 const std::string& app_locale, 63 const std::string& app_locale,
61 AutofillManager::AutofillDownloadManagerState enable_download_manager); 64 AutofillManager::AutofillDownloadManagerState enable_download_manager);
62 65
63 std::string app_locale_; 66 std::string app_locale_;
64 AutofillManager::AutofillDownloadManagerState enable_download_manager_; 67 AutofillManager::AutofillDownloadManagerState enable_download_manager_;
65 }; 68 };
66 69
67 } // namespace autofill 70 } // namespace autofill
68 71
69 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_FACTORY_H _ 72 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_FACTORY_H _
OLDNEW
« no previous file with comments | « chromecast/browser/media/media_caps_impl.cc ('k') | components/autofill/content/browser/content_autofill_driver_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698