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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2214383002: Move registration of Java mojo interfaces to the new InterfaceRegistrar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java-content-interface-registry
Patch Set: fix vr_shell build Created 4 years, 2 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
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 91 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
92 #include "services/shell/public/cpp/connector.h" 92 #include "services/shell/public/cpp/connector.h"
93 #include "services/shell/public/cpp/interface_provider.h" 93 #include "services/shell/public/cpp/interface_provider.h"
94 #include "ui/accessibility/ax_tree.h" 94 #include "ui/accessibility/ax_tree.h"
95 #include "ui/accessibility/ax_tree_update.h" 95 #include "ui/accessibility/ax_tree_update.h"
96 #include "ui/gfx/geometry/quad_f.h" 96 #include "ui/gfx/geometry/quad_f.h"
97 #include "url/gurl.h" 97 #include "url/gurl.h"
98 98
99 #if defined(OS_ANDROID) 99 #if defined(OS_ANDROID)
100 #include "content/browser/mojo/interface_registrar_android.h" 100 #include "content/browser/mojo/interface_registrar_android.h"
101 #include "content/public/browser/android/java_interfaces.h"
101 #if defined(ENABLE_MOJO_CDM) 102 #if defined(ENABLE_MOJO_CDM)
102 #include "content/browser/media/android/provision_fetcher_impl.h" 103 #include "content/browser/media/android/provision_fetcher_impl.h"
103 #endif 104 #endif
104 #endif 105 #endif
105 106
106 #if defined(OS_MACOSX) 107 #if defined(OS_MACOSX)
107 #include "content/browser/frame_host/popup_menu_helper_mac.h" 108 #include "content/browser/frame_host/popup_menu_helper_mac.h"
108 #endif 109 #endif
109 110
110 #if defined(ENABLE_WEBVR) 111 #if defined(ENABLE_WEBVR)
(...skipping 2026 matching lines...) Expand 10 before | Expand all | Expand 10 after
2137 if (!permission_service_context_) 2138 if (!permission_service_context_)
2138 permission_service_context_.reset(new PermissionServiceContext(this)); 2139 permission_service_context_.reset(new PermissionServiceContext(this));
2139 2140
2140 GetInterfaceRegistry()->AddInterface( 2141 GetInterfaceRegistry()->AddInterface(
2141 base::Bind(&PermissionServiceContext::CreateService, 2142 base::Bind(&PermissionServiceContext::CreateService,
2142 base::Unretained(permission_service_context_.get()))); 2143 base::Unretained(permission_service_context_.get())));
2143 2144
2144 GetInterfaceRegistry()->AddInterface(base::Bind( 2145 GetInterfaceRegistry()->AddInterface(base::Bind(
2145 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); 2146 &PresentationServiceImpl::CreateMojoService, base::Unretained(this)));
2146 2147
2147 #if !defined(OS_ANDROID) 2148 #if defined(OS_ANDROID)
2149 GetInterfaceRegistry()->AddInterface(
2150 GetGlobalJavaInterfaces()
2151 ->CreateInterfaceFactory<device::VibrationManager>());
2152 #else
2148 GetInterfaceRegistry()->AddInterface( 2153 GetInterfaceRegistry()->AddInterface(
2149 base::Bind(&device::VibrationManagerImpl::Create)); 2154 base::Bind(&device::VibrationManagerImpl::Create));
2150 #endif 2155 #endif
2151 2156
2152 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( 2157 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch(
2153 switches::kEnableWebBluetooth); 2158 switches::kEnableWebBluetooth);
2154 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) 2159 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX)
2155 enable_web_bluetooth = true; 2160 enable_web_bluetooth = true;
2156 #endif 2161 #endif
2157 2162
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3092 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3088 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3093 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3089 return web_bluetooth_service_.get(); 3094 return web_bluetooth_service_.get();
3090 } 3095 }
3091 3096
3092 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3097 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3093 web_bluetooth_service_.reset(); 3098 web_bluetooth_service_.reset();
3094 } 3099 }
3095 3100
3096 } // namespace content 3101 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698