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