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

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

Issue 2755363002: [DeviceService] Port VibrationManager to be hosted in Device Service (Closed)
Patch Set: Rebase only Created 3 years, 9 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/public/android/BUILD.gn » ('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 <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 #include "content/public/common/content_switches.h" 90 #include "content/public/common/content_switches.h"
91 #include "content/public/common/file_chooser_file_info.h" 91 #include "content/public/common/file_chooser_file_info.h"
92 #include "content/public/common/file_chooser_params.h" 92 #include "content/public/common/file_chooser_params.h"
93 #include "content/public/common/isolated_world_ids.h" 93 #include "content/public/common/isolated_world_ids.h"
94 #include "content/public/common/service_manager_connection.h" 94 #include "content/public/common/service_manager_connection.h"
95 #include "content/public/common/service_names.mojom.h" 95 #include "content/public/common/service_names.mojom.h"
96 #include "content/public/common/url_constants.h" 96 #include "content/public/common/url_constants.h"
97 #include "content/public/common/url_utils.h" 97 #include "content/public/common/url_utils.h"
98 #include "device/generic_sensor/sensor_provider_impl.h" 98 #include "device/generic_sensor/sensor_provider_impl.h"
99 #include "device/geolocation/geolocation_service_context.h" 99 #include "device/geolocation/geolocation_service_context.h"
100 #include "device/vibration/vibration_manager_impl.h"
101 #include "device/vr/features.h" 100 #include "device/vr/features.h"
102 #include "device/wake_lock/wake_lock_service_context.h" 101 #include "device/wake_lock/wake_lock_service_context.h"
103 #include "media/base/media_switches.h" 102 #include "media/base/media_switches.h"
104 #include "media/media_features.h" 103 #include "media/media_features.h"
105 #include "media/mojo/interfaces/media_service.mojom.h" 104 #include "media/mojo/interfaces/media_service.mojom.h"
106 #include "media/mojo/interfaces/remoting.mojom.h" 105 #include "media/mojo/interfaces/remoting.mojom.h"
107 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 106 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
108 #include "mojo/public/cpp/bindings/strong_binding.h" 107 #include "mojo/public/cpp/bindings/strong_binding.h"
109 #include "services/service_manager/public/cpp/connector.h" 108 #include "services/service_manager/public/cpp/connector.h"
110 #include "services/service_manager/public/cpp/interface_provider.h" 109 #include "services/service_manager/public/cpp/interface_provider.h"
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2461 base::Bind(&PermissionServiceContext::CreateService, 2460 base::Bind(&PermissionServiceContext::CreateService,
2462 base::Unretained(permission_service_context_.get()))); 2461 base::Unretained(permission_service_context_.get())));
2463 2462
2464 GetInterfaceRegistry()->AddInterface(base::Bind( 2463 GetInterfaceRegistry()->AddInterface(base::Bind(
2465 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); 2464 &PresentationServiceImpl::CreateMojoService, base::Unretained(this)));
2466 2465
2467 GetInterfaceRegistry()->AddInterface( 2466 GetInterfaceRegistry()->AddInterface(
2468 base::Bind(&MediaSessionServiceImpl::Create, base::Unretained(this))); 2467 base::Bind(&MediaSessionServiceImpl::Create, base::Unretained(this)));
2469 2468
2470 #if defined(OS_ANDROID) 2469 #if defined(OS_ANDROID)
2471 GetInterfaceRegistry()->AddInterface(
2472 GetGlobalJavaInterfaces()
2473 ->CreateInterfaceFactory<device::mojom::VibrationManager>());
2474
2475 // Creates a MojoRendererService, passing it a MediaPlayerRender. 2470 // Creates a MojoRendererService, passing it a MediaPlayerRender.
2476 GetInterfaceRegistry()->AddInterface<media::mojom::Renderer>(base::Bind( 2471 GetInterfaceRegistry()->AddInterface<media::mojom::Renderer>(base::Bind(
2477 &content::CreateMediaPlayerRenderer, base::Unretained(this))); 2472 &content::CreateMediaPlayerRenderer, base::Unretained(this)));
2478 #else
2479 GetInterfaceRegistry()->AddInterface(
2480 base::Bind(&device::VibrationManagerImpl::Create));
2481 #endif // defined(OS_ANDROID) 2473 #endif // defined(OS_ANDROID)
2482 2474
2483 GetInterfaceRegistry()->AddInterface(base::Bind( 2475 GetInterfaceRegistry()->AddInterface(base::Bind(
2484 base::IgnoreResult(&RenderFrameHostImpl::CreateWebBluetoothService), 2476 base::IgnoreResult(&RenderFrameHostImpl::CreateWebBluetoothService),
2485 base::Unretained(this))); 2477 base::Unretained(this)));
2486 2478
2487 GetInterfaceRegistry()->AddInterface<media::mojom::InterfaceFactory>(this); 2479 GetInterfaceRegistry()->AddInterface<media::mojom::InterfaceFactory>(this);
2488 2480
2489 // This is to support usage of WebSockets in cases in which there is an 2481 // This is to support usage of WebSockets in cases in which there is an
2490 // associated RenderFrame. This is important for showing the correct security 2482 // associated RenderFrame. This is important for showing the correct security
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
3637 service_manager::mojom::InterfaceProviderPtr provider; 3629 service_manager::mojom::InterfaceProviderPtr provider;
3638 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); 3630 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this);
3639 java_interfaces_.reset(new service_manager::InterfaceProvider); 3631 java_interfaces_.reset(new service_manager::InterfaceProvider);
3640 java_interfaces_->Bind(std::move(provider)); 3632 java_interfaces_->Bind(std::move(provider));
3641 } 3633 }
3642 return java_interfaces_.get(); 3634 return java_interfaces_.get();
3643 } 3635 }
3644 #endif 3636 #endif
3645 3637
3646 } // namespace content 3638 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698