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 UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ | 5 #ifndef UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ |
6 #define UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ | 6 #define UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 public: | 24 public: |
25 NativeDisplayEventDispatcherX11( | 25 NativeDisplayEventDispatcherX11( |
26 NativeDisplayDelegateX11::HelperDelegate* delegate, | 26 NativeDisplayDelegateX11::HelperDelegate* delegate, |
27 int xrandr_event_base); | 27 int xrandr_event_base); |
28 ~NativeDisplayEventDispatcherX11() override; | 28 ~NativeDisplayEventDispatcherX11() override; |
29 | 29 |
30 // ui::PlatformEventDispatcher: | 30 // ui::PlatformEventDispatcher: |
31 bool CanDispatchEvent(const PlatformEvent& event) override; | 31 bool CanDispatchEvent(const PlatformEvent& event) override; |
32 uint32_t DispatchEvent(const PlatformEvent& event) override; | 32 uint32_t DispatchEvent(const PlatformEvent& event) override; |
33 | 33 |
34 void SetTickClockForTest(scoped_ptr<base::TickClock> tick_clock); | 34 void SetTickClockForTest(std::unique_ptr<base::TickClock> tick_clock); |
35 | 35 |
36 // How long the cached output is valid after startup. | 36 // How long the cached output is valid after startup. |
37 static const int kUseCacheAfterStartupMs; | 37 static const int kUseCacheAfterStartupMs; |
38 | 38 |
39 private: | 39 private: |
40 NativeDisplayDelegateX11::HelperDelegate* delegate_; // Not owned. | 40 NativeDisplayDelegateX11::HelperDelegate* delegate_; // Not owned. |
41 | 41 |
42 // The base of the event numbers used to represent XRandr events used in | 42 // The base of the event numbers used to represent XRandr events used in |
43 // decoding events regarding output add/remove. | 43 // decoding events regarding output add/remove. |
44 int xrandr_event_base_; | 44 int xrandr_event_base_; |
45 | 45 |
46 base::TimeTicks startup_time_; | 46 base::TimeTicks startup_time_; |
47 | 47 |
48 scoped_ptr<base::TickClock> tick_clock_; | 48 std::unique_ptr<base::TickClock> tick_clock_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(NativeDisplayEventDispatcherX11); | 50 DISALLOW_COPY_AND_ASSIGN(NativeDisplayEventDispatcherX11); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace ui | 53 } // namespace ui |
54 | 54 |
55 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ | 55 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_ |
OLD | NEW |