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

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

Issue 15666007: Use correct device scale factors in Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix botched resolve Created 7 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 unified diff | Download patch | Annotate | Revision Log
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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 1340
1341 void RenderWidgetHostImpl::GetSnapshotFromRenderer( 1341 void RenderWidgetHostImpl::GetSnapshotFromRenderer(
1342 const gfx::Rect& src_subrect, 1342 const gfx::Rect& src_subrect,
1343 const base::Callback<void(bool, const SkBitmap&)>& callback) { 1343 const base::Callback<void(bool, const SkBitmap&)>& callback) {
1344 TRACE_EVENT0("browser", "RenderWidgetHostImpl::GetSnapshotFromRenderer"); 1344 TRACE_EVENT0("browser", "RenderWidgetHostImpl::GetSnapshotFromRenderer");
1345 pending_snapshots_.push(callback); 1345 pending_snapshots_.push(callback);
1346 1346
1347 gfx::Rect copy_rect = src_subrect.IsEmpty() ? 1347 gfx::Rect copy_rect = src_subrect.IsEmpty() ?
1348 gfx::Rect(view_->GetViewBounds().size()) : src_subrect; 1348 gfx::Rect(view_->GetViewBounds().size()) : src_subrect;
1349 1349
1350 gfx::Rect copy_rect_in_pixel = ConvertRectToPixel(view_, copy_rect); 1350 gfx::Rect copy_rect_in_pixel = ConvertViewRectToPixel(view_, copy_rect);
1351 Send(new ViewMsg_Snapshot(GetRoutingID(), copy_rect_in_pixel)); 1351 Send(new ViewMsg_Snapshot(GetRoutingID(), copy_rect_in_pixel));
1352 } 1352 }
1353 1353
1354 void RenderWidgetHostImpl::OnSnapshot(bool success, 1354 void RenderWidgetHostImpl::OnSnapshot(bool success,
1355 const SkBitmap& bitmap) { 1355 const SkBitmap& bitmap) {
1356 if (pending_snapshots_.size() == 0) { 1356 if (pending_snapshots_.size() == 0) {
1357 LOG(ERROR) << "RenderWidgetHostImpl::OnSnapshot: " 1357 LOG(ERROR) << "RenderWidgetHostImpl::OnSnapshot: "
1358 "Received a snapshot that was not requested."; 1358 "Received a snapshot that was not requested.";
1359 return; 1359 return;
1360 } 1360 }
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 } 2482 }
2483 2483
2484 void RenderWidgetHostImpl::DetachDelegate() { 2484 void RenderWidgetHostImpl::DetachDelegate() {
2485 delegate_ = NULL; 2485 delegate_ = NULL;
2486 } 2486 }
2487 2487
2488 void RenderWidgetHostImpl::FrameSwapped(const cc::LatencyInfo& latency_info) { 2488 void RenderWidgetHostImpl::FrameSwapped(const cc::LatencyInfo& latency_info) {
2489 } 2489 }
2490 2490
2491 } // namespace content 2491 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/dip_util.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698