OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_GL_GL_SURFACE_GLX_X11_H_ |
| 6 #define UI_GL_GL_SURFACE_GLX_X11_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "ui/events/platform/platform_event_dispatcher.h" |
| 10 #include "ui/gfx/native_widget_types.h" |
| 11 #include "ui/gl/gl_export.h" |
| 12 #include "ui/gl/gl_surface_glx.h" |
| 13 |
| 14 namespace gl { |
| 15 |
| 16 // X11 specific implementation of GLX surface. Registers as a |
| 17 // PlatformEventDispatcher to handle XEvents. |
| 18 class GL_EXPORT GLSurfaceGLXX11 : public NativeViewGLSurfaceGLX, |
| 19 public ui::PlatformEventDispatcher { |
| 20 public: |
| 21 explicit GLSurfaceGLXX11(gfx::AcceleratedWidget window); |
| 22 |
| 23 protected: |
| 24 ~GLSurfaceGLXX11() override; |
| 25 |
| 26 // NativeViewGLSurfaceGLX: |
| 27 void RegisterEvents() override; |
| 28 void UnregisterEvents() override; |
| 29 |
| 30 // PlatformEventDispatcher: |
| 31 bool CanDispatchEvent(const ui::PlatformEvent& event) override; |
| 32 uint32_t DispatchEvent(const ui::PlatformEvent& event) override; |
| 33 |
| 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(GLSurfaceGLXX11); |
| 36 }; |
| 37 |
| 38 } // namespace gl |
| 39 |
| 40 #endif // UI_GL_GL_SURFACE_GLX_X11_H_ |
OLD | NEW |