Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "content/browser/renderer_host/render_widget_host_view_base.h" 13 #include "content/browser/renderer_host/render_widget_host_view_base.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "ui/aura/client/activation_delegate.h" 15 #include "ui/aura/client/activation_delegate.h"
16 #include "ui/aura/window_delegate.h" 16 #include "ui/aura/window_delegate.h"
17 #include "ui/base/ime/text_input_client.h" 17 #include "ui/base/ime/text_input_client.h"
18 #include "ui/gfx/compositor/compositor_observer.h" 18 #include "ui/gfx/compositor/compositor_observer.h"
19 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
20 #include "webkit/glue/webcursor.h" 20 #include "webkit/glue/webcursor.h"
21 21
22 namespace content { 22 namespace content {
23 class RenderWidgetHostView; 23 class RenderWidgetHostView;
24 } 24 }
25 25
26 namespace gfx { 26 namespace gfx {
27 class Canvas; 27 class CanvasSkia;
28 } 28 }
29 29
30 namespace ui { 30 namespace ui {
31 class InputMethod; 31 class InputMethod;
32 } 32 }
33 33
34 namespace WebKit { 34 namespace WebKit {
35 class WebTouchEvent; 35 class WebTouchEvent;
36 } 36 }
37 37
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 virtual void OnFocus() OVERRIDE; 144 virtual void OnFocus() OVERRIDE;
145 virtual void OnBlur() OVERRIDE; 145 virtual void OnBlur() OVERRIDE;
146 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE; 146 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE;
147 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE; 147 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE;
148 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; 148 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE;
149 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE; 149 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE;
150 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE; 150 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE;
151 virtual ui::GestureStatus OnGestureEvent(aura::GestureEvent* event) OVERRIDE; 151 virtual ui::GestureStatus OnGestureEvent(aura::GestureEvent* event) OVERRIDE;
152 virtual bool CanFocus() OVERRIDE; 152 virtual bool CanFocus() OVERRIDE;
153 virtual void OnCaptureLost() OVERRIDE; 153 virtual void OnCaptureLost() OVERRIDE;
154 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 154 virtual void OnPaint(gfx::CanvasSkia* canvas) OVERRIDE;
155 virtual void OnWindowDestroying() OVERRIDE; 155 virtual void OnWindowDestroying() OVERRIDE;
156 virtual void OnWindowDestroyed() OVERRIDE; 156 virtual void OnWindowDestroyed() OVERRIDE;
157 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE; 157 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE;
158 158
159 // Overridden from aura::client::ActivationDelegate: 159 // Overridden from aura::client::ActivationDelegate:
160 virtual bool ShouldActivate(aura::Event* event) OVERRIDE; 160 virtual bool ShouldActivate(aura::Event* event) OVERRIDE;
161 virtual void OnActivated() OVERRIDE; 161 virtual void OnActivated() OVERRIDE;
162 virtual void OnLostActive() OVERRIDE; 162 virtual void OnLostActive() OVERRIDE;
163 163
164 protected: 164 protected:
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 std::vector< base::Callback<void(void)> > on_compositing_ended_callbacks_; 243 std::vector< base::Callback<void(void)> > on_compositing_ended_callbacks_;
244 244
245 std::map<uint64, scoped_refptr<ImageTransportClient> > 245 std::map<uint64, scoped_refptr<ImageTransportClient> >
246 image_transport_clients_; 246 image_transport_clients_;
247 247
248 uint64 current_surface_; 248 uint64 current_surface_;
249 249
250 gfx::GLSurfaceHandle shared_surface_handle_; 250 gfx::GLSurfaceHandle shared_surface_handle_;
251 251
252 // If non-NULL we're in OnPaint() and this is the supplied canvas. 252 // If non-NULL we're in OnPaint() and this is the supplied canvas.
253 gfx::Canvas* paint_canvas_; 253 gfx::CanvasSkia* paint_canvas_;
254 254
255 // Used to record the last position of the mouse. 255 // Used to record the last position of the mouse.
256 // While the mouse is locked, they store the last known position just as mouse 256 // While the mouse is locked, they store the last known position just as mouse
257 // lock was entered. 257 // lock was entered.
258 // Relative to the upper-left corner of the view. 258 // Relative to the upper-left corner of the view.
259 gfx::Point unlocked_mouse_position_; 259 gfx::Point unlocked_mouse_position_;
260 // Relative to the upper-left corner of the screen. 260 // Relative to the upper-left corner of the screen.
261 gfx::Point unlocked_global_mouse_position_; 261 gfx::Point unlocked_global_mouse_position_;
262 // Last cursor position relative to screen. Used to compute movementX/Y. 262 // Last cursor position relative to screen. Used to compute movementX/Y.
263 gfx::Point global_mouse_position_; 263 gfx::Point global_mouse_position_;
264 // In mouse locked mode, we syntheticaly move the mouse cursor to the center 264 // In mouse locked mode, we syntheticaly move the mouse cursor to the center
265 // of the window when it reaches the window borders to avoid it going outside. 265 // of the window when it reaches the window borders to avoid it going outside.
266 // This flag is used to differentiate between these synthetic mouse move 266 // This flag is used to differentiate between these synthetic mouse move
267 // events vs. normal mouse move events. 267 // events vs. normal mouse move events.
268 bool synthetic_move_sent_; 268 bool synthetic_move_sent_;
269 269
270 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 270 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
271 }; 271 };
272 272
273 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 273 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698