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

Unified Diff: chrome/browser/extensions/api/system_display/system_display_api.cc

Issue 389633002: Move system.* family of APIs to extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better comments Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/system_display/system_display_api.cc
diff --git a/chrome/browser/extensions/api/system_display/system_display_api.cc b/chrome/browser/extensions/api/system_display/system_display_api.cc
deleted file mode 100644
index faccf3d9e8a965571d9801f88ef3f0d5a2b3ff1e..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/system_display/system_display_api.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/extensions/api/system_display/system_display_api.h"
-
-#include <string>
-
-#include "chrome/browser/extensions/api/system_display/display_info_provider.h"
-#include "chrome/common/extensions/api/system_display.h"
-
-#if defined(OS_CHROMEOS)
-#include "base/memory/scoped_ptr.h"
-#include "extensions/common/manifest_handlers/kiosk_mode_info.h"
-#include "ui/gfx/screen.h"
-#endif
-
-namespace extensions {
-
-using api::system_display::DisplayUnitInfo;
-
-namespace SetDisplayProperties = api::system_display::SetDisplayProperties;
-
-typedef std::vector<linked_ptr<
- api::system_display::DisplayUnitInfo> > DisplayInfo;
-
-bool SystemDisplayGetInfoFunction::RunSync() {
- DisplayInfo all_displays_info =
- DisplayInfoProvider::Get()->GetAllDisplaysInfo();
- results_ = api::system_display::GetInfo::Results::Create(all_displays_info);
- return true;
-}
-
-bool SystemDisplaySetDisplayPropertiesFunction::RunSync() {
-#if !defined(OS_CHROMEOS)
- SetError("Function available only on ChromeOS.");
- return false;
-#else
- if (!KioskModeInfo::IsKioskEnabled(GetExtension())) {
- SetError("The extension needs to be kiosk enabled to use the function.");
- return false;
- }
- std::string error;
- scoped_ptr<SetDisplayProperties::Params> params(
- SetDisplayProperties::Params::Create(*args_));
- bool success = DisplayInfoProvider::Get()->SetInfo(params->id,
- params->info,
- &error);
- if (!success)
- SetError(error);
- return true;
-#endif
-}
-
-} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698