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

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

Issue 11882009: Multi-monitor extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to 179043. Created 7 years, 11 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::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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698