Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ | 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ |
| 6 #define VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ | 6 #define VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <wayland-client.h> | 9 #include <wayland-client.h> |
| 10 | 10 |
| 11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/wayland/wayland_event.h" | |
| 13 #include "ui/gfx/compositor/compositor.h" | 14 #include "ui/gfx/compositor/compositor.h" |
| 14 #include "ui/gfx/gl/gl_context.h" | 15 #include "ui/gfx/gl/gl_context.h" |
| 15 #include "ui/gfx/gl/gl_surface.h" | 16 #include "ui/gfx/gl/gl_surface.h" |
| 16 #include "ui/gfx/size.h" | 17 #include "ui/gfx/size.h" |
| 17 #include "ui/wayland/wayland_widget.h" | 18 #include "ui/wayland/wayland_widget.h" |
| 18 #include "views/widget/native_widget_private.h" | 19 #include "views/widget/native_widget_private.h" |
| 19 #include "views/widget/widget.h" | 20 #include "views/widget/widget.h" |
| 20 | 21 |
| 21 typedef struct _cairo_device cairo_device_t; | 22 typedef struct _cairo_device cairo_device_t; |
| 22 typedef struct _cairo_surface cairo_surface_t; | 23 typedef struct _cairo_surface cairo_surface_t; |
| 23 | 24 |
| 25 using base::wayland::WaylandEvent; | |
|
sky
2011/11/10 00:52:42
no using in headers.
Mandeep Singh Baines
2011/11/11 19:26:52
Done.
| |
| 26 | |
| 24 namespace gfx { | 27 namespace gfx { |
| 25 class Rect; | 28 class Rect; |
| 26 } | 29 } |
| 27 | 30 |
| 28 namespace ui { | 31 namespace ui { |
| 29 class ViewProp; | 32 class ViewProp; |
| 30 class WaylandDisplay; | 33 class WaylandDisplay; |
| 31 class WaylandInputDevice; | 34 class WaylandInputDevice; |
| 32 class WaylandWindow; | 35 class WaylandWindow; |
| 33 } | 36 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 virtual void RunShellDrag(View* view, | 123 virtual void RunShellDrag(View* view, |
| 121 const ui::OSExchangeData& data, | 124 const ui::OSExchangeData& data, |
| 122 int operation) OVERRIDE; | 125 int operation) OVERRIDE; |
| 123 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; | 126 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; |
| 124 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; | 127 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; |
| 125 virtual void ClearNativeFocus() OVERRIDE; | 128 virtual void ClearNativeFocus() OVERRIDE; |
| 126 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; | 129 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; |
| 127 virtual bool ConvertPointFromAncestor( | 130 virtual bool ConvertPointFromAncestor( |
| 128 const Widget* ancestor, gfx::Point* point) const OVERRIDE; | 131 const Widget* ancestor, gfx::Point* point) const OVERRIDE; |
| 129 | 132 |
| 130 virtual void OnMotionNotify(ui::WaylandEvent event) OVERRIDE; | 133 virtual void OnMotionNotify(WaylandEvent event) OVERRIDE; |
| 131 virtual void OnButtonNotify(ui::WaylandEvent event) OVERRIDE; | 134 virtual void OnButtonNotify(WaylandEvent event) OVERRIDE; |
| 132 virtual void OnKeyNotify(ui::WaylandEvent event) OVERRIDE; | 135 virtual void OnKeyNotify(WaylandEvent event) OVERRIDE; |
| 133 virtual void OnPointerFocus(ui::WaylandEvent event) OVERRIDE; | 136 virtual void OnPointerFocus(WaylandEvent event) OVERRIDE; |
| 134 virtual void OnKeyboardFocus(ui::WaylandEvent event) OVERRIDE; | 137 virtual void OnKeyboardFocus(WaylandEvent event) OVERRIDE; |
| 135 | 138 |
| 136 virtual void OnGeometryChange(ui::WaylandEvent event) OVERRIDE; | 139 virtual void OnGeometryChange(WaylandEvent event) OVERRIDE; |
| 137 | 140 |
| 138 private: | 141 private: |
| 139 typedef ScopedVector<ui::ViewProp> ViewProps; | 142 typedef ScopedVector<ui::ViewProp> ViewProps; |
| 140 | 143 |
| 141 // Overridden from ui::CompositorDelegate | 144 // Overridden from ui::CompositorDelegate |
| 142 virtual void ScheduleDraw(); | 145 virtual void ScheduleDraw(); |
| 143 | 146 |
| 144 // Overridden from NativeWidget | 147 // Overridden from NativeWidget |
| 145 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 148 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
| 146 | 149 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 // and the compositor will have these, so we don't need to worry about them. | 204 // and the compositor will have these, so we don't need to worry about them. |
| 202 scoped_refptr<gfx::GLSurface> surface_; | 205 scoped_refptr<gfx::GLSurface> surface_; |
| 203 scoped_refptr<gfx::GLContext> context_; | 206 scoped_refptr<gfx::GLContext> context_; |
| 204 | 207 |
| 205 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWayland); | 208 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWayland); |
| 206 }; | 209 }; |
| 207 | 210 |
| 208 } // namespace views | 211 } // namespace views |
| 209 | 212 |
| 210 #endif // VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ | 213 #endif // VIEWS_WIDGET_NATIVE_WIDGET_WAYLAND_H_ |
| OLD | NEW |