Roll src/third_party/WebKit 1cd8cc5:4e01097 (svn 202507:202508)
[chromium-blink-merge.git] / chrome / browser / chrome_device_client.cc
blobe3ffbe733fde7195a53df9d4a155bced8a3def90
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 "chrome/browser/chrome_device_client.h"
7 #include "base/logging.h"
8 #include "content/public/browser/browser_thread.h"
9 #include "device/hid/hid_service.h"
10 #include "device/usb/usb_service.h"
12 using content::BrowserThread;
14 ChromeDeviceClient::ChromeDeviceClient() {}
16 ChromeDeviceClient::~ChromeDeviceClient() {}
18 device::UsbService* ChromeDeviceClient::GetUsbService() {
19 DCHECK_CURRENTLY_ON(BrowserThread::UI);
20 if (!usb_service_) {
21 usb_service_ = device::UsbService::Create(
22 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
24 return usb_service_.get();
27 device::HidService* ChromeDeviceClient::GetHidService() {
28 DCHECK_CURRENTLY_ON(BrowserThread::UI);
29 if (!hid_service_) {
30 hid_service_ = device::HidService::Create(
31 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
33 return hid_service_.get();