| 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 CHROMEOS_DISPLAY_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ | 5 #ifndef UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ |
| 6 #define CHROMEOS_DISPLAY_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ | 6 #define UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ |
| 7 | 7 |
| 8 #include "base/message_loop/message_pump_dispatcher.h" | 8 #include "base/message_loop/message_pump_dispatcher.h" |
| 9 #include "chromeos/display/native_display_delegate_x11.h" | 9 #include "ui/display/chromeos/x11/native_display_delegate_x11.h" |
| 10 | 10 |
| 11 namespace chromeos { | 11 namespace ui { |
| 12 | 12 |
| 13 class CHROMEOS_EXPORT NativeDisplayEventDispatcherX11 | 13 class DISPLAY_EXPORT NativeDisplayEventDispatcherX11 |
| 14 : public base::MessagePumpDispatcher { | 14 : public base::MessagePumpDispatcher { |
| 15 public: | 15 public: |
| 16 NativeDisplayEventDispatcherX11( | 16 NativeDisplayEventDispatcherX11( |
| 17 NativeDisplayDelegateX11::HelperDelegate* delegate, | 17 NativeDisplayDelegateX11::HelperDelegate* delegate, |
| 18 int xrandr_event_base); | 18 int xrandr_event_base); |
| 19 virtual ~NativeDisplayEventDispatcherX11(); | 19 virtual ~NativeDisplayEventDispatcherX11(); |
| 20 | 20 |
| 21 // base::MessagePumpDispatcher overrides: | 21 // base::MessagePumpDispatcher overrides: |
| 22 // | 22 // |
| 23 // Called when an RRNotify event is received. The implementation is | 23 // Called when an RRNotify event is received. The implementation is |
| 24 // interested in the cases of RRNotify events which correspond to output | 24 // interested in the cases of RRNotify events which correspond to output |
| 25 // add/remove events. Note that Output add/remove events are sent in response | 25 // add/remove events. Note that Output add/remove events are sent in response |
| 26 // to our own reconfiguration operations so spurious events are common. | 26 // to our own reconfiguration operations so spurious events are common. |
| 27 // Spurious events will have no effect. | 27 // Spurious events will have no effect. |
| 28 virtual uint32_t Dispatch(const base::NativeEvent& event) OVERRIDE; | 28 virtual uint32_t Dispatch(const base::NativeEvent& event) OVERRIDE; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 NativeDisplayDelegateX11::HelperDelegate* delegate_; // Not owned. | 31 NativeDisplayDelegateX11::HelperDelegate* delegate_; // Not owned. |
| 32 | 32 |
| 33 // The base of the event numbers used to represent XRandr events used in | 33 // The base of the event numbers used to represent XRandr events used in |
| 34 // decoding events regarding output add/remove. | 34 // decoding events regarding output add/remove. |
| 35 int xrandr_event_base_; | 35 int xrandr_event_base_; |
| 36 | 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(NativeDisplayEventDispatcherX11); | 37 DISALLOW_COPY_AND_ASSIGN(NativeDisplayEventDispatcherX11); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace chromeos | 40 } // namespace ui |
| 41 | 41 |
| 42 #endif // CHROMEOS_DISPLAY_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ | 42 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ |
| OLD | NEW |