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

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

Issue 2780713004: Hide compositor_frame_sink_id from RenderWidgetHostView* (Closed)
Patch Set: Fixed typo 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_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 448
449 // Requests the renderer to move the caret selection towards the point. 449 // Requests the renderer to move the caret selection towards the point.
450 void MoveCaret(const gfx::Point& point); 450 void MoveCaret(const gfx::Point& point);
451 451
452 // Called when the reponse to a pending mouse lock request has arrived. 452 // Called when the reponse to a pending mouse lock request has arrived.
453 // Returns true if |allowed| is true and the mouse has been successfully 453 // Returns true if |allowed| is true and the mouse has been successfully
454 // locked. 454 // locked.
455 bool GotResponseToLockMouseRequest(bool allowed); 455 bool GotResponseToLockMouseRequest(bool allowed);
456 456
457 // Called by the view in response to OnSwapCompositorFrame. 457 // Called by the view in response to OnSwapCompositorFrame.
458 static void SendReclaimCompositorResources( 458 void SendReclaimCompositorResources(
459 int32_t route_id,
460 uint32_t compositor_frame_sink_id,
461 int renderer_host_id,
462 bool is_swap_ack, 459 bool is_swap_ack,
463 const cc::ReturnedResourceArray& resources); 460 const cc::ReturnedResourceArray& resources);
464 461
465 void set_allow_privileged_mouse_lock(bool allow) { 462 void set_allow_privileged_mouse_lock(bool allow) {
466 allow_privileged_mouse_lock_ = allow; 463 allow_privileged_mouse_lock_ = allow;
467 } 464 }
468 465
469 // Resets state variables related to tracking pending size and painting. 466 // Resets state variables related to tracking pending size and painting.
470 // 467 //
471 // We need to reset these flags when we want to repaint the contents of 468 // We need to reset these flags when we want to repaint the contents of
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 706
710 void WindowSnapshotReachedScreen(int snapshot_id); 707 void WindowSnapshotReachedScreen(int snapshot_id);
711 708
712 void OnSnapshotFromSurfaceReceived(int snapshot_id, 709 void OnSnapshotFromSurfaceReceived(int snapshot_id,
713 int retry_count, 710 int retry_count,
714 const SkBitmap& bitmap, 711 const SkBitmap& bitmap,
715 ReadbackResponse response); 712 ReadbackResponse response);
716 713
717 void OnSnapshotReceived(int snapshot_id, const gfx::Image& image); 714 void OnSnapshotReceived(int snapshot_id, const gfx::Image& image);
718 715
716 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id,
717 cc::CompositorFrame frame);
718
719 // 1. Grants permissions to URL (if any) 719 // 1. Grants permissions to URL (if any)
720 // 2. Grants permissions to filenames 720 // 2. Grants permissions to filenames
721 // 3. Grants permissions to file system files. 721 // 3. Grants permissions to file system files.
722 // 4. Register the files with the IsolatedContext. 722 // 4. Register the files with the IsolatedContext.
723 void GrantFileAccessFromDropData(DropData* drop_data); 723 void GrantFileAccessFromDropData(DropData* drop_data);
724 724
725 // Starts a hang monitor timeout. If there's already a hang monitor timeout 725 // Starts a hang monitor timeout. If there's already a hang monitor timeout
726 // the new one will only fire if it has a shorter delay than the time 726 // the new one will only fire if it has a shorter delay than the time
727 // left on the existing timeouts. 727 // left on the existing timeouts.
728 void StartHangMonitorTimeout(base::TimeDelta delay, 728 void StartHangMonitorTimeout(base::TimeDelta delay,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 // compared against current_content_source_id_ to determine whether the 922 // compared against current_content_source_id_ to determine whether the
923 // received frame belongs to the current page. If a frame for the current page 923 // received frame belongs to the current page. If a frame for the current page
924 // does not arrive in time after nagivation, we clear the graphics of the old 924 // does not arrive in time after nagivation, we clear the graphics of the old
925 // page. See RenderWidget::current_content_source_id_ for more information. 925 // page. See RenderWidget::current_content_source_id_ for more information.
926 uint32_t last_received_content_source_id_ = 0; 926 uint32_t last_received_content_source_id_ = 0;
927 927
928 #if defined(OS_MACOSX) 928 #if defined(OS_MACOSX)
929 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; 929 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
930 #endif 930 #endif
931 931
932 // These information are used to verify that the renderer does not misbehave
933 // when it comes to allocating LocalSurfaceIds. If frame size or device scale
934 // factor change, a new LocalSurfaceId must be created.
932 cc::LocalSurfaceId last_local_surface_id_; 935 cc::LocalSurfaceId last_local_surface_id_;
933 gfx::Size last_frame_size_; 936 gfx::Size last_frame_size_;
934 float last_device_scale_factor_; 937 float last_device_scale_factor_;
935 938
939 // Each instance of RendererCompositorFrameSink has an ID that we keep track
940 // of so we can tell when a new instance has been created for the purpose of
941 // not returning stale resources.
942 uint32_t last_compositor_frame_sink_id_ = 0;
943
936 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 944 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
937 945
938 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 946 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
939 }; 947 };
940 948
941 } // namespace content 949 } // namespace content
942 950
943 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 951 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698