Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4102)

Unified Diff: chrome/browser/chromeos/device/input_service_proxy.h

Issue 913773002: Created fakes for HID-detection screen testing. Initial browsertest added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TaskRunner used for InputServiceProxy. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/device/input_service_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/browser/chromeos/device/input_service_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698