Chromium Code Reviews| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 229 | 229 |
| 230 long GetNativeImeAdapter(); | 230 long GetNativeImeAdapter(); |
| 231 | 231 |
| 232 void WasResized(); | 232 void WasResized(); |
| 233 | 233 |
| 234 void GetScaledContentBitmap(float scale, | 234 void GetScaledContentBitmap(float scale, |
| 235 SkColorType preferred_color_type, | 235 SkColorType preferred_color_type, |
| 236 gfx::Rect src_subrect, | 236 gfx::Rect src_subrect, |
| 237 const ReadbackRequestCallback& result_callback); | 237 const ReadbackRequestCallback& result_callback); |
| 238 | 238 |
| 239 scoped_refptr<cc::Layer> CreateDelegatedLayer() const; | 239 scoped_refptr<cc::Layer> CreateSurfaceLayer() const; |
| 240 | 240 |
| 241 bool HasValidFrame() const; | 241 bool HasValidFrame() const; |
| 242 | 242 |
| 243 void MoveCaret(const gfx::Point& point); | 243 void MoveCaret(const gfx::Point& point); |
| 244 void DismissTextHandles(); | 244 void DismissTextHandles(); |
| 245 void SetTextHandlesTemporarilyHidden(bool hidden); | 245 void SetTextHandlesTemporarilyHidden(bool hidden); |
| 246 void OnShowingPastePopup(const gfx::PointF& point); | 246 void OnShowingPastePopup(const gfx::PointF& point); |
| 247 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); | 247 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); |
| 248 | 248 |
| 249 void SynchronousFrameMetadata(cc::CompositorFrameMetadata frame_metadata); | 249 void SynchronousFrameMetadata(cc::CompositorFrameMetadata frame_metadata); |
| 250 | 250 |
| 251 void SetOverlayVideoMode(bool enabled); | 251 void SetOverlayVideoMode(bool enabled); |
| 252 | 252 |
| 253 typedef base::Callback< | 253 typedef base::Callback< |
| 254 void(const base::string16& content, int start_offset, int end_offset)> | 254 void(const base::string16& content, int start_offset, int end_offset)> |
| 255 TextSurroundingSelectionCallback; | 255 TextSurroundingSelectionCallback; |
| 256 void SetTextSurroundingSelectionCallback( | 256 void SetTextSurroundingSelectionCallback( |
| 257 const TextSurroundingSelectionCallback& callback); | 257 const TextSurroundingSelectionCallback& callback); |
| 258 | 258 |
| 259 static void OnContextLost(); | 259 static void OnContextLost(); |
| 260 | 260 |
| 261 private: | 261 private: |
| 262 void RunAckCallbacks(cc::SurfaceDrawStatus status); | 262 void RunAckCallbacks(cc::SurfaceDrawStatus status); |
| 263 | 263 |
| 264 void DestroyDelegatedContent(); | 264 void DestroyDelegatedContent(); |
| 265 void CheckOutputSurfaceChanged(uint32_t output_surface_id); | 265 void CheckOutputSurfaceChanged(uint32_t output_surface_id); |
| 266 void SubmitCompositorFrame(cc::CompositorFrame frame_data); | 266 void SubmitCompositorFrame(cc::CompositorFrame frame_data); |
| 267 void SwapDelegatedFrame(uint32_t output_surface_id, | |
| 268 cc::CompositorFrame frame_data); | |
| 269 void SendDelegatedFrameAck(uint32_t output_surface_id); | 267 void SendDelegatedFrameAck(uint32_t output_surface_id); |
| 270 void SendReturnedDelegatedResources(uint32_t output_surface_id); | 268 void SendReturnedDelegatedResources(uint32_t output_surface_id); |
| 271 | 269 |
| 272 void OnFrameMetadataUpdated( | 270 void OnFrameMetadataUpdated( |
| 273 const cc::CompositorFrameMetadata& frame_metadata); | 271 const cc::CompositorFrameMetadata& frame_metadata); |
| 274 | 272 |
| 275 void ShowInternal(); | 273 void ShowInternal(); |
| 276 void HideInternal(); | 274 void HideInternal(); |
| 277 void AttachLayers(); | 275 void AttachLayers(); |
| 278 void RemoveLayers(); | 276 void RemoveLayers(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 337 bool is_window_activity_started_; | 335 bool is_window_activity_started_; |
| 338 | 336 |
| 339 // ContentViewCoreImpl is our interface to the view system. | 337 // ContentViewCoreImpl is our interface to the view system. |
| 340 ContentViewCoreImpl* content_view_core_; | 338 ContentViewCoreImpl* content_view_core_; |
| 341 | 339 |
| 342 ImeAdapterAndroid ime_adapter_android_; | 340 ImeAdapterAndroid ime_adapter_android_; |
| 343 | 341 |
| 344 // Body background color of the underlying document. | 342 // Body background color of the underlying document. |
| 345 SkColor cached_background_color_; | 343 SkColor cached_background_color_; |
| 346 | 344 |
| 347 scoped_refptr<cc::Layer> layer_; | 345 scoped_refptr<cc::Layer> layer_; |
|
danakj
2016/07/01 23:15:37
this could be SurfaceLayer
no sievers
2016/07/01 23:29:06
Actually I wanted to pull out the Surface-related
| |
| 348 | 346 |
| 349 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_; | 347 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_; |
| 350 std::unique_ptr<cc::SurfaceFactory> surface_factory_; | 348 std::unique_ptr<cc::SurfaceFactory> surface_factory_; |
| 351 cc::SurfaceId surface_id_; | 349 cc::SurfaceId surface_id_; |
| 352 gfx::Size current_surface_size_; | 350 gfx::Size current_surface_size_; |
| 353 cc::ReturnedResourceArray surface_returned_resources_; | 351 cc::ReturnedResourceArray surface_returned_resources_; |
| 354 gfx::Vector2dF location_bar_content_translation_; | 352 gfx::Vector2dF location_bar_content_translation_; |
| 355 cc::Selection<gfx::SelectionBound> current_viewport_selection_; | 353 cc::Selection<gfx::SelectionBound> current_viewport_selection_; |
| 356 | 354 |
| 357 // The most recent texture size that was pushed to the texture layer. | 355 // The most recent texture size that was pushed to the texture layer. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 403 gfx::Vector2dF last_scroll_offset_; | 401 gfx::Vector2dF last_scroll_offset_; |
| 404 | 402 |
| 405 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; | 403 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; |
| 406 | 404 |
| 407 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 405 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 408 }; | 406 }; |
| 409 | 407 |
| 410 } // namespace content | 408 } // namespace content |
| 411 | 409 |
| 412 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 410 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |