| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENER_H
_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENER_H
_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENER_H
_ | 6 #define CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENER_H
_ |
| 7 | 7 |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "chrome/browser/chromeos/device_hierarchy_observer.h" | 10 #include "chrome/browser/chromeos/device_hierarchy_observer.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 // Defines the delete on exit Singleton traits we like. Best to have this | 31 // Defines the delete on exit Singleton traits we like. Best to have this |
| 32 // and const/dest private as recommended for Singletons. | 32 // and const/dest private as recommended for Singletons. |
| 33 friend struct DefaultSingletonTraits<XInputHierarchyChangedEventListener>; | 33 friend struct DefaultSingletonTraits<XInputHierarchyChangedEventListener>; |
| 34 | 34 |
| 35 XInputHierarchyChangedEventListener(); | 35 XInputHierarchyChangedEventListener(); |
| 36 virtual ~XInputHierarchyChangedEventListener(); | 36 virtual ~XInputHierarchyChangedEventListener(); |
| 37 | 37 |
| 38 // ui::PlatformEventObserver: | 38 // ui::PlatformEventObserver: |
| 39 virtual void WillProcessEvent(const ui::PlatformEvent& event) OVERRIDE; | 39 virtual void WillProcessEvent(const ui::PlatformEvent& event) override; |
| 40 virtual void DidProcessEvent(const ui::PlatformEvent& event) OVERRIDE; | 40 virtual void DidProcessEvent(const ui::PlatformEvent& event) override; |
| 41 | 41 |
| 42 // Returns true if the event was processed, false otherwise. | 42 // Returns true if the event was processed, false otherwise. |
| 43 void ProcessedXEvent(XEvent* xevent); | 43 void ProcessedXEvent(XEvent* xevent); |
| 44 | 44 |
| 45 // Notify observers that a device has been added/removed. | 45 // Notify observers that a device has been added/removed. |
| 46 void NotifyDeviceHierarchyChanged(); | 46 void NotifyDeviceHierarchyChanged(); |
| 47 | 47 |
| 48 bool stopped_; | 48 bool stopped_; |
| 49 | 49 |
| 50 ObserverList<DeviceHierarchyObserver> observer_list_; | 50 ObserverList<DeviceHierarchyObserver> observer_list_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(XInputHierarchyChangedEventListener); | 52 DISALLOW_COPY_AND_ASSIGN(XInputHierarchyChangedEventListener); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } // namespace chromeos | 55 } // namespace chromeos |
| 56 | 56 |
| 57 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENE
R_H_ | 57 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENE
R_H_ |
| OLD | NEW |