Update broken references to image assets
[chromium-blink-merge.git] / chrome / browser / chromeos / system / pointer_device_observer.h
blob0938a32536134b1e5deb0d9760e74456db4ce06e
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_POINTER_DEVICE_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_POINTER_DEVICE_OBSERVER_H_
8 #include "base/memory/weak_ptr.h"
9 #include "base/observer_list.h"
10 #include "ui/events/devices/input_device_event_observer.h"
12 namespace chromeos {
13 namespace system {
15 class PointerDeviceObserver : public ui::InputDeviceEventObserver {
16 public:
17 PointerDeviceObserver();
18 ~PointerDeviceObserver() override;
20 // Start observing device hierarchy.
21 void Init();
23 // Check for presence of devices.
24 void CheckDevices();
26 class Observer {
27 public:
28 virtual void TouchpadExists(bool exists) = 0;
29 virtual void MouseExists(bool exists) = 0;
31 protected:
32 Observer() {}
33 virtual ~Observer();
35 void AddObserver(Observer* observer);
36 void RemoveObserver(Observer* observer);
38 private:
39 // InputDeviceEventObserver:
40 void OnMouseDeviceConfigurationChanged() override;
41 void OnTouchpadDeviceConfigurationChanged() override;
43 // Check for pointer devices.
44 void CheckTouchpadExists();
45 void CheckMouseExists();
47 // Callback for pointer device checks.
48 void OnTouchpadExists(bool exists);
49 void OnMouseExists(bool exists);
51 base::ObserverList<Observer> observers_;
53 base::WeakPtrFactory<PointerDeviceObserver> weak_factory_;
55 DISALLOW_COPY_AND_ASSIGN(PointerDeviceObserver);
58 } // namespace system
59 } // namespace chromeos
61 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_POINTER_DEVICE_OBSERVER_H_