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

Side by Side Diff: wm/host/foreign_test_window_host_linux.h

Issue 11485006: Add window manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Push gfx::AcceleratedWidget usage into platform specific code. Created 7 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « wm/host/foreign_test_window_host.cc ('k') | wm/host/foreign_test_window_host_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 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(aura::RootWindow* root_window);
25
26 // Overridden from ForeignTestWindowHost:
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:
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_
OLDNEW
« no previous file with comments | « wm/host/foreign_test_window_host.cc ('k') | wm/host/foreign_test_window_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698