| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 namespace ui { | 55 namespace ui { |
| 56 class DelegatedFrameHostAndroid; | 56 class DelegatedFrameHostAndroid; |
| 57 } | 57 } |
| 58 | 58 |
| 59 namespace content { | 59 namespace content { |
| 60 class ContentViewCoreImpl; | 60 class ContentViewCoreImpl; |
| 61 class OverscrollControllerAndroid; | 61 class OverscrollControllerAndroid; |
| 62 class RenderWidgetHost; | 62 class RenderWidgetHost; |
| 63 class RenderWidgetHostImpl; | 63 class RenderWidgetHostImpl; |
| 64 class SynchronousCompositorHost; | 64 class SynchronousCompositorHost; |
| 65 class SynchronousCompositorClient; |
| 65 struct NativeWebKeyboardEvent; | 66 struct NativeWebKeyboardEvent; |
| 66 struct TextInputState; | 67 struct TextInputState; |
| 67 | 68 |
| 68 // ----------------------------------------------------------------------------- | 69 // ----------------------------------------------------------------------------- |
| 69 // See comments in render_widget_host_view.h about this class and its members. | 70 // See comments in render_widget_host_view.h about this class and its members. |
| 70 // ----------------------------------------------------------------------------- | 71 // ----------------------------------------------------------------------------- |
| 71 class CONTENT_EXPORT RenderWidgetHostViewAndroid | 72 class CONTENT_EXPORT RenderWidgetHostViewAndroid |
| 72 : public RenderWidgetHostViewBase, | 73 : public RenderWidgetHostViewBase, |
| 73 public ui::GestureProviderClient, | 74 public ui::GestureProviderClient, |
| 74 public ui::WindowAndroidObserver, | 75 public ui::WindowAndroidObserver, |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 231 |
| 231 bool HasValidFrame() const; | 232 bool HasValidFrame() const; |
| 232 | 233 |
| 233 void MoveCaret(const gfx::Point& point); | 234 void MoveCaret(const gfx::Point& point); |
| 234 void DismissTextHandles(); | 235 void DismissTextHandles(); |
| 235 void SetTextHandlesTemporarilyHidden(bool hidden); | 236 void SetTextHandlesTemporarilyHidden(bool hidden); |
| 236 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); | 237 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); |
| 237 | 238 |
| 238 void SynchronousFrameMetadata(cc::CompositorFrameMetadata frame_metadata); | 239 void SynchronousFrameMetadata(cc::CompositorFrameMetadata frame_metadata); |
| 239 | 240 |
| 241 void SetSynchronousCompositorClient(SynchronousCompositorClient* client); |
| 242 |
| 243 SynchronousCompositorClient* synchronous_compositor_client() const { |
| 244 return synchronous_compositor_client_; |
| 245 } |
| 246 |
| 240 static void OnContextLost(); | 247 static void OnContextLost(); |
| 241 | 248 |
| 242 private: | 249 private: |
| 243 void RunAckCallbacks(); | 250 void RunAckCallbacks(); |
| 244 | 251 |
| 245 void CheckCompositorFrameSinkChanged(uint32_t compositor_frame_sink_id); | 252 void CheckCompositorFrameSinkChanged(uint32_t compositor_frame_sink_id); |
| 246 void SubmitCompositorFrame(cc::CompositorFrame frame_data); | 253 void SubmitCompositorFrame(cc::CompositorFrame frame_data); |
| 247 void SendReclaimCompositorResources(uint32_t compositor_frame_sink_id, | 254 void SendReclaimCompositorResources(uint32_t compositor_frame_sink_id, |
| 248 bool is_swap_ack); | 255 bool is_swap_ack); |
| 249 | 256 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 // Manages selection handle rendering and manipulation. | 351 // Manages selection handle rendering and manipulation. |
| 345 // This will always be NULL if |content_view_core_| is NULL. | 352 // This will always be NULL if |content_view_core_| is NULL. |
| 346 std::unique_ptr<ui::TouchSelectionController> selection_controller_; | 353 std::unique_ptr<ui::TouchSelectionController> selection_controller_; |
| 347 | 354 |
| 348 // Bounds to use if we have no backing ContentViewCore | 355 // Bounds to use if we have no backing ContentViewCore |
| 349 gfx::Rect default_bounds_; | 356 gfx::Rect default_bounds_; |
| 350 | 357 |
| 351 const bool using_browser_compositor_; | 358 const bool using_browser_compositor_; |
| 352 std::unique_ptr<SynchronousCompositorHost> sync_compositor_; | 359 std::unique_ptr<SynchronousCompositorHost> sync_compositor_; |
| 353 | 360 |
| 361 SynchronousCompositorClient* synchronous_compositor_client_; |
| 362 |
| 354 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_; | 363 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_; |
| 355 | 364 |
| 356 size_t locks_on_frame_count_; | 365 size_t locks_on_frame_count_; |
| 357 bool observing_root_window_; | 366 bool observing_root_window_; |
| 358 | 367 |
| 359 struct LastFrameInfo { | 368 struct LastFrameInfo { |
| 360 LastFrameInfo(uint32_t compositor_frame_sink_id, | 369 LastFrameInfo(uint32_t compositor_frame_sink_id, |
| 361 cc::CompositorFrame output_frame); | 370 cc::CompositorFrame output_frame); |
| 362 ~LastFrameInfo(); | 371 ~LastFrameInfo(); |
| 363 uint32_t compositor_frame_sink_id; | 372 uint32_t compositor_frame_sink_id; |
| 364 cc::CompositorFrame frame; | 373 cc::CompositorFrame frame; |
| 365 }; | 374 }; |
| 366 | 375 |
| 367 std::unique_ptr<LastFrameInfo> last_frame_info_; | 376 std::unique_ptr<LastFrameInfo> last_frame_info_; |
| 368 | 377 |
| 369 // The last scroll offset of the view. | 378 // The last scroll offset of the view. |
| 370 gfx::Vector2dF last_scroll_offset_; | 379 gfx::Vector2dF last_scroll_offset_; |
| 371 | 380 |
| 372 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; | 381 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; |
| 373 | 382 |
| 374 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 383 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 375 }; | 384 }; |
| 376 | 385 |
| 377 } // namespace content | 386 } // namespace content |
| 378 | 387 |
| 379 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 388 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |