Roll src/third_party/skia 89d5988:cb67414
[chromium-blink-merge.git] / device / core / device_client.cc
blob2aca21693a2d597898b8565dccd4a2506dc2ff3f
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "device/core/device_client.h"
7 #include "base/logging.h"
9 namespace device {
11 namespace {
13 DeviceClient* g_instance = NULL;
15 } // namespace
17 DeviceClient::DeviceClient() {
18 DCHECK(!g_instance);
19 g_instance = this;
22 DeviceClient::~DeviceClient() {
23 g_instance = NULL;
26 /* static */
27 DeviceClient* DeviceClient::Get() {
28 DCHECK(g_instance);
29 return g_instance;
32 UsbService* DeviceClient::GetUsbService() {
33 // This should never be called by clients which do not support the USB API.
34 NOTREACHED();
35 return NULL;
38 void DeviceClient::ConnectToUSBDeviceManager(
39 mojo::InterfaceRequest<usb::DeviceManager> request) {
42 HidService* DeviceClient::GetHidService() {
43 // This should never be called by clients which do not support the HID API.
44 NOTREACHED();
45 return NULL;
48 } // namespace device