| OLD | NEW |
| 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_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 26 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 27 #include "ui/gfx/size.h" | 27 #include "ui/gfx/size.h" |
| 28 #include "ui/gfx/vector2d_f.h" | 28 #include "ui/gfx/vector2d_f.h" |
| 29 | 29 |
| 30 struct ViewHostMsg_TextInputState_Params; | 30 struct ViewHostMsg_TextInputState_Params; |
| 31 | 31 |
| 32 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | 32 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
| 33 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; | 33 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; |
| 34 | 34 |
| 35 namespace cc { | 35 namespace cc { |
| 36 class CopyOutputResult; |
| 36 class DelegatedRendererLayer; | 37 class DelegatedRendererLayer; |
| 37 class Layer; | 38 class Layer; |
| 38 class TextureLayer; | 39 class TextureLayer; |
| 39 } | 40 } |
| 40 | 41 |
| 41 namespace WebKit { | 42 namespace WebKit { |
| 42 class WebExternalTextureLayer; | 43 class WebExternalTextureLayer; |
| 43 class WebTouchEvent; | 44 class WebTouchEvent; |
| 44 class WebMouseEvent; | 45 class WebMouseEvent; |
| 45 } | 46 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 void ResetClipping(); | 250 void ResetClipping(); |
| 250 void ClipContents(const gfx::Rect& clipping, const gfx::Size& content_size); | 251 void ClipContents(const gfx::Rect& clipping, const gfx::Size& content_size); |
| 251 | 252 |
| 252 void AttachLayers(); | 253 void AttachLayers(); |
| 253 void RemoveLayers(); | 254 void RemoveLayers(); |
| 254 | 255 |
| 255 void CreateOverscrollEffectIfNecessary(); | 256 void CreateOverscrollEffectIfNecessary(); |
| 256 void UpdateAnimationSize(const cc::CompositorFrameMetadata& frame_metadata); | 257 void UpdateAnimationSize(const cc::CompositorFrameMetadata& frame_metadata); |
| 257 void ScheduleAnimationIfNecessary(); | 258 void ScheduleAnimationIfNecessary(); |
| 258 | 259 |
| 260 // Called after async thumbnailer task completes. Scales and crops the result |
| 261 // of the copy. |
| 262 static void CopyFromCompositingSurfaceHasResult( |
| 263 const gfx::Size& dst_size_in_pixel, |
| 264 const base::Callback<void(bool, const SkBitmap&)>& callback, |
| 265 scoped_ptr<cc::CopyOutputResult> result); |
| 266 static void PrepareTextureCopyOutputResult( |
| 267 const gfx::Size& dst_size_in_pixel, |
| 268 const base::Callback<void(bool, const SkBitmap&)>& callback, |
| 269 scoped_ptr<cc::CopyOutputResult> result); |
| 270 static void PrepareBitmapCopyOutputResult( |
| 271 const gfx::Size& dst_size_in_pixel, |
| 272 const base::Callback<void(bool, const SkBitmap&)>& callback, |
| 273 scoped_ptr<cc::CopyOutputResult> result); |
| 274 |
| 259 // The model object. | 275 // The model object. |
| 260 RenderWidgetHostImpl* host_; | 276 RenderWidgetHostImpl* host_; |
| 261 | 277 |
| 262 // Used to track whether this render widget needs a BeginFrame. | 278 // Used to track whether this render widget needs a BeginFrame. |
| 263 bool needs_begin_frame_; | 279 bool needs_begin_frame_; |
| 264 | 280 |
| 265 // Whether or not this widget is potentially attached to the view hierarchy. | 281 // Whether or not this widget is potentially attached to the view hierarchy. |
| 266 // This view may not actually be attached if this is true, but it should be | 282 // This view may not actually be attached if this is true, but it should be |
| 267 // treated as such, because as soon as a ContentViewCore is set the layer | 283 // treated as such, because as soon as a ContentViewCore is set the layer |
| 268 // will be attached automatically. | 284 // will be attached automatically. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // Used to render overscroll overlays. | 325 // Used to render overscroll overlays. |
| 310 bool overscroll_effect_enabled_; | 326 bool overscroll_effect_enabled_; |
| 311 scoped_ptr<OverscrollGlow> overscroll_effect_; | 327 scoped_ptr<OverscrollGlow> overscroll_effect_; |
| 312 | 328 |
| 313 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 329 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 314 }; | 330 }; |
| 315 | 331 |
| 316 } // namespace content | 332 } // namespace content |
| 317 | 333 |
| 318 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 334 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |