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. 4 5#include "device/core/device_client.h" 6 7#include "base/logging.h" 8 9namespace device { 10 11namespace { 12 13DeviceClient* g_instance = NULL; 14 15} // namespace 16 17DeviceClient::DeviceClient() { 18 DCHECK(!g_instance); 19 g_instance = this; 20} 21 22DeviceClient::~DeviceClient() { 23 g_instance = NULL; 24} 25 26/* static */ 27DeviceClient* DeviceClient::Get() { 28 DCHECK(g_instance); 29 return g_instance; 30} 31 32UsbService* DeviceClient::GetUsbService() { 33 // This should never be called by clients which do not support the USB API. 34 NOTREACHED(); 35 return NULL; 36} 37 38HidService* DeviceClient::GetHidService() { 39 // This should never be called by clients which do not support the HID API. 40 NOTREACHED(); 41 return NULL; 42} 43 44} // namespace device 45