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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 void OnSetNeedsBeginFrame(bool enabled); | 217 void OnSetNeedsBeginFrame(bool enabled); |
218 void OnSmartClipDataExtracted(const base::string16& result); | 218 void OnSmartClipDataExtracted(const base::string16& result); |
219 | 219 |
220 void LockResources(); | 220 void LockResources(); |
221 void UnlockResources(); | 221 void UnlockResources(); |
222 | 222 |
223 int GetNativeImeAdapter(); | 223 int GetNativeImeAdapter(); |
224 | 224 |
225 void WasResized(); | 225 void WasResized(); |
226 | 226 |
227 blink::WebGLId GetScaledContentTexture(float scale, gfx::Size* out_size); | 227 void GetScaledContentBitmap( |
| 228 float scale, |
| 229 gfx::Size* out_size, |
| 230 const base::Callback<void(bool, const SkBitmap&)>& result_callback); |
228 bool PopulateBitmapWithContents(jobject jbitmap); | 231 bool PopulateBitmapWithContents(jobject jbitmap); |
229 | 232 |
230 bool HasValidFrame() const; | 233 bool HasValidFrame() const; |
231 | 234 |
232 // Select all text between the given coordinates. | 235 // Select all text between the given coordinates. |
233 void SelectRange(const gfx::Point& start, const gfx::Point& end); | 236 void SelectRange(const gfx::Point& start, const gfx::Point& end); |
234 | 237 |
235 void MoveCaret(const gfx::Point& point); | 238 void MoveCaret(const gfx::Point& point); |
236 | 239 |
237 void RequestContentClipping(const gfx::Rect& clipping, | 240 void RequestContentClipping(const gfx::Rect& clipping, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 const gfx::Rect& src_subrect_in_pixel, | 292 const gfx::Rect& src_subrect_in_pixel, |
290 const gfx::Size& dst_size_in_pixel, | 293 const gfx::Size& dst_size_in_pixel, |
291 const base::Callback<void(bool, const SkBitmap&)>& callback); | 294 const base::Callback<void(bool, const SkBitmap&)>& callback); |
292 | 295 |
293 // The model object. | 296 // The model object. |
294 RenderWidgetHostImpl* host_; | 297 RenderWidgetHostImpl* host_; |
295 | 298 |
296 // Used to track whether this render widget needs a BeginFrame. | 299 // Used to track whether this render widget needs a BeginFrame. |
297 bool needs_begin_frame_; | 300 bool needs_begin_frame_; |
298 | 301 |
299 // Whether or not this widget is potentially attached to the view hierarchy. | 302 bool is_showing_; |
300 // This view may not actually be attached if this is true, but it should be | |
301 // treated as such, because as soon as a ContentViewCore is set the layer | |
302 // will be attached automatically. | |
303 bool are_layers_attached_; | |
304 | 303 |
305 // ContentViewCoreImpl is our interface to the view system. | 304 // ContentViewCoreImpl is our interface to the view system. |
306 ContentViewCoreImpl* content_view_core_; | 305 ContentViewCoreImpl* content_view_core_; |
307 | 306 |
308 ImeAdapterAndroid ime_adapter_android_; | 307 ImeAdapterAndroid ime_adapter_android_; |
309 | 308 |
310 // Body background color of the underlying document. | 309 // Body background color of the underlying document. |
311 SkColor cached_background_color_; | 310 SkColor cached_background_color_; |
312 | 311 |
313 // The texture layer for this view when using browser-side compositing. | 312 // The texture layer for this view when using browser-side compositing. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 const bool using_synchronous_compositor_; | 355 const bool using_synchronous_compositor_; |
357 | 356 |
358 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; | 357 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; |
359 | 358 |
360 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 359 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
361 }; | 360 }; |
362 | 361 |
363 } // namespace content | 362 } // namespace content |
364 | 363 |
365 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 364 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
OLD | NEW |