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

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

Issue 2501913002: Change the NaCl loader and broker processes to use the ServiceManager. (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
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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 navigation_handle)); 535 navigation_handle));
536 } 536 }
537 return throttles; 537 return throttles;
538 } 538 }
539 539
540 content::DevToolsManagerDelegate* 540 content::DevToolsManagerDelegate*
541 AwContentBrowserClient::GetDevToolsManagerDelegate() { 541 AwContentBrowserClient::GetDevToolsManagerDelegate() {
542 return new AwDevToolsManagerDelegate(); 542 return new AwDevToolsManagerDelegate();
543 } 543 }
544 544
545 std::unique_ptr<base::Value> 545 std::unique_ptr<base::Value> AwContentBrowserClient::GetServiceManifestOverlay(
546 AwContentBrowserClient::GetServiceManifestOverlay(const std::string& name) { 546 base::StringPiece name) {
547 int id = -1; 547 int id = -1;
548 if (name == content::mojom::kBrowserServiceName) 548 if (name == content::mojom::kBrowserServiceName)
549 id = IDR_AW_BROWSER_MANIFEST_OVERLAY; 549 id = IDR_AW_BROWSER_MANIFEST_OVERLAY;
550 else if (name == content::mojom::kRendererServiceName) 550 else if (name == content::mojom::kRendererServiceName)
551 id = IDR_AW_RENDERER_MANIFEST_OVERLAY; 551 id = IDR_AW_RENDERER_MANIFEST_OVERLAY;
552 if (id == -1) 552 if (id == -1)
553 return nullptr; 553 return nullptr;
554 554
555 base::StringPiece manifest_contents = 555 base::StringPiece manifest_contents =
556 ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 556 ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
557 id, ui::ScaleFactor::SCALE_FACTOR_NONE); 557 id, ui::ScaleFactor::SCALE_FACTOR_NONE);
558 return base::JSONReader::Read(manifest_contents); 558 return base::JSONReader::Read(manifest_contents);
559 } 559 }
560 560
561 void AwContentBrowserClient::RegisterRenderFrameMojoInterfaces( 561 void AwContentBrowserClient::RegisterRenderFrameMojoInterfaces(
562 service_manager::InterfaceRegistry* registry, 562 service_manager::InterfaceRegistry* registry,
563 content::RenderFrameHost* render_frame_host) { 563 content::RenderFrameHost* render_frame_host) {
564 registry->AddInterface( 564 registry->AddInterface(
565 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, 565 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver,
566 render_frame_host)); 566 render_frame_host));
567 } 567 }
568 568
569 } // namespace android_webview 569 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698