Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / device / core / device_client.cc
blob50b015e9ddc636a6a0e525d6e6bc3548a3b537ce
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;
15 } // namespace
17 DeviceClient::DeviceClient() {
18 g_instance = this;
21 DeviceClient::~DeviceClient() {
22 g_instance = nullptr;
25 /* static */
26 DeviceClient* DeviceClient::Get() {
27 DCHECK(g_instance);
28 return g_instance;
31 UsbService* DeviceClient::GetUsbService() {
32 // This should never be called by clients which do not support the USB API.
33 NOTREACHED();
34 return nullptr;
37 HidService* DeviceClient::GetHidService() {
38 // This should never be called by clients which do not support the HID API.
39 NOTREACHED();
40 return nullptr;
43 } // namespace device