OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 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 WM_HOST_FOREIGN_TEST_WINDOW_HOST_LINUX_H_ | |
6 #define WM_HOST_FOREIGN_TEST_WINDOW_HOST_LINUX_H_ | |
7 | |
8 #include <X11/Xlib.h> | |
9 | |
10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. | |
11 #undef RootWindow | |
12 | |
13 #include "base/basictypes.h" | |
14 #include "base/compiler_specific.h" | |
15 #include "base/message_loop.h" | |
16 #include "ui/gfx/size.h" | |
17 #include "wm/host/foreign_test_window_host.h" | |
18 | |
19 namespace wm { | |
20 | |
21 class ForeignTestWindowHostLinux : public ForeignTestWindowHost, | |
22 public MessageLoopForIO::Watcher { | |
23 public: | |
24 explicit ForeignTestWindowHostLinux(gfx::AcceleratedWidget parent); | |
25 | |
26 // Overridden from ForeignTestWindowHost: | |
danakj
2013/02/21 01:33:15
s/:/./
reveman
2013/02/22 01:26:44
":" vs "." usage in combination with Overridden se
danakj
2013/02/22 01:48:08
Oh, I thought I saw you doing "." earlier in the C
reveman
2013/02/22 06:53:01
yea, think I had a "." somewhere but it should now
| |
27 virtual void Initialize() OVERRIDE; | |
28 virtual void Delete() OVERRIDE; | |
29 virtual void Show() OVERRIDE; | |
30 virtual void Hide() OVERRIDE; | |
31 virtual void Destroy() OVERRIDE; | |
32 virtual void Sync() OVERRIDE; | |
33 | |
34 // Overridden from MessageLoopForIO::Watcher: | |
danakj
2013/02/21 01:33:15
s/:$/./
| |
35 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE; | |
36 virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE; | |
37 | |
38 protected: | |
39 virtual ~ForeignTestWindowHostLinux(); | |
40 | |
41 private: | |
42 void ProcessXEvent(XEvent* event); | |
43 void PumpXEvents(); | |
44 | |
45 // The display and the native X window. | |
46 Display* display_; | |
47 ::Window parent_; | |
48 ::Window window_; | |
49 gfx::Size size_; | |
50 XFontStruct* font_info_; | |
51 ::GC gc_; | |
52 | |
53 MessageLoopForIO::FileDescriptorWatcher connection_watcher_; | |
54 | |
55 DISALLOW_COPY_AND_ASSIGN(ForeignTestWindowHostLinux); | |
56 }; | |
57 | |
58 } // namespace wm | |
59 | |
60 #endif // WM_HOST_FOREIGN_TEST_WINDOW_HOST_LINUX_H_ | |
OLD | NEW |