Remove BrowserThread dependency from usb_service.
commite471fab8c731cfc2eacceca8cc5be524c2d6f4b4
authorreillyg <reillyg@chromium.org>
Fri, 29 Aug 2014 01:58:43 +0000 (28 18:58 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 29 Aug 2014 01:59:51 +0000 (29 01:59 +0000)
tree3ecc233a2dc5c66b1f980e335f1a92f027f2d95f
parenta859ef1cc6d20bd833c84cd2d126cf49440b16f7
Remove BrowserThread dependency from usb_service.

Instead of explicitly depending on specific browser threads the USB
service can assume that it is instantiated on BrowserThread::FILE (or
equivalent) and save a TaskRunner reference from this instantiation for
later use when called from other threads.

To reach BrowserThread::UI (required for DBus on Chrome OS) a reference
to the appropriate TaskRunner must be provided when calling
UsbService::GetInstance().

BUG=

Review URL: https://codereview.chromium.org/507503002

Cr-Commit-Position: refs/heads/master@{#292546}
31 files changed:
chrome/browser/BUILD.gn
chrome/browser/DEPS
chrome/browser/browser_process_impl.cc
chrome/browser/browser_process_impl.h
chrome/browser/chrome_device_client.cc [new file with mode: 0644]
chrome/browser/chrome_device_client.h [new file with mode: 0644]
chrome/browser/devtools/device/usb/DEPS [deleted file]
chrome/browser/devtools/device/usb/android_usb_device.cc
chrome/chrome_browser.gypi
components/usb_service/DEPS
components/usb_service/usb_device_handle_impl.cc
components/usb_service/usb_device_handle_impl.h
components/usb_service/usb_device_impl.cc
components/usb_service/usb_device_impl.h
components/usb_service/usb_service.h
components/usb_service/usb_service_impl.cc
device/core/BUILD.gn [new file with mode: 0644]
device/core/core.gyp [new file with mode: 0644]
device/core/device_client.cc [new file with mode: 0644]
device/core/device_client.h [new file with mode: 0644]
device/test/usb_test_gadget_impl.cc
extensions/browser/api/usb/DEPS
extensions/browser/api/usb/usb_api.cc
extensions/browser/api/usb_private/DEPS
extensions/browser/api/usb_private/usb_private_api.cc
extensions/shell/app_shell.gyp
extensions/shell/browser/DEPS
extensions/shell/browser/shell_browser_main_parts.cc
extensions/shell/browser/shell_browser_main_parts.h
extensions/shell/browser/shell_device_client.cc [new file with mode: 0644]
extensions/shell/browser/shell_device_client.h [new file with mode: 0644]