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

Unified Diff: chrome/browser/chromeos/device/fake_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: 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
Index: chrome/browser/chromeos/device/fake_input_service_proxy.h
diff --git a/chrome/browser/chromeos/device/fake_input_service_proxy.h b/chrome/browser/chromeos/device/fake_input_service_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..7de61cfb14a57c737ebe6fcab001b598010bd577
--- /dev/null
+++ b/chrome/browser/chromeos/device/fake_input_service_proxy.h
@@ -0,0 +1,44 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_DEVICE_FAKE_INPUT_SERVICE_PROXY_H_
+#define CHROME_BROWSER_CHROMEOS_DEVICE_FAKE_INPUT_SERVICE_PROXY_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "base/containers/hash_tables.h"
+#include "base/observer_list.h"
+#include "base/threading/thread_checker.h"
+#include "chrome/browser/chromeos/device/input_service_proxy.h"
+
+
Nikita (slow) 2015/02/11 14:53:07 nit: drop empty line
merkulova 2015/02/13 10:00:04 Done.
+namespace chromeos {
+
+class FakeInputServiceProxy : public InputServiceProxy {
+ public:
+ FakeInputServiceProxy();
+ ~FakeInputServiceProxy() override;
+
+ // InputServiceProxy overrides:
+ static void WarmUp();
+ void GetDevices(const GetDevicesCallback& callback) override;
+ void GetDeviceInfo(const std::string& id,
+ const GetDeviceInfoCallback& callback) override;
+
+ void AddDevice(InputDeviceInfo& info);
+ void RemoveDevice(const std::string& id);
+
+ private:
+
+ typedef base::hash_map<std::string, InputDeviceInfo> DeviceMap;
+
+ DeviceMap devices_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeInputServiceProxy);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_DEVICE_FAKE_INPUT_SERVICE_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698