Chromium Code Reviews| Index: ui/gl/gl_surface_egl.h |
| diff --git a/ui/gl/gl_surface_egl.h b/ui/gl/gl_surface_egl.h |
| index 8fb84a08003fedf5ef6cc01be500e5b8e406524b..d501db635d1082656a30735c0898df9c4f5986d4 100644 |
| --- a/ui/gl/gl_surface_egl.h |
| +++ b/ui/gl/gl_surface_egl.h |
| @@ -14,6 +14,7 @@ |
| #include "base/command_line.h" |
| #include "base/compiler_specific.h" |
| #include "base/time/time.h" |
| +#include "ui/events/platform/platform_event_dispatcher.h" |
| #include "ui/gfx/geometry/size.h" |
| #include "ui/gfx/vsync_provider.h" |
| #include "ui/gl/gl_bindings.h" |
| @@ -71,7 +72,8 @@ class GL_EXPORT GLSurfaceEGL : public GLSurface { |
| }; |
| // Encapsulates an EGL surface bound to a view. |
| -class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { |
| +class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL, |
| + public ui::PlatformEventDispatcher { |
| public: |
| explicit NativeViewGLSurfaceEGL(EGLNativeWindowType window); |
| @@ -103,6 +105,10 @@ class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { |
| EGLNativeWindowType window_; |
| +#if defined(USE_X11) |
| + EGLNativeWindowType parent_window_; |
| +#endif |
| + |
| void OnSetSwapInterval(int interval) override; |
| private: |
| @@ -125,6 +131,11 @@ class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { |
| #endif |
| DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL); |
| + |
| + private: |
| + // PlatformEventDispatcher implementation. |
| + bool CanDispatchEvent(const ui::PlatformEvent& event) override; |
| + uint32_t DispatchEvent(const ui::PlatformEvent& event) override; |
|
piman
2015/11/30 22:07:44
nit: keep these in the existing private: section.
|
| }; |
| // Encapsulates a pbuffer EGL surface. |
| @@ -180,6 +191,16 @@ class GL_EXPORT SurfacelessEGL : public GLSurfaceEGL { |
| DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); |
| }; |
| +#if !defined(USE_X11) |
| +// PlatformEventDispatcher implementation. |
| +bool NativeViewGLSurfaceEGL::CanDispatchEvent(const ui::PlatformEvent&) { |
| + return false; |
| +} |
| +uint32_t NativeViewGLSurfaceEGL::DispatchEvent(const ui::PlatformEvent&) { |
| + return ui::POST_DISPATCH_NONE; |
| +} |
| +#endif |
|
piman
2015/11/30 22:07:44
nit: move these to the .cc file.
Another option i
|
| + |
| } // namespace gfx |
| #endif // UI_GL_GL_SURFACE_EGL_H_ |