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

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

Issue 2688413007: Add display::GetDisplayNearestView (Closed)
Patch Set: test GetDisplayNearestView Created 3 years, 9 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 delete g_supported_scale_factors; 100 delete g_supported_scale_factors;
101 g_supported_scale_factors = NULL; 101 g_supported_scale_factors = NULL;
102 } 102 }
103 } 103 }
104 104
105 } // namespace test 105 } // namespace test
106 106
107 #if !defined(OS_MACOSX) 107 #if !defined(OS_MACOSX)
108 float GetScaleFactorForNativeView(gfx::NativeView view) { 108 float GetScaleFactorForNativeView(gfx::NativeView view) {
109 return display::Screen::GetScreen() 109 return display::Screen::GetScreen()
110 ->GetDisplayNearestWindow(view) 110 ->GetDisplayNearestView(view)
111 .device_scale_factor(); 111 .device_scale_factor();
112 } 112 }
113 #endif // !defined(OS_MACOSX) 113 #endif // !defined(OS_MACOSX)
114 114
115 } // namespace ui 115 } // namespace ui
OLDNEW
« no previous file with comments | « ui/android/view_android.cc ('k') | ui/display/BUILD.gn » ('j') | ui/display/win/screen_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698