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/system_info_display_
api.h" | 5 #include "chrome/browser/extensions/api/system_info_display/system_info_display_
api.h" |
6 | 6 |
7 namespace extensions { | 7 namespace extensions { |
8 | 8 |
9 using api::experimental_system_info_display::DisplayUnitInfo; | 9 using api::system_info_display::DisplayUnitInfo; |
10 | 10 |
11 bool SystemInfoDisplayGetFunction::RunImpl() { | 11 bool SystemInfoDisplayGetDisplayInfoFunction::RunImpl() { |
12 DisplayInfoProvider::Get()->StartQueryInfo( | 12 DisplayInfoProvider::GetDisplayInfo()->StartQueryInfo( |
13 base::Bind(&SystemInfoDisplayGetFunction::OnGetDisplayInfoCompleted, | 13 base::Bind(&SystemInfoDisplayGetDisplayInfoFunction::OnGetDisplayInfoCompl
eted, |
14 this)); | 14 this)); |
15 return true; | 15 return true; |
16 } | 16 } |
17 | 17 |
18 void SystemInfoDisplayGetFunction::OnGetDisplayInfoCompleted( | 18 void SystemInfoDisplayGetDisplayInfoFunction::OnGetDisplayInfoCompleted( |
19 const DisplayInfo& info, bool success) { | 19 const DisplayInfo& info, bool success) { |
20 if (success) { | 20 if (success) |
21 results_ = | 21 results_ = api::system_info_display::GetDisplayInfo::Results::Create(info); |
22 api::experimental_system_info_display::Get::Results::Create(info); | |
23 } | |
24 else | 22 else |
25 SetError("Error occurred when querying display information."); | 23 SetError("Error occurred when querying display information."); |
26 SendResponse(success); | 24 SendResponse(success); |
27 } | 25 } |
28 | 26 |
29 } // namespace extensions | 27 } // namespace extensions |
OLD | NEW |