Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 1408123005: Android Webview IPC-based sync compositing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win compile Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class WebExternalTextureLayer; 50 class WebExternalTextureLayer;
51 class WebTouchEvent; 51 class WebTouchEvent;
52 class WebMouseEvent; 52 class WebMouseEvent;
53 } 53 }
54 54
55 namespace content { 55 namespace content {
56 class ContentViewCoreImpl; 56 class ContentViewCoreImpl;
57 class OverscrollControllerAndroid; 57 class OverscrollControllerAndroid;
58 class RenderWidgetHost; 58 class RenderWidgetHost;
59 class RenderWidgetHostImpl; 59 class RenderWidgetHostImpl;
60 class SynchronousCompositorImpl; 60 class SynchronousCompositorBase;
61 struct DidOverscrollParams; 61 struct DidOverscrollParams;
62 struct NativeWebKeyboardEvent; 62 struct NativeWebKeyboardEvent;
63 63
64 // ----------------------------------------------------------------------------- 64 // -----------------------------------------------------------------------------
65 // See comments in render_widget_host_view.h about this class and its members. 65 // See comments in render_widget_host_view.h about this class and its members.
66 // ----------------------------------------------------------------------------- 66 // -----------------------------------------------------------------------------
67 class CONTENT_EXPORT RenderWidgetHostViewAndroid 67 class CONTENT_EXPORT RenderWidgetHostViewAndroid
68 : public RenderWidgetHostViewBase, 68 : public RenderWidgetHostViewBase,
69 public cc::DelegatedFrameResourceCollectionClient, 69 public cc::DelegatedFrameResourceCollectionClient,
70 public cc::SurfaceFactoryClient, 70 public cc::SurfaceFactoryClient,
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 scoped_refptr<cc::Layer> CreateDelegatedLayer() const; 237 scoped_refptr<cc::Layer> CreateDelegatedLayer() const;
238 238
239 bool HasValidFrame() const; 239 bool HasValidFrame() const;
240 240
241 void MoveCaret(const gfx::Point& point); 241 void MoveCaret(const gfx::Point& point);
242 void DismissTextHandles(); 242 void DismissTextHandles();
243 void SetTextHandlesTemporarilyHidden(bool hidden); 243 void SetTextHandlesTemporarilyHidden(bool hidden);
244 void OnShowingPastePopup(const gfx::PointF& point); 244 void OnShowingPastePopup(const gfx::PointF& point);
245 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); 245 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip);
246 246
247 SynchronousCompositorImpl* GetSynchronousCompositorImpl(); 247 SynchronousCompositorBase* GetSynchronousCompositor();
248 void SynchronousFrameMetadata( 248 void SynchronousFrameMetadata(
249 const cc::CompositorFrameMetadata& frame_metadata); 249 const 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);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 BEGIN_FRAME = 1 << 1, 320 BEGIN_FRAME = 1 << 1,
321 PERSISTENT_BEGIN_FRAME = 1 << 2 321 PERSISTENT_BEGIN_FRAME = 1 << 2
322 }; 322 };
323 void RequestVSyncUpdate(uint32 requests); 323 void RequestVSyncUpdate(uint32 requests);
324 void StartObservingRootWindow(); 324 void StartObservingRootWindow();
325 void StopObservingRootWindow(); 325 void StopObservingRootWindow();
326 void SendBeginFrame(base::TimeTicks frame_time, base::TimeDelta vsync_period); 326 void SendBeginFrame(base::TimeTicks frame_time, base::TimeDelta vsync_period);
327 bool Animate(base::TimeTicks frame_time); 327 bool Animate(base::TimeTicks frame_time);
328 void RequestDisallowInterceptTouchEvent(); 328 void RequestDisallowInterceptTouchEvent();
329 329
330 bool SyncCompositorOnMessageReceived(const IPC::Message& message);
331
330 // The model object. 332 // The model object.
331 RenderWidgetHostImpl* host_; 333 RenderWidgetHostImpl* host_;
332 334
333 bool use_surfaces_; 335 bool use_surfaces_;
334 336
335 // Used to control action dispatch at the next |OnVSync()| call. 337 // Used to control action dispatch at the next |OnVSync()| call.
336 uint32 outstanding_vsync_requests_; 338 uint32 outstanding_vsync_requests_;
337 339
338 bool is_showing_; 340 bool is_showing_;
339 341
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 StylusTextSelector stylus_text_selector_; 390 StylusTextSelector stylus_text_selector_;
389 391
390 // Manages selection handle rendering and manipulation. 392 // Manages selection handle rendering and manipulation.
391 // This will always be NULL if |content_view_core_| is NULL. 393 // This will always be NULL if |content_view_core_| is NULL.
392 scoped_ptr<ui::TouchSelectionController> selection_controller_; 394 scoped_ptr<ui::TouchSelectionController> selection_controller_;
393 395
394 // Size to use if we have no backing ContentViewCore 396 // Size to use if we have no backing ContentViewCore
395 gfx::Size default_size_; 397 gfx::Size default_size_;
396 398
397 const bool using_browser_compositor_; 399 const bool using_browser_compositor_;
398 scoped_ptr<SynchronousCompositorImpl> sync_compositor_; 400 scoped_ptr<SynchronousCompositorBase> sync_compositor_;
399 401
400 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; 402 scoped_ptr<DelegatedFrameEvictor> frame_evictor_;
401 403
402 size_t locks_on_frame_count_; 404 size_t locks_on_frame_count_;
403 bool observing_root_window_; 405 bool observing_root_window_;
404 406
405 struct LastFrameInfo { 407 struct LastFrameInfo {
406 LastFrameInfo(uint32 output_id, 408 LastFrameInfo(uint32 output_id,
407 scoped_ptr<cc::CompositorFrame> output_frame); 409 scoped_ptr<cc::CompositorFrame> output_frame);
408 ~LastFrameInfo(); 410 ~LastFrameInfo();
409 uint32 output_surface_id; 411 uint32 output_surface_id;
410 scoped_ptr<cc::CompositorFrame> frame; 412 scoped_ptr<cc::CompositorFrame> frame;
411 }; 413 };
412 414
413 scoped_ptr<LastFrameInfo> last_frame_info_; 415 scoped_ptr<LastFrameInfo> last_frame_info_;
414 416
415 TextSurroundingSelectionCallback text_surrounding_selection_callback_; 417 TextSurroundingSelectionCallback text_surrounding_selection_callback_;
416 418
417 // The last scroll offset of the view. 419 // The last scroll offset of the view.
418 gfx::Vector2dF last_scroll_offset_; 420 gfx::Vector2dF last_scroll_offset_;
419 421
420 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 422 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
421 423
422 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 424 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
423 }; 425 };
424 426
425 } // namespace content 427 } // namespace content
426 428
427 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 429 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698