OLD | NEW |
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 return TRUE; | 65 return TRUE; |
66 } | 66 } |
67 | 67 |
68 } // namespace | 68 } // namespace |
69 | 69 |
70 void DisplayInfoProvider::RequestInfo(const RequestInfoCallback& callback) { | 70 void DisplayInfoProvider::RequestInfo(const RequestInfoCallback& callback) { |
71 // Redirect the request to a worker pool thread. | 71 // Redirect the request to a worker pool thread. |
72 StartQueryInfo(callback); | 72 StartQueryInfo(callback); |
73 } | 73 } |
74 | 74 |
| 75 void DisplayInfoProvider::SetInfo( |
| 76 const std::string& display_id, |
| 77 const api::system_info_display::DisplayProperties& info, |
| 78 const SetInfoCallback& callback) { |
| 79 base::MessageLoopProxy::current()->PostTask( |
| 80 FROM_HERE, |
| 81 base::Bind(callback, false, "Not implemented")); |
| 82 } |
| 83 |
75 bool DisplayInfoProvider::QueryInfo(DisplayInfo* info) { | 84 bool DisplayInfoProvider::QueryInfo(DisplayInfo* info) { |
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 |
OLD | NEW |