| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_PLATFORM_WINDOW_X11_X11_WINDOW_BASE_H_ | 5 #ifndef UI_PLATFORM_WINDOW_X11_X11_WINDOW_BASE_H_ |
| 6 #define UI_PLATFORM_WINDOW_X11_X11_WINDOW_BASE_H_ | 6 #define UI_PLATFORM_WINDOW_X11_X11_WINDOW_BASE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
| 13 #include "ui/gfx/x/x11_atom_cache.h" | |
| 14 #include "ui/gfx/x/x11_types.h" | 13 #include "ui/gfx/x/x11_types.h" |
| 15 #include "ui/platform_window/platform_window.h" | 14 #include "ui/platform_window/platform_window.h" |
| 16 #include "ui/platform_window/platform_window_delegate.h" | 15 #include "ui/platform_window/platform_window_delegate.h" |
| 17 #include "ui/platform_window/x11/x11_window_export.h" | 16 #include "ui/platform_window/x11/x11_window_export.h" |
| 18 | 17 |
| 19 namespace ui { | 18 namespace ui { |
| 20 | 19 |
| 21 class XScopedEventSelector; | 20 class XScopedEventSelector; |
| 22 | 21 |
| 23 // Abstract base implementation for a X11 based PlatformWindow. Methods that | 22 // Abstract base implementation for a X11 based PlatformWindow. Methods that |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 58 |
| 60 // Processes events for this XWindow. | 59 // Processes events for this XWindow. |
| 61 void ProcessXWindowEvent(XEvent* xev); | 60 void ProcessXWindowEvent(XEvent* xev); |
| 62 | 61 |
| 63 private: | 62 private: |
| 64 PlatformWindowDelegate* delegate_; | 63 PlatformWindowDelegate* delegate_; |
| 65 | 64 |
| 66 XDisplay* xdisplay_; | 65 XDisplay* xdisplay_; |
| 67 XID xwindow_; | 66 XID xwindow_; |
| 68 XID xroot_window_; | 67 XID xroot_window_; |
| 69 X11AtomCache atom_cache_; | |
| 70 std::unique_ptr<ui::XScopedEventSelector> xwindow_events_; | 68 std::unique_ptr<ui::XScopedEventSelector> xwindow_events_; |
| 71 | 69 |
| 72 base::string16 window_title_; | 70 base::string16 window_title_; |
| 73 | 71 |
| 74 // The bounds of |xwindow_|. | 72 // The bounds of |xwindow_|. |
| 75 gfx::Rect bounds_; | 73 gfx::Rect bounds_; |
| 76 | 74 |
| 77 bool window_mapped_ = false; | 75 bool window_mapped_ = false; |
| 78 | 76 |
| 79 DISALLOW_COPY_AND_ASSIGN(X11WindowBase); | 77 DISALLOW_COPY_AND_ASSIGN(X11WindowBase); |
| 80 }; | 78 }; |
| 81 | 79 |
| 82 } // namespace ui | 80 } // namespace ui |
| 83 | 81 |
| 84 #endif // UI_PLATFORM_WINDOW_X11_X11_WINDOW_BASE_H_ | 82 #endif // UI_PLATFORM_WINDOW_X11_X11_WINDOW_BASE_H_ |
| OLD | NEW |