Index: chrome/browser/chromeos/device/input_service_proxy.h |
diff --git a/chrome/browser/chromeos/device/input_service_proxy.h b/chrome/browser/chromeos/device/input_service_proxy.h |
index e41196f62ca05046a4dda634f82ab0fc329dce87..44a0a6300266b235e10498e9d0285f568b920cda 100644 |
--- a/chrome/browser/chromeos/device/input_service_proxy.h |
+++ b/chrome/browser/chromeos/device/input_service_proxy.h |
@@ -11,7 +11,9 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
#include "base/observer_list.h" |
+#include "base/task_runner.h" |
#include "base/threading/thread_checker.h" |
+#include "content/public/browser/browser_thread.h" |
#include "device/hid/input_service_linux.h" |
namespace chromeos { |
@@ -47,7 +49,12 @@ class InputServiceProxy { |
void GetDeviceInfo(const std::string& id, |
const GetDeviceInfoCallback& callback); |
+ // Should be called once before any InputServiceProxy instance is created. |
+ static void SetThreadIdForTesting(content::BrowserThread::ID thread_id); |
+ |
private: |
+ static content::BrowserThread::ID thread_identifier_; |
+ |
class ServiceObserver; |
void OnDeviceAdded(const device::InputServiceLinux::InputDeviceInfo& info); |
@@ -58,6 +65,8 @@ class InputServiceProxy { |
base::ThreadChecker thread_checker_; |
+ scoped_refptr<base::TaskRunner> task_runner_; |
+ |
base::WeakPtrFactory<InputServiceProxy> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(InputServiceProxy); |