| OLD | NEW |
| 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 navigation_handle)); | 526 navigation_handle)); |
| 527 } | 527 } |
| 528 return throttles; | 528 return throttles; |
| 529 } | 529 } |
| 530 | 530 |
| 531 content::DevToolsManagerDelegate* | 531 content::DevToolsManagerDelegate* |
| 532 AwContentBrowserClient::GetDevToolsManagerDelegate() { | 532 AwContentBrowserClient::GetDevToolsManagerDelegate() { |
| 533 return new AwDevToolsManagerDelegate(); | 533 return new AwDevToolsManagerDelegate(); |
| 534 } | 534 } |
| 535 | 535 |
| 536 std::unique_ptr<base::Value> | 536 std::unique_ptr<base::Value> AwContentBrowserClient::GetServiceManifestOverlay( |
| 537 AwContentBrowserClient::GetServiceManifestOverlay(const std::string& name) { | 537 base::StringPiece name) { |
| 538 int id = -1; | 538 int id = -1; |
| 539 if (name == content::mojom::kBrowserServiceName) | 539 if (name == content::mojom::kBrowserServiceName) |
| 540 id = IDR_AW_BROWSER_MANIFEST_OVERLAY; | 540 id = IDR_AW_BROWSER_MANIFEST_OVERLAY; |
| 541 else if (name == content::mojom::kRendererServiceName) | 541 else if (name == content::mojom::kRendererServiceName) |
| 542 id = IDR_AW_RENDERER_MANIFEST_OVERLAY; | 542 id = IDR_AW_RENDERER_MANIFEST_OVERLAY; |
| 543 if (id == -1) | 543 if (id == -1) |
| 544 return nullptr; | 544 return nullptr; |
| 545 | 545 |
| 546 base::StringPiece manifest_contents = | 546 base::StringPiece manifest_contents = |
| 547 ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( | 547 ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( |
| 548 id, ui::ScaleFactor::SCALE_FACTOR_NONE); | 548 id, ui::ScaleFactor::SCALE_FACTOR_NONE); |
| 549 return base::JSONReader::Read(manifest_contents); | 549 return base::JSONReader::Read(manifest_contents); |
| 550 } | 550 } |
| 551 | 551 |
| 552 void AwContentBrowserClient::RegisterRenderFrameMojoInterfaces( | 552 void AwContentBrowserClient::RegisterRenderFrameMojoInterfaces( |
| 553 service_manager::InterfaceRegistry* registry, | 553 service_manager::InterfaceRegistry* registry, |
| 554 content::RenderFrameHost* render_frame_host) { | 554 content::RenderFrameHost* render_frame_host) { |
| 555 registry->AddInterface( | 555 registry->AddInterface( |
| 556 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, | 556 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, |
| 557 render_frame_host)); | 557 render_frame_host)); |
| 558 | 558 |
| 559 // Although WebView does not support password manager feature, renderer code | 559 // Although WebView does not support password manager feature, renderer code |
| 560 // could still request this interface, so we register a dummy binder which | 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 | 561 // just drops the incoming request, to avoid the 'Failed to locate a binder |
| 562 // for interface' error log.. | 562 // for interface' error log.. |
| 563 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); | 563 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); |
| 564 } | 564 } |
| 565 | 565 |
| 566 } // namespace android_webview | 566 } // namespace android_webview |
| OLD | NEW |