Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1067)

Side by Side Diff: ui/display/chromeos/x11/native_display_event_dispatcher_x11.h

Issue 2540313002: Split //ui/display and create //ui/display/manager. (Closed)
Patch Set: Cleanup export header. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_
6 #define UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_
7
8 #include <stdint.h>
9
10 #include "base/macros.h"
11 #include "base/time/tick_clock.h"
12 #include "base/time/time.h"
13 #include "ui/display/chromeos/x11/native_display_delegate_x11.h"
14 #include "ui/events/platform/platform_event_dispatcher.h"
15
16 namespace ui {
17
18 // The implementation is interested in the cases of RRNotify events which
19 // correspond to output add/remove events. Note that Output add/remove events
20 // are sent in response to our own reconfiguration operations so spurious events
21 // are common. Spurious events will have no effect.
22 class DISPLAY_EXPORT NativeDisplayEventDispatcherX11
23 : public ui::PlatformEventDispatcher {
24 public:
25 NativeDisplayEventDispatcherX11(
26 NativeDisplayDelegateX11::HelperDelegate* delegate,
27 int xrandr_event_base);
28 ~NativeDisplayEventDispatcherX11() override;
29
30 // ui::PlatformEventDispatcher:
31 bool CanDispatchEvent(const PlatformEvent& event) override;
32 uint32_t DispatchEvent(const PlatformEvent& event) override;
33
34 void SetTickClockForTest(std::unique_ptr<base::TickClock> tick_clock);
35
36 // How long the cached output is valid after startup.
37 static const int kUseCacheAfterStartupMs;
38
39 private:
40 NativeDisplayDelegateX11::HelperDelegate* delegate_; // Not owned.
41
42 // The base of the event numbers used to represent XRandr events used in
43 // decoding events regarding output add/remove.
44 int xrandr_event_base_;
45
46 base::TimeTicks startup_time_;
47
48 std::unique_ptr<base::TickClock> tick_clock_;
49
50 DISALLOW_COPY_AND_ASSIGN(NativeDisplayEventDispatcherX11);
51 };
52
53 } // namespace ui
54
55 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_EVENT_DISPATCHER_X11_H_
OLDNEW
« no previous file with comments | « ui/display/chromeos/x11/native_display_delegate_x11.cc ('k') | ui/display/chromeos/x11/native_display_event_dispatcher_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698