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

Unified Diff: content/renderer/render_view_impl.cc

Issue 190693002: Migrate Telemetry from beginWindowSnapshotPNG to Page.captureScreenshot (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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') | content/test/data/gpu/screenshot_sync.html » ('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 d4763be51c01314ed425988ba1a547eb500ae084..429b215c0093eea992602340dec07c69e10ca2ef 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -670,8 +670,7 @@ RenderViewImpl::RenderViewImpl(RenderViewImplParams* params)
pepper_last_mouse_event_target_(NULL),
#endif
enumeration_completion_id_(0),
- session_storage_namespace_id_(params->session_storage_namespace_id),
- next_snapshot_id_(0) {
+ session_storage_namespace_id_(params->session_storage_namespace_id) {
}
void RenderViewImpl::Initialize(RenderViewImplParams* params) {
@@ -1124,8 +1123,7 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewMsg_DisownOpener, OnDisownOpener)
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)
IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult,
@@ -1342,9 +1340,7 @@ 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));
+void RenderViewImpl::OnForceRedraw(int id) {
ui::LatencyInfo latency_info;
latency_info.AddLatencyNumber(ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
0,
@@ -1357,22 +1353,6 @@ void RenderViewImpl::GetWindowSnapshot(const WindowSnapshotCallback& callback) {
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') | content/test/data/gpu/screenshot_sync.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698