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

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

Powered by Google App Engine
This is Rietveld 408576698