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

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

Issue 2780713004: Hide compositor_frame_sink_id from RenderWidgetHostView* (Closed)
Patch Set: Added a comment in android Created 3 years, 8 months 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 InputEventAckState ack_result) override; 123 InputEventAckState ack_result) override;
124 InputEventAckState FilterInputEvent( 124 InputEventAckState FilterInputEvent(
125 const blink::WebInputEvent& input_event) override; 125 const blink::WebInputEvent& input_event) override;
126 void OnSetNeedsFlushInput() override; 126 void OnSetNeedsFlushInput() override;
127 void GestureEventAck(const blink::WebGestureEvent& event, 127 void GestureEventAck(const blink::WebGestureEvent& event,
128 InputEventAckState ack_result) override; 128 InputEventAckState ack_result) override;
129 BrowserAccessibilityManager* CreateBrowserAccessibilityManager( 129 BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
130 BrowserAccessibilityDelegate* delegate, bool for_root_frame) override; 130 BrowserAccessibilityDelegate* delegate, bool for_root_frame) override;
131 bool LockMouse() override; 131 bool LockMouse() override;
132 void UnlockMouse() override; 132 void UnlockMouse() override;
133 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id, 133 void DidCreateNewRendererCompositorFrameSink() override;
134 const cc::LocalSurfaceId& local_surface_id, 134 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id,
135 cc::CompositorFrame frame) override; 135 cc::CompositorFrame frame) override;
136 void ClearCompositorFrame() override; 136 void ClearCompositorFrame() override;
137 void SetIsInVR(bool is_in_vr) override; 137 void SetIsInVR(bool is_in_vr) override;
138 bool IsInVR() const override; 138 bool IsInVR() const override;
139 void DidOverscroll(const ui::DidOverscrollParams& params) override; 139 void DidOverscroll(const ui::DidOverscrollParams& params) override;
140 void DidStopFlinging() override; 140 void DidStopFlinging() override;
141 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, 141 void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
142 const SkBitmap& zoomed_bitmap) override; 142 const SkBitmap& zoomed_bitmap) override;
143 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget() 143 std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget()
144 override; 144 override;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 RenderWidgetHostViewBase* updated_view) override; 269 RenderWidgetHostViewBase* updated_view) override;
270 270
271 ImeAdapterAndroid* ime_adapter_for_testing() { return ime_adapter_android_; } 271 ImeAdapterAndroid* ime_adapter_for_testing() { return ime_adapter_android_; }
272 272
273 // Exposed for tests. 273 // Exposed for tests.
274 cc::SurfaceId SurfaceIdForTesting() const override; 274 cc::SurfaceId SurfaceIdForTesting() const override;
275 275
276 private: 276 private:
277 void RunAckCallbacks(); 277 void RunAckCallbacks();
278 278
279 void CheckCompositorFrameSinkChanged(uint32_t compositor_frame_sink_id); 279 void SendReclaimCompositorResources(bool is_swap_ack);
280 void SubmitCompositorFrame(cc::CompositorFrame frame_data);
281 void SendReclaimCompositorResources(uint32_t compositor_frame_sink_id,
282 bool is_swap_ack);
283 280
284 void OnFrameMetadataUpdated(const cc::CompositorFrameMetadata& frame_metadata, 281 void OnFrameMetadataUpdated(const cc::CompositorFrameMetadata& frame_metadata,
285 bool is_transparent); 282 bool is_transparent);
286 283
287 void ShowInternal(); 284 void ShowInternal();
288 void HideInternal(); 285 void HideInternal();
289 void AttachLayers(); 286 void AttachLayers();
290 void RemoveLayers(); 287 void RemoveLayers();
291 288
292 void UpdateBackgroundColor(SkColor color); 289 void UpdateBackgroundColor(SkColor color);
293 290
294 // DevTools ScreenCast support for Android WebView. 291 // DevTools ScreenCast support for Android WebView.
295 void SynchronousCopyContents(const gfx::Rect& src_subrect_in_pixel, 292 void SynchronousCopyContents(const gfx::Rect& src_subrect_in_pixel,
296 const gfx::Size& dst_size_in_pixel, 293 const gfx::Size& dst_size_in_pixel,
297 const ReadbackRequestCallback& callback, 294 const ReadbackRequestCallback& callback,
298 const SkColorType color_type); 295 const SkColorType color_type);
299 296
300 // Drop any incoming frames from the renderer when there are locks on the
301 // current frame.
302 void RetainFrame(uint32_t compositor_frame_sink_id,
303 cc::CompositorFrame frame);
304
305 void InternalSwapCompositorFrame(uint32_t compositor_frame_sink_id,
306 const cc::LocalSurfaceId& local_surface_id,
307 cc::CompositorFrame frame);
308 void DestroyDelegatedContent(); 297 void DestroyDelegatedContent();
309 void OnLostResources(); 298 void OnLostResources();
310 299
311 enum BeginFrameRequestType { 300 enum BeginFrameRequestType {
312 FLUSH_INPUT = 1 << 0, 301 FLUSH_INPUT = 1 << 0,
313 BEGIN_FRAME = 1 << 1, 302 BEGIN_FRAME = 1 << 1,
314 PERSISTENT_BEGIN_FRAME = 1 << 2 303 PERSISTENT_BEGIN_FRAME = 1 << 2
315 }; 304 };
316 void AddBeginFrameRequest(BeginFrameRequestType request); 305 void AddBeginFrameRequest(BeginFrameRequestType request);
317 void ClearBeginFrameRequest(BeginFrameRequestType request); 306 void ClearBeginFrameRequest(BeginFrameRequestType request);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 mutable ui::ViewAndroid view_; 348 mutable ui::ViewAndroid view_;
360 349
361 // Manages the Compositor Frames received from the renderer. 350 // Manages the Compositor Frames received from the renderer.
362 std::unique_ptr<ui::DelegatedFrameHostAndroid> delegated_frame_host_; 351 std::unique_ptr<ui::DelegatedFrameHostAndroid> delegated_frame_host_;
363 352
364 cc::ReturnedResourceArray surface_returned_resources_; 353 cc::ReturnedResourceArray surface_returned_resources_;
365 354
366 // The most recent surface size that was pushed to the surface layer. 355 // The most recent surface size that was pushed to the surface layer.
367 gfx::Size current_surface_size_; 356 gfx::Size current_surface_size_;
368 357
369 // The output surface id of the last received frame.
370 uint32_t last_compositor_frame_sink_id_;
371
372 std::queue<base::Closure> ack_callbacks_; 358 std::queue<base::Closure> ack_callbacks_;
373 359
374 // Used to control and render overscroll-related effects. 360 // Used to control and render overscroll-related effects.
375 std::unique_ptr<OverscrollControllerAndroid> overscroll_controller_; 361 std::unique_ptr<OverscrollControllerAndroid> overscroll_controller_;
376 362
377 // Provides gesture synthesis given a stream of touch events (derived from 363 // Provides gesture synthesis given a stream of touch events (derived from
378 // Android MotionEvent's) and touch event acks. 364 // Android MotionEvent's) and touch event acks.
379 ui::FilteredGestureProvider gesture_provider_; 365 ui::FilteredGestureProvider gesture_provider_;
380 366
381 // Handles gesture based text selection 367 // Handles gesture based text selection
(...skipping 22 matching lines...) Expand all
404 float prev_bottom_shown_pix_; 390 float prev_bottom_shown_pix_;
405 391
406 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 392 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
407 393
408 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 394 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
409 }; 395 };
410 396
411 } // namespace content 397 } // namespace content
412 398
413 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 399 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698