OLD | NEW |
(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_FOREIGN_WINDOW_HOST_LINUX_H_ |
| 6 #define WM_FOREIGN_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/message_loop.h" |
| 14 #include "wm/host/foreign_window_host.h" |
| 15 |
| 16 namespace wm { |
| 17 |
| 18 class ForeignWindowHostLinux : public ForeignWindowHost, |
| 19 public MessageLoop::Dispatcher { |
| 20 public: |
| 21 explicit ForeignWindowHostLinux(gfx::PluginWindowHandle window_handle); |
| 22 virtual ~ForeignWindowHostLinux(); |
| 23 |
| 24 // Overridden from wm::ForeignWindowHost: |
| 25 virtual void SetDelegate(ForeignWindowHostDelegate* delegate) OVERRIDE; |
| 26 virtual gfx::PluginWindowHandle GetWindowHandle() const OVERRIDE; |
| 27 virtual void Close() OVERRIDE; |
| 28 virtual void OnWindowDestroyed() OVERRIDE; |
| 29 |
| 30 // Overridden from Dispatcher: |
| 31 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; |
| 32 |
| 33 private: |
| 34 Display* xdisplay_; |
| 35 gfx::PluginWindowHandle window_handle_; |
| 36 ForeignWindowHostDelegate* delegate_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(ForeignWindowHostLinux); |
| 39 }; |
| 40 |
| 41 } // namespace wm |
| 42 |
| 43 #endif // WM_FOREIGN_WINDOW_HOST_LINUX_H_ |
OLD | NEW |