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

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

Issue 2024603002: [Autofill] Register AutofillDriver mojo interface earlier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix trybot failure Created 4 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
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 <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 11
12 #include "base/supports_user_data.h" 12 #include "base/supports_user_data.h"
13 #include "components/autofill/content/public/interfaces/autofill_driver.mojom.h"
13 #include "components/autofill/core/browser/autofill_manager.h" 14 #include "components/autofill/core/browser/autofill_manager.h"
14 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
15 16
16 namespace content { 17 namespace content {
17 class RenderFrameHost; 18 class RenderFrameHost;
18 } 19 }
19 20
20 namespace IPC { 21 namespace IPC {
21 class Message; 22 class Message;
22 } 23 }
(...skipping 10 matching lines...) Expand all
33 public: 34 public:
34 ~ContentAutofillDriverFactory() override; 35 ~ContentAutofillDriverFactory() override;
35 36
36 static void CreateForWebContentsAndDelegate( 37 static void CreateForWebContentsAndDelegate(
37 content::WebContents* contents, 38 content::WebContents* contents,
38 AutofillClient* client, 39 AutofillClient* client,
39 const std::string& app_locale, 40 const std::string& app_locale,
40 AutofillManager::AutofillDownloadManagerState enable_download_manager); 41 AutofillManager::AutofillDownloadManagerState enable_download_manager);
41 static ContentAutofillDriverFactory* FromWebContents( 42 static ContentAutofillDriverFactory* FromWebContents(
42 content::WebContents* contents); 43 content::WebContents* contents);
44 static void BindAutofillDriver(content::RenderFrameHost* render_frame_host,
45 mojom::AutofillDriverRequest request);
43 46
44 // Gets the |ContentAutofillDriver| associated with |render_frame_host|. 47 // Gets the |ContentAutofillDriver| associated with |render_frame_host|.
45 // |render_frame_host| must be owned by |web_contents()|. 48 // |render_frame_host| must be owned by |web_contents()|.
46 ContentAutofillDriver* DriverForFrame( 49 ContentAutofillDriver* DriverForFrame(
47 content::RenderFrameHost* render_frame_host); 50 content::RenderFrameHost* render_frame_host);
48 51
49 // content::WebContentsObserver: 52 // content::WebContentsObserver:
50 bool OnMessageReceived(const IPC::Message& message, 53 bool OnMessageReceived(const IPC::Message& message,
51 content::RenderFrameHost* render_frame_host) override; 54 content::RenderFrameHost* render_frame_host) override;
52 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; 55 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
(...skipping 20 matching lines...) Expand all
73 std::string app_locale_; 76 std::string app_locale_;
74 AutofillManager::AutofillDownloadManagerState enable_download_manager_; 77 AutofillManager::AutofillDownloadManagerState enable_download_manager_;
75 78
76 std::map<content::RenderFrameHost*, std::unique_ptr<ContentAutofillDriver>> 79 std::map<content::RenderFrameHost*, std::unique_ptr<ContentAutofillDriver>>
77 frame_driver_map_; 80 frame_driver_map_;
78 }; 81 };
79 82
80 } // namespace autofill 83 } // namespace autofill
81 84
82 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_FACTORY_H _ 85 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_FACTORY_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698