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

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

Issue 10689108: Aura: Have ui::Layer implement WebKit::WebExternalTextureLayerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nuke TestImageTransportFactory. Created 8 years, 5 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 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 class RenderWidgetHostImpl; 29 class RenderWidgetHostImpl;
30 class RenderWidgetHostView; 30 class RenderWidgetHostView;
31 } 31 }
32 32
33 namespace gfx { 33 namespace gfx {
34 class Canvas; 34 class Canvas;
35 } 35 }
36 36
37 namespace ui { 37 namespace ui {
38 class InputMethod; 38 class InputMethod;
39 class Texture;
39 } 40 }
40 41
41 namespace WebKit { 42 namespace WebKit {
42 class WebTouchEvent; 43 class WebTouchEvent;
43 } 44 }
44 45
45 class ImageTransportClient;
46
47 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. 46 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h.
48 class RenderWidgetHostViewAura 47 class RenderWidgetHostViewAura
49 : public content::RenderWidgetHostViewBase, 48 : public content::RenderWidgetHostViewBase,
50 public ui::CompositorObserver, 49 public ui::CompositorObserver,
51 public ui::TextInputClient, 50 public ui::TextInputClient,
52 public aura::WindowDelegate, 51 public aura::WindowDelegate,
53 public aura::client::ActivationDelegate, 52 public aura::client::ActivationDelegate,
54 public ImageTransportFactoryObserver { 53 public ImageTransportFactoryObserver {
55 public: 54 public:
56 // RenderWidgetHostView implementation. 55 // RenderWidgetHostView implementation.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 friend class content::RenderWidgetHostView; 186 friend class content::RenderWidgetHostView;
188 187
189 // Should construct only via RenderWidgetHostView::CreateViewForWidget. 188 // Should construct only via RenderWidgetHostView::CreateViewForWidget.
190 explicit RenderWidgetHostViewAura(content::RenderWidgetHost* host); 189 explicit RenderWidgetHostViewAura(content::RenderWidgetHost* host);
191 190
192 private: 191 private:
193 class WindowObserver; 192 class WindowObserver;
194 friend class WindowObserver; 193 friend class WindowObserver;
195 194
196 // Overridden from ui::CompositorObserver: 195 // Overridden from ui::CompositorObserver:
196 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE;
197 virtual void OnCompositingWillStart(ui::Compositor* compositor) OVERRIDE; 197 virtual void OnCompositingWillStart(ui::Compositor* compositor) OVERRIDE;
198 virtual void OnCompositingStarted(ui::Compositor* compositor) OVERRIDE; 198 virtual void OnCompositingStarted(ui::Compositor* compositor) OVERRIDE;
199 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE; 199 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE;
200 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE; 200 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE;
201 201
202 // Overridden from ImageTransportFactoryObserver: 202 // Overridden from ImageTransportFactoryObserver:
203 virtual void OnLostResources(ui::Compositor* compositor) OVERRIDE; 203 virtual void OnLostResources(ui::Compositor* compositor) OVERRIDE;
204 204
205 virtual ~RenderWidgetHostViewAura(); 205 virtual ~RenderWidgetHostViewAura();
206 206
(...skipping 14 matching lines...) Expand all
221 221
222 // If |clip| is non-empty and and doesn't contain |rect| or |clip| is empty 222 // If |clip| is non-empty and and doesn't contain |rect| or |clip| is empty
223 // SchedulePaint() is invoked for |rect|. 223 // SchedulePaint() is invoked for |rect|.
224 void SchedulePaintIfNotInClip(const gfx::Rect& rect, const gfx::Rect& clip); 224 void SchedulePaintIfNotInClip(const gfx::Rect& rect, const gfx::Rect& clip);
225 225
226 // Helper method to determine if, in mouse locked mode, the cursor should be 226 // Helper method to determine if, in mouse locked mode, the cursor should be
227 // moved to center. 227 // moved to center.
228 bool ShouldMoveToCenter(); 228 bool ShouldMoveToCenter();
229 229
230 // Run the compositing callbacks. 230 // Run the compositing callbacks.
231 void RunCompositingCallbacks(); 231 void RunCompositingDidCommitCallbacks(ui::Compositor* compositor);
232 void RunCompositingWillStartCallbacks(ui::Compositor* compositor);
232 233
233 // Insert a sync point into the compositor's command stream and acknowledge 234 // Insert a sync point into the compositor's command stream and acknowledge
234 // that we have presented the accelerated surface buffer. 235 // that we have presented the accelerated surface buffer.
235 void InsertSyncPointAndACK(int32 route_id, int gpu_host_id); 236 static void InsertSyncPointAndACK(int32 route_id,
237 int gpu_host_id,
238 ui::Compositor* compositor);
236 239
237 // Called when window_ is removed from the window tree. 240 // Called when window_ is removed from the window tree.
238 void RemovingFromRootWindow(); 241 void RemovingFromRootWindow();
239 242
240 ui::Compositor* GetCompositor(); 243 ui::Compositor* GetCompositor();
241 244
242 // Detaches |this| from the input method object. 245 // Detaches |this| from the input method object.
243 void DetachFromInputMethod(); 246 void DetachFromInputMethod();
244 247
245 // Converts |rect| from window coordinate to screen coordinate. 248 // Converts |rect| from window coordinate to screen coordinate.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 290
288 // The current composition character bounds. 291 // The current composition character bounds.
289 std::vector<gfx::Rect> composition_character_bounds_; 292 std::vector<gfx::Rect> composition_character_bounds_;
290 293
291 // Indicates if there is onging composition text. 294 // Indicates if there is onging composition text.
292 bool has_composition_text_; 295 bool has_composition_text_;
293 296
294 // Current tooltip text. 297 // Current tooltip text.
295 string16 tooltip_; 298 string16 tooltip_;
296 299
297 std::vector< base::Callback<void(void)> > 300 std::vector< base::Callback<void(ui::Compositor*)> >
301 on_compositing_did_commit_callbacks_;
302
303 std::vector< base::Callback<void(ui::Compositor*)> >
298 on_compositing_will_start_callbacks_; 304 on_compositing_will_start_callbacks_;
299 305
300 std::map<uint64, scoped_refptr<ImageTransportClient> > 306 std::map<uint64, scoped_refptr<ui::Texture> >
301 image_transport_clients_; 307 image_transport_clients_;
302 308
303 uint64 current_surface_; 309 uint64 current_surface_;
304 310
305 gfx::GLSurfaceHandle shared_surface_handle_; 311 gfx::GLSurfaceHandle shared_surface_handle_;
306 312
307 // If non-NULL we're in OnPaint() and this is the supplied canvas. 313 // If non-NULL we're in OnPaint() and this is the supplied canvas.
308 gfx::Canvas* paint_canvas_; 314 gfx::Canvas* paint_canvas_;
309 315
310 // Used to record the last position of the mouse. 316 // Used to record the last position of the mouse.
(...skipping 24 matching lines...) Expand all
335 // These locks are the ones waiting for a frame to be drawn. 341 // These locks are the ones waiting for a frame to be drawn.
336 std::vector<linked_ptr<ResizeLock> > locks_pending_draw_; 342 std::vector<linked_ptr<ResizeLock> > locks_pending_draw_;
337 343
338 // This lock is for waiting for a front surface to become available to draw. 344 // This lock is for waiting for a front surface to become available to draw.
339 scoped_refptr<aura::CompositorLock> released_front_lock_; 345 scoped_refptr<aura::CompositorLock> released_front_lock_;
340 346
341 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 347 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
342 }; 348 };
343 349
344 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 350 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698