| 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 | 217 |
| 218 bool HasValidFrame() const; | 218 bool HasValidFrame() const; |
| 219 | 219 |
| 220 void MoveCaret(const gfx::Point& point); | 220 void MoveCaret(const gfx::Point& point); |
| 221 | 221 |
| 222 void SynchronousFrameMetadata( | 222 void SynchronousFrameMetadata( |
| 223 const cc::CompositorFrameMetadata& frame_metadata); | 223 const cc::CompositorFrameMetadata& frame_metadata); |
| 224 | 224 |
| 225 void SetOverlayVideoMode(bool enabled); | 225 void SetOverlayVideoMode(bool enabled); |
| 226 | 226 |
| 227 typedef base::Callback< |
| 228 void(const base::string16& content, int start_offset, int end_offset)> |
| 229 TextSurroundingSelectionCallback; |
| 230 void SetTextSurroundingSelectionCallback( |
| 231 const TextSurroundingSelectionCallback& callback); |
| 232 |
| 227 private: | 233 private: |
| 228 void RunAckCallbacks(); | 234 void RunAckCallbacks(); |
| 229 | 235 |
| 230 void DestroyDelegatedContent(); | 236 void DestroyDelegatedContent(); |
| 231 void SwapDelegatedFrame(uint32 output_surface_id, | 237 void SwapDelegatedFrame(uint32 output_surface_id, |
| 232 scoped_ptr<cc::DelegatedFrameData> frame_data); | 238 scoped_ptr<cc::DelegatedFrameData> frame_data); |
| 233 void SendDelegatedFrameAck(uint32 output_surface_id); | 239 void SendDelegatedFrameAck(uint32 output_surface_id); |
| 234 void SendReturnedDelegatedResources(uint32 output_surface_id); | 240 void SendReturnedDelegatedResources(uint32 output_surface_id); |
| 235 | 241 |
| 236 void OnFrameMetadataUpdated( | 242 void OnFrameMetadataUpdated( |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // current frame. | 282 // current frame. |
| 277 void RetainFrame(uint32 output_surface_id, | 283 void RetainFrame(uint32 output_surface_id, |
| 278 scoped_ptr<cc::CompositorFrame> frame); | 284 scoped_ptr<cc::CompositorFrame> frame); |
| 279 | 285 |
| 280 void InternalSwapCompositorFrame(uint32 output_surface_id, | 286 void InternalSwapCompositorFrame(uint32 output_surface_id, |
| 281 scoped_ptr<cc::CompositorFrame> frame); | 287 scoped_ptr<cc::CompositorFrame> frame); |
| 282 | 288 |
| 283 void SetNeedsAnimate(); | 289 void SetNeedsAnimate(); |
| 284 bool Animate(base::TimeTicks frame_time); | 290 bool Animate(base::TimeTicks frame_time); |
| 285 | 291 |
| 286 | |
| 287 // The model object. | 292 // The model object. |
| 288 RenderWidgetHostImpl* host_; | 293 RenderWidgetHostImpl* host_; |
| 289 | 294 |
| 290 // Used to track whether this render widget needs a BeginFrame. | 295 // Used to track whether this render widget needs a BeginFrame. |
| 291 bool needs_begin_frame_; | 296 bool needs_begin_frame_; |
| 292 | 297 |
| 293 bool is_showing_; | 298 bool is_showing_; |
| 294 | 299 |
| 295 // ContentViewCoreImpl is our interface to the view system. | 300 // ContentViewCoreImpl is our interface to the view system. |
| 296 ContentViewCoreImpl* content_view_core_; | 301 ContentViewCoreImpl* content_view_core_; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 struct LastFrameInfo { | 351 struct LastFrameInfo { |
| 347 LastFrameInfo(uint32 output_id, | 352 LastFrameInfo(uint32 output_id, |
| 348 scoped_ptr<cc::CompositorFrame> output_frame); | 353 scoped_ptr<cc::CompositorFrame> output_frame); |
| 349 ~LastFrameInfo(); | 354 ~LastFrameInfo(); |
| 350 uint32 output_surface_id; | 355 uint32 output_surface_id; |
| 351 scoped_ptr<cc::CompositorFrame> frame; | 356 scoped_ptr<cc::CompositorFrame> frame; |
| 352 }; | 357 }; |
| 353 | 358 |
| 354 scoped_ptr<LastFrameInfo> last_frame_info_; | 359 scoped_ptr<LastFrameInfo> last_frame_info_; |
| 355 | 360 |
| 361 TextSurroundingSelectionCallback text_surrounding_selection_callback_; |
| 362 |
| 356 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 363 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 357 }; | 364 }; |
| 358 | 365 |
| 359 } // namespace content | 366 } // namespace content |
| 360 | 367 |
| 361 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 368 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |