| 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 set_synchronous_compositor_client(SynchronousCompositorClient* client) { |
| 242 synchronous_compositor_client_ = client; |
| 243 } |
| 244 |
| 245 SynchronousCompositorClient* synchronous_compositor_client() const { |
| 246 return synchronous_compositor_client_; |
| 247 } |
| 248 |
| 240 static void OnContextLost(); | 249 static void OnContextLost(); |
| 241 | 250 |
| 242 private: | 251 private: |
| 243 void RunAckCallbacks(); | 252 void RunAckCallbacks(); |
| 244 | 253 |
| 245 void CheckCompositorFrameSinkChanged(uint32_t compositor_frame_sink_id); | 254 void CheckCompositorFrameSinkChanged(uint32_t compositor_frame_sink_id); |
| 246 void SubmitCompositorFrame(cc::CompositorFrame frame_data); | 255 void SubmitCompositorFrame(cc::CompositorFrame frame_data); |
| 247 void SendReclaimCompositorResources(uint32_t compositor_frame_sink_id, | 256 void SendReclaimCompositorResources(uint32_t compositor_frame_sink_id, |
| 248 bool is_swap_ack); | 257 bool is_swap_ack); |
| 249 | 258 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 // Manages selection handle rendering and manipulation. | 353 // Manages selection handle rendering and manipulation. |
| 345 // This will always be NULL if |content_view_core_| is NULL. | 354 // This will always be NULL if |content_view_core_| is NULL. |
| 346 std::unique_ptr<ui::TouchSelectionController> selection_controller_; | 355 std::unique_ptr<ui::TouchSelectionController> selection_controller_; |
| 347 | 356 |
| 348 // Bounds to use if we have no backing ContentViewCore | 357 // Bounds to use if we have no backing ContentViewCore |
| 349 gfx::Rect default_bounds_; | 358 gfx::Rect default_bounds_; |
| 350 | 359 |
| 351 const bool using_browser_compositor_; | 360 const bool using_browser_compositor_; |
| 352 std::unique_ptr<SynchronousCompositorHost> sync_compositor_; | 361 std::unique_ptr<SynchronousCompositorHost> sync_compositor_; |
| 353 | 362 |
| 363 SynchronousCompositorClient* synchronous_compositor_client_; |
| 364 |
| 354 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_; | 365 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_; |
| 355 | 366 |
| 356 size_t locks_on_frame_count_; | 367 size_t locks_on_frame_count_; |
| 357 bool observing_root_window_; | 368 bool observing_root_window_; |
| 358 | 369 |
| 359 struct LastFrameInfo { | 370 struct LastFrameInfo { |
| 360 LastFrameInfo(uint32_t compositor_frame_sink_id, | 371 LastFrameInfo(uint32_t compositor_frame_sink_id, |
| 361 cc::CompositorFrame output_frame); | 372 cc::CompositorFrame output_frame); |
| 362 ~LastFrameInfo(); | 373 ~LastFrameInfo(); |
| 363 uint32_t compositor_frame_sink_id; | 374 uint32_t compositor_frame_sink_id; |
| 364 cc::CompositorFrame frame; | 375 cc::CompositorFrame frame; |
| 365 }; | 376 }; |
| 366 | 377 |
| 367 std::unique_ptr<LastFrameInfo> last_frame_info_; | 378 std::unique_ptr<LastFrameInfo> last_frame_info_; |
| 368 | 379 |
| 369 // The last scroll offset of the view. | 380 // The last scroll offset of the view. |
| 370 gfx::Vector2dF last_scroll_offset_; | 381 gfx::Vector2dF last_scroll_offset_; |
| 371 | 382 |
| 372 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; | 383 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; |
| 373 | 384 |
| 374 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 385 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 375 }; | 386 }; |
| 376 | 387 |
| 377 } // namespace content | 388 } // namespace content |
| 378 | 389 |
| 379 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 390 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |