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

Unified Diff: extensions/browser/api/capture_web_contents_function.cc

Issue 672823002: Remove IsDIPEnabled from Screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dpi-cleanup-1
Patch Set: rebase Created 6 years, 2 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
Index: extensions/browser/api/capture_web_contents_function.cc
diff --git a/extensions/browser/api/capture_web_contents_function.cc b/extensions/browser/api/capture_web_contents_function.cc
index 9fbce6b56ecf459c51bb99b97fafd082ee0e9388..a888284deb42913e5327e45f940c5a2e4f8c6039 100644
--- a/extensions/browser/api/capture_web_contents_function.cc
+++ b/extensions/browser/api/capture_web_contents_function.cc
@@ -76,12 +76,10 @@ bool CaptureWebContentsFunction::RunAsync() {
gfx::Size bitmap_size = view_size;
const gfx::NativeView native_view = view->GetNativeView();
gfx::Screen* const screen = gfx::Screen::GetScreenFor(native_view);
- if (screen->IsDIPEnabled()) {
- const float scale =
- screen->GetDisplayNearestWindow(native_view).device_scale_factor();
- if (scale > 1.0f)
- bitmap_size = gfx::ToCeiledSize(gfx::ScaleSize(view_size, scale));
- }
+ const float scale =
+ screen->GetDisplayNearestWindow(native_view).device_scale_factor();
+ if (scale > 1.0f)
+ bitmap_size = gfx::ToCeiledSize(gfx::ScaleSize(view_size, scale));
host->CopyFromBackingStore(
gfx::Rect(view_size),
« no previous file with comments | « content/browser/media/capture/web_contents_video_capture_device_unittest.cc ('k') | mojo/aura/screen_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698