| 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/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 // Defines the delete on exit Singleton traits we like. Best to have this | 32 // Defines the delete on exit Singleton traits we like. Best to have this |
| 33 // and const/dest private as recommended for Singletons. | 33 // and const/dest private as recommended for Singletons. |
| 34 friend struct DefaultSingletonTraits<XInputHierarchyChangedEventListener>; | 34 friend struct DefaultSingletonTraits<XInputHierarchyChangedEventListener>; |
| 35 | 35 |
| 36 XInputHierarchyChangedEventListener(); | 36 XInputHierarchyChangedEventListener(); |
| 37 virtual ~XInputHierarchyChangedEventListener(); | 37 virtual ~XInputHierarchyChangedEventListener(); |
| 38 | 38 |
| 39 // MessageLoopForUI::Observer overrides. | 39 // MessageLoopForUI::Observer overrides. |
| 40 virtual base::EventStatus WillProcessEvent( | 40 virtual void WillProcessEvent(const base::NativeEvent& event) OVERRIDE; |
| 41 const base::NativeEvent& event) OVERRIDE; | |
| 42 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; | 41 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; |
| 43 | 42 |
| 44 // Returns true if the event was processed, false otherwise. | 43 // Returns true if the event was processed, false otherwise. |
| 45 void ProcessedXEvent(XEvent* xevent); | 44 void ProcessedXEvent(XEvent* xevent); |
| 46 | 45 |
| 47 // Notify observers that a device has been added/removed. | 46 // Notify observers that a device has been added/removed. |
| 48 void NotifyDeviceHierarchyChanged(); | 47 void NotifyDeviceHierarchyChanged(); |
| 49 | 48 |
| 50 bool stopped_; | 49 bool stopped_; |
| 51 | 50 |
| 52 ObserverList<DeviceHierarchyObserver> observer_list_; | 51 ObserverList<DeviceHierarchyObserver> observer_list_; |
| 53 | 52 |
| 54 DISALLOW_COPY_AND_ASSIGN(XInputHierarchyChangedEventListener); | 53 DISALLOW_COPY_AND_ASSIGN(XInputHierarchyChangedEventListener); |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 } // namespace chromeos | 56 } // namespace chromeos |
| 58 | 57 |
| 59 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENE
R_H_ | 58 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENE
R_H_ |
| OLD | NEW |