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

Side by Side Diff: android_webview/browser/aw_content_browser_client.cc

Issue 2584903003: [android_webview] Register a dummy binder for autofill::mojom::PasswordManagerDriver (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "android_webview/browser/aw_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 152
153 void AwContentsMessageFilter::OnSubFrameCreated(int parent_render_frame_id, 153 void AwContentsMessageFilter::OnSubFrameCreated(int parent_render_frame_id,
154 int child_render_frame_id) { 154 int child_render_frame_id) {
155 AwContentsIoThreadClient::SubFrameCreated( 155 AwContentsIoThreadClient::SubFrameCreated(
156 process_id_, parent_render_frame_id, child_render_frame_id); 156 process_id_, parent_render_frame_id, child_render_frame_id);
157 } 157 }
158 158
159 AwLocaleManager* g_locale_manager = NULL; 159 AwLocaleManager* g_locale_manager = NULL;
160 160
161 // A dummy binder for mojo interface autofill::mojom::PasswordManagerDriver.
162 void DummyBindPasswordManagerDriver(
163 autofill::mojom::PasswordManagerDriverRequest request) {}
164
161 } // anonymous namespace 165 } // anonymous namespace
162 166
163 // TODO(yirui): can use similar logic as in PrependToAcceptLanguagesIfNecessary 167 // TODO(yirui): can use similar logic as in PrependToAcceptLanguagesIfNecessary
164 // in chrome/browser/android/preferences/pref_service_bridge.cc 168 // in chrome/browser/android/preferences/pref_service_bridge.cc
165 // static 169 // static
166 std::string AwContentBrowserClient::GetAcceptLangsImpl() { 170 std::string AwContentBrowserClient::GetAcceptLangsImpl() {
167 // Start with the current locale(s) in BCP47 format. 171 // Start with the current locale(s) in BCP47 format.
168 std::string locales_string = g_locale_manager->GetLocaleList(); 172 std::string locales_string = g_locale_manager->GetLocaleList();
169 173
170 // If accept languages do not contain en-US, add in en-US which will be 174 // If accept languages do not contain en-US, add in en-US which will be
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 id, ui::ScaleFactor::SCALE_FACTOR_NONE); 548 id, ui::ScaleFactor::SCALE_FACTOR_NONE);
545 return base::JSONReader::Read(manifest_contents); 549 return base::JSONReader::Read(manifest_contents);
546 } 550 }
547 551
548 void AwContentBrowserClient::RegisterRenderFrameMojoInterfaces( 552 void AwContentBrowserClient::RegisterRenderFrameMojoInterfaces(
549 service_manager::InterfaceRegistry* registry, 553 service_manager::InterfaceRegistry* registry,
550 content::RenderFrameHost* render_frame_host) { 554 content::RenderFrameHost* render_frame_host) {
551 registry->AddInterface( 555 registry->AddInterface(
552 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, 556 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver,
553 render_frame_host)); 557 render_frame_host));
558
559 // Although WebView does not support password manager feature, renderer code
560 // could still request this interface, so we register a dummy binder which
561 // just drops the incoming request, to avoid the 'Failed to locate a binder
562 // for interface' error log..
563 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver));
554 } 564 }
555 565
556 } // namespace android_webview 566 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698