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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: wm/host/foreign_test_window_host_linux.h
diff --git a/wm/host/foreign_test_window_host_linux.h b/wm/host/foreign_test_window_host_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..11df0ef6ad658175b1cb6fc6e48ad11b06f82c5c
--- /dev/null
+++ b/wm/host/foreign_test_window_host_linux.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WM_HOST_FOREIGN_TEST_WINDOW_HOST_LINUX_H_
+#define WM_HOST_FOREIGN_TEST_WINDOW_HOST_LINUX_H_
+
+#include <X11/Xlib.h>
+
+// Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
+#undef RootWindow
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/message_loop.h"
+#include "ui/gfx/size.h"
+#include "wm/host/foreign_test_window_host.h"
+
+namespace wm {
+
+class ForeignTestWindowHostLinux : public ForeignTestWindowHost,
+ public MessageLoopForIO::Watcher {
+ public:
+ explicit ForeignTestWindowHostLinux(aura::RootWindow* root_window);
+
+ // Overridden from ForeignTestWindowHost:
+ virtual void Initialize() OVERRIDE;
+ virtual void Delete() OVERRIDE;
+ virtual void Show() OVERRIDE;
+ virtual void Hide() OVERRIDE;
+ virtual void Destroy() OVERRIDE;
+ virtual void Sync() OVERRIDE;
+
+ // Overridden from MessageLoopForIO::Watcher:
+ virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
+ virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
+
+ protected:
+ virtual ~ForeignTestWindowHostLinux();
+
+ private:
+ void ProcessXEvent(XEvent* event);
+ void PumpXEvents();
+
+ // The display and the native X window.
+ Display* display_;
+ ::Window parent_;
+ ::Window window_;
+ gfx::Size size_;
+ XFontStruct* font_info_;
+ ::GC gc_;
+
+ MessageLoopForIO::FileDescriptorWatcher connection_watcher_;
+
+ DISALLOW_COPY_AND_ASSIGN(ForeignTestWindowHostLinux);
+};
+
+} // namespace wm
+
+#endif // WM_HOST_FOREIGN_TEST_WINDOW_HOST_LINUX_H_
« 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