| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_DEVICE_INPUT_SERVICE_PROXY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DEVICE_INPUT_SERVICE_PROXY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DEVICE_INPUT_SERVICE_PROXY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DEVICE_INPUT_SERVICE_PROXY_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <vector> | 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/callback.h" | 11 #include "base/callback.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 15 #include "base/task_runner.h" | 15 #include "base/task_runner.h" |
| 16 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
| 17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
| 18 #include "device/hid/input_service_linux.h" | 18 #include "device/hid/input_service_linux.h" |
| 19 | 19 |
| 20 namespace chromeos { | 20 namespace chromeos { |
| 21 | 21 |
| 22 // Proxy to device::InputServiceLinux. Should be created and used on the UI | 22 // Proxy to device::InputServiceLinux. Should be created and used on the UI |
| (...skipping 29 matching lines...) Expand all Loading... |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 static content::BrowserThread::ID thread_identifier_; | 54 static content::BrowserThread::ID thread_identifier_; |
| 55 | 55 |
| 56 class ServiceObserver; | 56 class ServiceObserver; |
| 57 | 57 |
| 58 void OnDeviceAdded(const device::InputServiceLinux::InputDeviceInfo& info); | 58 void OnDeviceAdded(const device::InputServiceLinux::InputDeviceInfo& info); |
| 59 void OnDeviceRemoved(const std::string& id); | 59 void OnDeviceRemoved(const std::string& id); |
| 60 | 60 |
| 61 base::ObserverList<Observer> observers_; | 61 base::ObserverList<Observer> observers_; |
| 62 scoped_ptr<ServiceObserver> service_observer_; | 62 std::unique_ptr<ServiceObserver> service_observer_; |
| 63 | 63 |
| 64 base::ThreadChecker thread_checker_; | 64 base::ThreadChecker thread_checker_; |
| 65 | 65 |
| 66 scoped_refptr<base::TaskRunner> task_runner_; | 66 scoped_refptr<base::TaskRunner> task_runner_; |
| 67 | 67 |
| 68 base::WeakPtrFactory<InputServiceProxy> weak_factory_; | 68 base::WeakPtrFactory<InputServiceProxy> weak_factory_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(InputServiceProxy); | 70 DISALLOW_COPY_AND_ASSIGN(InputServiceProxy); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace chromeos | 73 } // namespace chromeos |
| 74 | 74 |
| 75 #endif // CHROME_BROWSER_CHROMEOS_DEVICE_INPUT_SERVICE_PROXY_H_ | 75 #endif // CHROME_BROWSER_CHROMEOS_DEVICE_INPUT_SERVICE_PROXY_H_ |
| OLD | NEW |