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

Side by Side Diff: chrome/browser/extensions/display_info_provider_win.cc

Issue 659883002: Enable hidpi on Linux, refactor a bit on Windows to share Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/extensions/display_info_provider_win.h" 5 #include "chrome/browser/extensions/display_info_provider_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/hash.h" 9 #include "base/hash.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "base/win/win_util.h" 12 #include "base/win/win_util.h"
13 #include "extensions/common/api/system_display.h" 13 #include "extensions/common/api/system_display.h"
14 #include "ui/gfx/dpi.h"
14 #include "ui/gfx/screen.h" 15 #include "ui/gfx/screen.h"
15 #include "ui/gfx/size.h" 16 #include "ui/gfx/size.h"
16 #include "ui/gfx/win/dpi.h"
17 17
18 namespace extensions { 18 namespace extensions {
19 19
20 using core_api::system_display::DisplayUnitInfo; 20 using core_api::system_display::DisplayUnitInfo;
21 21
22 namespace { 22 namespace {
23 23
24 BOOL CALLBACK 24 BOOL CALLBACK
25 EnumMonitorCallback(HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM data) { 25 EnumMonitorCallback(HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM data) {
26 DisplayInfo* all_displays = reinterpret_cast<DisplayInfo*>(data); 26 DisplayInfo* all_displays = reinterpret_cast<DisplayInfo*>(data);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // TODO(scottmg): native screen is wrong http://crbug.com/133312 85 // TODO(scottmg): native screen is wrong http://crbug.com/133312
86 return gfx::Screen::GetNativeScreen(); 86 return gfx::Screen::GetNativeScreen();
87 } 87 }
88 88
89 // static 89 // static
90 DisplayInfoProvider* DisplayInfoProvider::Create() { 90 DisplayInfoProvider* DisplayInfoProvider::Create() {
91 return new DisplayInfoProviderWin(); 91 return new DisplayInfoProviderWin();
92 } 92 }
93 93
94 } // namespace extensions 94 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698