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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 441623004: [DevTools] Force page redraw when enabling screencast. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/common/view_messages.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor; 1626 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
1627 if (RenderWidgetCompositor* rwc = compositor()) { 1627 if (RenderWidgetCompositor* rwc = compositor()) {
1628 latency_info_swap_promise_monitor = 1628 latency_info_swap_promise_monitor =
1629 rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info).Pass(); 1629 rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info).Pass();
1630 } 1630 }
1631 ScheduleCompositeWithForcedRedraw(); 1631 ScheduleCompositeWithForcedRedraw();
1632 } 1632 }
1633 1633
1634 void RenderViewImpl::OnForceRedraw(int id) { 1634 void RenderViewImpl::OnForceRedraw(int id) {
1635 ui::LatencyInfo latency_info; 1635 ui::LatencyInfo latency_info;
1636 latency_info.AddLatencyNumber(ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT, 1636 if (id) {
1637 0, 1637 latency_info.AddLatencyNumber(ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
1638 id); 1638 0,
1639 id);
1640 }
1639 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor; 1641 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
1640 if (RenderWidgetCompositor* rwc = compositor()) { 1642 if (RenderWidgetCompositor* rwc = compositor()) {
1641 latency_info_swap_promise_monitor = 1643 latency_info_swap_promise_monitor =
1642 rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info).Pass(); 1644 rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info).Pass();
1643 } 1645 }
1644 ScheduleCompositeWithForcedRedraw(); 1646 ScheduleCompositeWithForcedRedraw();
1645 } 1647 }
1646 1648
1647 void RenderViewImpl::OnWindowSnapshotCompleted(const int snapshot_id, 1649 void RenderViewImpl::OnWindowSnapshotCompleted(const int snapshot_id,
1648 const gfx::Size& size, const std::vector<unsigned char>& png) { 1650 const gfx::Size& size, const std::vector<unsigned char>& png) {
(...skipping 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after
4290 std::vector<gfx::Size> sizes; 4292 std::vector<gfx::Size> sizes;
4291 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4293 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4292 if (!url.isEmpty()) 4294 if (!url.isEmpty())
4293 urls.push_back( 4295 urls.push_back(
4294 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4296 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4295 } 4297 }
4296 SendUpdateFaviconURL(urls); 4298 SendUpdateFaviconURL(urls);
4297 } 4299 }
4298 4300
4299 } // namespace content 4301 } // namespace content
OLDNEW
« no previous file with comments | « content/common/view_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698