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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 void SetOverlayVideoMode(bool enabled); | 259 void SetOverlayVideoMode(bool enabled); |
260 | 260 |
261 typedef base::Callback< | 261 typedef base::Callback< |
262 void(const base::string16& content, int start_offset, int end_offset)> | 262 void(const base::string16& content, int start_offset, int end_offset)> |
263 TextSurroundingSelectionCallback; | 263 TextSurroundingSelectionCallback; |
264 void SetTextSurroundingSelectionCallback( | 264 void SetTextSurroundingSelectionCallback( |
265 const TextSurroundingSelectionCallback& callback); | 265 const TextSurroundingSelectionCallback& callback); |
266 | 266 |
267 static void OnContextLost(); | 267 static void OnContextLost(); |
268 | 268 |
| 269 void GenerateNewFrameForTesting(); |
| 270 float last_page_scale_factor() { return last_page_scale_factor_; } |
| 271 |
269 private: | 272 private: |
270 void RunAckCallbacks(); | 273 void RunAckCallbacks(); |
271 | 274 |
272 void DestroyDelegatedContent(); | 275 void DestroyDelegatedContent(); |
273 void SwapDelegatedFrame(uint32 output_surface_id, | 276 void SwapDelegatedFrame(uint32 output_surface_id, |
274 scoped_ptr<cc::DelegatedFrameData> frame_data); | 277 scoped_ptr<cc::DelegatedFrameData> frame_data); |
275 void SendDelegatedFrameAck(uint32 output_surface_id); | 278 void SendDelegatedFrameAck(uint32 output_surface_id); |
276 void SendReturnedDelegatedResources(uint32 output_surface_id); | 279 void SendReturnedDelegatedResources(uint32 output_surface_id); |
277 | 280 |
278 void OnFrameMetadataUpdated( | 281 void OnFrameMetadataUpdated( |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 scoped_ptr<LastFrameInfo> last_frame_info_; | 404 scoped_ptr<LastFrameInfo> last_frame_info_; |
402 | 405 |
403 TextSurroundingSelectionCallback text_surrounding_selection_callback_; | 406 TextSurroundingSelectionCallback text_surrounding_selection_callback_; |
404 | 407 |
405 // List of readbackrequests waiting for arrival of a valid frame. | 408 // List of readbackrequests waiting for arrival of a valid frame. |
406 std::queue<ReadbackRequest> readbacks_waiting_for_frame_; | 409 std::queue<ReadbackRequest> readbacks_waiting_for_frame_; |
407 | 410 |
408 // The last scroll offset of the view. | 411 // The last scroll offset of the view. |
409 gfx::Vector2dF last_scroll_offset_; | 412 gfx::Vector2dF last_scroll_offset_; |
410 | 413 |
| 414 float last_page_scale_factor_; |
| 415 |
411 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; | 416 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; |
412 | 417 |
413 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 418 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
414 }; | 419 }; |
415 | 420 |
416 } // namespace content | 421 } // namespace content |
417 | 422 |
418 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 423 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
OLD | NEW |