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

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

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 #include "components/autofill/content/browser/content_autofill_driver_factory.h" 5 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // static 61 // static
62 ContentAutofillDriverFactory* ContentAutofillDriverFactory::FromWebContents( 62 ContentAutofillDriverFactory* ContentAutofillDriverFactory::FromWebContents(
63 content::WebContents* contents) { 63 content::WebContents* contents) {
64 return static_cast<ContentAutofillDriverFactory*>(contents->GetUserData( 64 return static_cast<ContentAutofillDriverFactory*>(contents->GetUserData(
65 kContentAutofillDriverFactoryWebContentsUserDataKey)); 65 kContentAutofillDriverFactoryWebContentsUserDataKey));
66 } 66 }
67 67
68 // static 68 // static
69 void ContentAutofillDriverFactory::BindAutofillDriver( 69 void ContentAutofillDriverFactory::BindAutofillDriver(
70 content::RenderFrameHost* render_frame_host, 70 content::RenderFrameHost* render_frame_host,
71 const service_manager::BindSourceInfo& source_info,
71 mojom::AutofillDriverRequest request) { 72 mojom::AutofillDriverRequest request) {
72 content::WebContents* web_contents = 73 content::WebContents* web_contents =
73 content::WebContents::FromRenderFrameHost(render_frame_host); 74 content::WebContents::FromRenderFrameHost(render_frame_host);
74 // We try to bind to the driver of this render frame host, 75 // We try to bind to the driver of this render frame host,
75 // but if driver is not ready for this render frame host for now, 76 // but if driver is not ready for this render frame host for now,
76 // the request will be just dropped, this would cause closing the message pipe 77 // the request will be just dropped, this would cause closing the message pipe
77 // which would raise connection error to peer side. 78 // which would raise connection error to peer side.
78 // Peer side could reconnect later when needed. 79 // Peer side could reconnect later when needed.
79 if (!web_contents) 80 if (!web_contents)
80 return; 81 return;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 NavigationFinished(); 128 NavigationFinished();
128 DriverForFrame(navigation_handle->GetRenderFrameHost()) 129 DriverForFrame(navigation_handle->GetRenderFrameHost())
129 ->DidNavigateFrame(navigation_handle); 130 ->DidNavigateFrame(navigation_handle);
130 } 131 }
131 132
132 void ContentAutofillDriverFactory::WasHidden() { 133 void ContentAutofillDriverFactory::WasHidden() {
133 TabHidden(); 134 TabHidden();
134 } 135 }
135 136
136 } // namespace autofill 137 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698