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

Unified Diff: content/renderer/render_view_impl.cc

Issue 914183002: Remove window.chrome.gpuBenchmarking.beginWindowSnapshotPNG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | ui/events/latency_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 82533ea737defcdea5e18ec676c7a5c0cc776127..d0c9ec6fb8607ea98754496a411af786a8a2c025 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -660,7 +660,6 @@ RenderViewImpl::RenderViewImpl(const ViewMsg_New_Params& params)
#endif
enumeration_completion_id_(0),
session_storage_namespace_id_(params.session_storage_namespace_id),
- next_snapshot_id_(0),
page_scale_factor_is_one_(true),
debug_info_(params.debug_info) {
}
@@ -1341,8 +1340,6 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode)
IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap,
OnReleaseDisambiguationPopupBitmap)
- IPC_MESSAGE_HANDLER(ViewMsg_WindowSnapshotCompleted,
- OnWindowSnapshotCompleted)
IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw)
IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret)
#if defined(OS_ANDROID)
@@ -1502,21 +1499,6 @@ bool RenderViewImpl::SendAndRunNestedMessageLoop(IPC::SyncMessage* message) {
return Send(message);
}
-void RenderViewImpl::GetWindowSnapshot(const WindowSnapshotCallback& callback) {
- int id = next_snapshot_id_++;
- pending_snapshots_.insert(std::make_pair(id, callback));
- ui::LatencyInfo latency_info;
- latency_info.AddLatencyNumber(ui::WINDOW_OLD_SNAPSHOT_FRAME_NUMBER_COMPONENT,
- 0,
- id);
- scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
- if (RenderWidgetCompositor* rwc = compositor()) {
- latency_info_swap_promise_monitor =
- rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info).Pass();
- }
- ScheduleCompositeWithForcedRedraw();
-}
-
void RenderViewImpl::OnForceRedraw(int id) {
ui::LatencyInfo latency_info;
if (id) {
@@ -1532,22 +1514,6 @@ void RenderViewImpl::OnForceRedraw(int id) {
ScheduleCompositeWithForcedRedraw();
}
-void RenderViewImpl::OnWindowSnapshotCompleted(const int snapshot_id,
- const gfx::Size& size, const std::vector<unsigned char>& png) {
-
- // Any pending snapshots with a lower ID than the one received are considered
- // to be implicitly complete, and returned the same snapshot data.
- PendingSnapshotMap::iterator it = pending_snapshots_.begin();
- while(it != pending_snapshots_.end()) {
- if (it->first <= snapshot_id) {
- it->second.Run(size, png);
- pending_snapshots_.erase(it++);
- } else {
- ++it;
- }
- }
-}
-
// blink::WebViewClient ------------------------------------------------------
WebView* RenderViewImpl::createView(WebLocalFrame* creator,
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | ui/events/latency_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698