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

Side by Side Diff: ui/gfx/win/dpi.cc

Issue 823703003: Cleanup: Update the path to insets and point headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: point.h Created 5 years, 12 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
« no previous file with comments | « ui/gfx/win/dpi.h ('k') | ui/gfx/win/hwnd_util.cc » ('j') | 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 "ui/gfx/win/dpi.h" 5 #include "ui/gfx/win/dpi.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include "base/win/scoped_hdc.h" 8 #include "base/win/scoped_hdc.h"
9 #include "ui/gfx/display.h" 9 #include "ui/gfx/display.h"
10 #include "ui/gfx/point_conversions.h" 10 #include "ui/gfx/geometry/point_conversions.h"
11 #include "ui/gfx/rect_conversions.h" 11 #include "ui/gfx/rect_conversions.h"
12 #include "ui/gfx/size_conversions.h" 12 #include "ui/gfx/size_conversions.h"
13 13
14 namespace { 14 namespace {
15 15
16 int kDefaultDPIX = 96; 16 int kDefaultDPIX = 96;
17 int kDefaultDPIY = 96; 17 int kDefaultDPIY = 96;
18 18
19 bool force_highdpi_for_testing = false; 19 bool force_highdpi_for_testing = false;
20 20
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // Always ceil sizes. Otherwise we may be leaving off part of the bounds. 102 // Always ceil sizes. Otherwise we may be leaving off part of the bounds.
103 return ToCeiledSize(ScaleSize(dip_size, GetDPIScale())); 103 return ToCeiledSize(ScaleSize(dip_size, GetDPIScale()));
104 } 104 }
105 105
106 int GetSystemMetricsInDIP(int metric) { 106 int GetSystemMetricsInDIP(int metric) {
107 return static_cast<int>(GetSystemMetrics(metric) / GetDPIScale() + 0.5); 107 return static_cast<int>(GetSystemMetrics(metric) / GetDPIScale() + 0.5);
108 } 108 }
109 109
110 } // namespace win 110 } // namespace win
111 } // namespace gfx 111 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/win/dpi.h ('k') | ui/gfx/win/hwnd_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698