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

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

Issue 16687002: Add additional properties to display system info on ChromeOS (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"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 unit->work_area.top = display.work_area().y(); 60 unit->work_area.top = display.work_area().y();
61 unit->work_area.width = display.work_area().width(); 61 unit->work_area.width = display.work_area().width();
62 unit->work_area.height = display.work_area().height(); 62 unit->work_area.height = display.work_area().height();
63 display_info->push_back(unit); 63 display_info->push_back(unit);
64 64
65 return TRUE; 65 return TRUE;
66 } 66 }
67 67
68 } // namespace 68 } // namespace
69 69
70 void DisplayInfoProvider::RequestInfo(const RequestInfoCallback& callback) {
71 // Redirect the request to a worker pool thread.
72 StartQueryInfo(callback);
73 }
74
70 bool DisplayInfoProvider::QueryInfo(DisplayInfo* info) { 75 bool DisplayInfoProvider::QueryInfo(DisplayInfo* info) {
71 DCHECK(info); 76 DCHECK(info);
72 info->clear(); 77 info->clear();
73 78
74 if (EnumDisplayMonitors(NULL, NULL, EnumMonitorCallback, 79 if (EnumDisplayMonitors(NULL, NULL, EnumMonitorCallback,
75 reinterpret_cast<LPARAM>(info))) 80 reinterpret_cast<LPARAM>(info)))
76 return true; 81 return true;
77 return false; 82 return false;
78 } 83 }
79 84
80 } // namespace extensions 85 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698