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

Side by Side Diff: ui/base/layout.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: GetNativeScreen Created 4 years, 11 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
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 "ui/base/layout.h" 5 #include "ui/base/layout.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } else { 108 } else {
109 delete g_supported_scale_factors; 109 delete g_supported_scale_factors;
110 g_supported_scale_factors = NULL; 110 g_supported_scale_factors = NULL;
111 } 111 }
112 } 112 }
113 113
114 } // namespace test 114 } // namespace test
115 115
116 #if !defined(OS_MACOSX) 116 #if !defined(OS_MACOSX)
117 float GetScaleFactorForNativeView(gfx::NativeView view) { 117 float GetScaleFactorForNativeView(gfx::NativeView view) {
118 gfx::Screen* screen = gfx::Screen::GetScreenFor(view); 118 gfx::Screen* screen = gfx::Screen::GetScreen();
119 gfx::Display display = screen->GetDisplayNearestWindow(view); 119 gfx::Display display = screen->GetDisplayNearestWindow(view);
oshima 2016/01/19 20:44:31 single line?
scottmg 2016/01/19 21:55:57 Done.
120 return display.device_scale_factor(); 120 return display.device_scale_factor();
121 } 121 }
122 #endif // !defined(OS_MACOSX) 122 #endif // !defined(OS_MACOSX)
123 123
124 } // namespace ui 124 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698