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

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

Issue 16817006: Add ability to change display settings to chrome.systemInfo.display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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
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 "chrome/browser/extensions/api/system_info_display/display_info_provide r.h" 5 #include "chrome/browser/extensions/api/system_info_display/display_info_provide r.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/base/win/dpi.h" 10 #include "ui/base/win/dpi.h"
11 #include "ui/gfx/display.h" 11 #include "ui/gfx/display.h"
12 #include "ui/gfx/size.h" 12 #include "ui/gfx/size.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 using api::system_info_display::Bounds; 16 using api::system_info_display::Bounds;
17 using api::system_info_display::DisplayUnitInfo; 17 using api::system_info_display::DisplayUnitInfo;
18 18
19 namespace { 19 namespace {
20 20
21 void DisplayInfoProvider::SetInfo(
22 const std::string& display_id,
23 const api::system_info_display::SetDisplayUnitInfoParams& info,
24 const SetInfoCallback& callback) {
25 base::MessageLoopProxy::current()->PostTask(
26 FROM_HERE,
27 base::Bind(callback, false, "Not implemented"));
28 }
29
21 BOOL CALLBACK EnumMonitorCallback(HMONITOR monitor, 30 BOOL CALLBACK EnumMonitorCallback(HMONITOR monitor,
22 HDC hdc, 31 HDC hdc,
23 LPRECT rect, 32 LPRECT rect,
24 LPARAM data) { 33 LPARAM data) {
25 DisplayInfo* display_info = 34 DisplayInfo* display_info =
26 reinterpret_cast<DisplayInfo*>(data); 35 reinterpret_cast<DisplayInfo*>(data);
27 DCHECK(display_info); 36 DCHECK(display_info);
28 37
29 linked_ptr<DisplayUnitInfo> unit(new DisplayUnitInfo); 38 linked_ptr<DisplayUnitInfo> unit(new DisplayUnitInfo);
30 39
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 DCHECK(info); 85 DCHECK(info);
77 info->clear(); 86 info->clear();
78 87
79 if (EnumDisplayMonitors(NULL, NULL, EnumMonitorCallback, 88 if (EnumDisplayMonitors(NULL, NULL, EnumMonitorCallback,
80 reinterpret_cast<LPARAM>(info))) 89 reinterpret_cast<LPARAM>(info)))
81 return true; 90 return true;
82 return false; 91 return false;
83 } 92 }
84 93
85 } // namespace extensions 94 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698