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

Unified Diff: extensions/browser/api/system_display/display_info_provider.h

Issue 2072633002: Add Get/SetDisplayLayout to chrome.system.display extension API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win Created 4 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/system_display/display_info_provider.h
diff --git a/extensions/browser/api/system_display/display_info_provider.h b/extensions/browser/api/system_display/display_info_provider.h
index 6715ba8f40d0ee149c4475fbcfa9445ca868af53..54e44abf7f56e5844d674b887ec863a65bc6a6c5 100644
--- a/extensions/browser/api/system_display/display_info_provider.h
+++ b/extensions/browser/api/system_display/display_info_provider.h
@@ -20,16 +20,18 @@ namespace extensions {
namespace api {
namespace system_display {
+struct DisplayLayout;
struct DisplayProperties;
struct DisplayUnitInfo;
struct Insets;
}
}
-typedef std::vector<api::system_display::DisplayUnitInfo> DisplayUnitInfoList;
-
class DisplayInfoProvider {
public:
+ using DisplayUnitInfoList = std::vector<api::system_display::DisplayUnitInfo>;
+ using DisplayLayoutList = std::vector<api::system_display::DisplayLayout>;
+
virtual ~DisplayInfoProvider();
// Returns a pointer to DisplayInfoProvider or NULL if Create()
@@ -47,13 +49,20 @@ class DisplayInfoProvider {
const api::system_display::DisplayProperties& info,
std::string* error) = 0;
- // Enable the unified desktop feature.
+ // Implements SetDisplayLayout methods. See system_display.idl. Returns
+ // false if the layout input is invalid.
+ virtual bool SetDisplayLayout(const DisplayLayoutList& layouts);
+
+ // Enables the unified desktop feature.
virtual void EnableUnifiedDesktop(bool enable);
- // Get display information.
+ // Gets display information.
virtual DisplayUnitInfoList GetAllDisplaysInfo();
- // Implement overscan calbiration methods. See system_display.idl. These
+ // Gets display layout information.
+ virtual DisplayLayoutList GetDisplayLayout();
+
+ // Implements overscan calbiration methods. See system_display.idl. These
// return false if |id| is invalid.
virtual bool OverscanCalibrationStart(const std::string& id);
virtual bool OverscanCalibrationAdjust(
« no previous file with comments | « chrome/browser/extensions/display_info_provider_win.cc ('k') | extensions/browser/api/system_display/display_info_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698