OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" | 5 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" |
6 | 6 |
7 namespace chromeos { | 7 namespace chromeos { |
8 | 8 |
9 void XInputHierarchyChangedEventListener::Init() { | 9 void XInputHierarchyChangedEventListener::Init() { |
10 MessageLoopForUI::current()->AddObserver(this); | 10 base::MessageLoopForUI::current()->AddObserver(this); |
11 } | 11 } |
12 | 12 |
13 void XInputHierarchyChangedEventListener::StopImpl() { | 13 void XInputHierarchyChangedEventListener::StopImpl() { |
14 MessageLoopForUI::current()->RemoveObserver(this); | 14 base::MessageLoopForUI::current()->RemoveObserver(this); |
15 } | 15 } |
16 | 16 |
17 base::EventStatus XInputHierarchyChangedEventListener::WillProcessEvent( | 17 base::EventStatus XInputHierarchyChangedEventListener::WillProcessEvent( |
18 const base::NativeEvent& event) { | 18 const base::NativeEvent& event) { |
19 // There may be multiple listeners for the XI_HierarchyChanged event. So | 19 // There may be multiple listeners for the XI_HierarchyChanged event. So |
20 // always return EVENT_CONTINUE to make sure all the listeners receive the | 20 // always return EVENT_CONTINUE to make sure all the listeners receive the |
21 // event. | 21 // event. |
22 ProcessedXEvent(event); | 22 ProcessedXEvent(event); |
23 return base::EVENT_CONTINUE; | 23 return base::EVENT_CONTINUE; |
24 } | 24 } |
25 | 25 |
26 void XInputHierarchyChangedEventListener::DidProcessEvent( | 26 void XInputHierarchyChangedEventListener::DidProcessEvent( |
27 const base::NativeEvent& event) { | 27 const base::NativeEvent& event) { |
28 } | 28 } |
29 | 29 |
30 } // namespace chromeos | 30 } // namespace chromeos |
OLD | NEW |