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

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

Issue 137353002: Remove GetMonitorInfoWrapper, which is no longer needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 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 | Annotate | Revision Log
« no previous file with comments | « base/win/win_util.cc ('k') | chrome/browser/fullscreen_win.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/api/system_display/display_info_provider.h" 5 #include "chrome/browser/extensions/api/system_display/display_info_provider.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"
(...skipping 13 matching lines...) Expand all
24 LPRECT rect, 24 LPRECT rect,
25 LPARAM data) { 25 LPARAM data) {
26 DisplayInfo* all_displays = reinterpret_cast<DisplayInfo*>(data); 26 DisplayInfo* all_displays = reinterpret_cast<DisplayInfo*>(data);
27 DCHECK(all_displays); 27 DCHECK(all_displays);
28 28
29 linked_ptr<DisplayUnitInfo> unit(new DisplayUnitInfo); 29 linked_ptr<DisplayUnitInfo> unit(new DisplayUnitInfo);
30 30
31 MONITORINFOEX monitor_info; 31 MONITORINFOEX monitor_info;
32 ZeroMemory(&monitor_info, sizeof(MONITORINFOEX)); 32 ZeroMemory(&monitor_info, sizeof(MONITORINFOEX));
33 monitor_info.cbSize = sizeof(monitor_info); 33 monitor_info.cbSize = sizeof(monitor_info);
34 base::win::GetMonitorInfoWrapper(monitor, &monitor_info); 34 GetMonitorInfo(monitor, &monitor_info);
35 35
36 DISPLAY_DEVICE device; 36 DISPLAY_DEVICE device;
37 device.cb = sizeof(device); 37 device.cb = sizeof(device);
38 if (!EnumDisplayDevices(monitor_info.szDevice, 0, &device, 0)) 38 if (!EnumDisplayDevices(monitor_info.szDevice, 0, &device, 0))
39 return FALSE; 39 return FALSE;
40 40
41 gfx::Size dpi(gfx::GetDPI()); 41 gfx::Size dpi(gfx::GetDPI());
42 unit->id = base::Int64ToString( 42 unit->id = base::Int64ToString(
43 base::Hash(base::WideToUTF8(monitor_info.szDevice))); 43 base::Hash(base::WideToUTF8(monitor_info.szDevice)));
44 unit->name = base::WideToUTF8(device.DeviceString); 44 unit->name = base::WideToUTF8(device.DeviceString);
(...skipping 23 matching lines...) Expand all
68 if (unit->id == all_displays[i]->id) { 68 if (unit->id == all_displays[i]->id) {
69 unit->name = all_displays[i]->name; 69 unit->name = all_displays[i]->name;
70 unit->dpi_x = all_displays[i]->dpi_x; 70 unit->dpi_x = all_displays[i]->dpi_x;
71 unit->dpi_y = all_displays[i]->dpi_y; 71 unit->dpi_y = all_displays[i]->dpi_y;
72 break; 72 break;
73 } 73 }
74 } 74 }
75 } 75 }
76 76
77 } // namespace extensions 77 } // namespace extensions
OLDNEW
« no previous file with comments | « base/win/win_util.cc ('k') | chrome/browser/fullscreen_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698