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

Unified Diff: ash/display/display_manager.h

Issue 1107733006: Unified Desktop: hook up ash to allow unified desktop mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: ash/display/display_manager.h
diff --git a/ash/display/display_manager.h b/ash/display/display_manager.h
index a48fc67bba175f79d6f9db36f7dd0fe401021d7b..4599ddbabde91eed181217b1ea8c5c2276a0ab30 100644
--- a/ash/display/display_manager.h
+++ b/ash/display/display_manager.h
@@ -39,6 +39,8 @@ class DisplayLayoutStore;
class MouseWarpController;
class ScreenAsh;
+typedef std::vector<DisplayInfo> DisplayInfoList;
+
namespace test {
class AshTestBase;
class DisplayManagerTestApi;
@@ -59,9 +61,9 @@ class ASH_EXPORT DisplayManager
public:
virtual ~Delegate() {}
- // Create or updates the mirroring window with |display_info|.
+ // Create or updates the mirroring window with |display_info_list|.
virtual void CreateOrUpdateMirroringDisplay(
- const DisplayInfo& display_info) = 0;
+ const DisplayInfoList& display_info_list) = 0;
// Closes the mirror window if exists.
virtual void CloseMirroringDisplay() = 0;
@@ -79,11 +81,15 @@ class ASH_EXPORT DisplayManager
// 1) EXTENDED mode extends the desktop to the second dislpay.
// 2) MIRRORING mode copies the content of the primary display to
// the 2nd display. (Software Mirroring).
- enum SecondDisplayMode {
+ // 3) UNIFIED mode.
+ enum MultiDisplayMode {
EXTENDED,
- MIRRORING
+ MIRRORING,
+ UNIFIED,
};
+ static int64 kUnifiedDisplayId;
+
DisplayManager();
#if defined(OS_CHROMEOS)
~DisplayManager() override;
@@ -247,10 +253,11 @@ class ASH_EXPORT DisplayManager
bool IsInMirrorMode() const;
int64 mirroring_display_id() const { return mirroring_display_id_; }
- // Returns the display used for software mirrroring.
- const gfx::Display& software_mirroring_display() const {
- return software_mirroring_display_;
- }
+ bool IsInUnifiedMode() const;
+
+ // Returns the display used for software mirrroring. Returns invalid
+ // display if not found.
+ const gfx::Display GetMirroringDisplayById(int64 id) const;
// Retuns the display info associated with |display_id|.
const DisplayInfo& GetDisplayInfo(int64 display_id) const;
@@ -278,13 +285,17 @@ class ASH_EXPORT DisplayManager
bool SoftwareMirroringEnabled() const override;
#endif
bool software_mirroring_enabled() const {
- return second_display_mode_ == MIRRORING;
+ return multi_display_mode_ == MIRRORING;
};
- // Sets/gets second display mode.
- void SetSecondDisplayMode(SecondDisplayMode mode);
- SecondDisplayMode second_display_mode() const {
- return second_display_mode_;
+ // Sets/gets multi display mode.
+ void SetMultiDisplayMode(MultiDisplayMode mode);
+ MultiDisplayMode multi_display_mode() const { return multi_display_mode_; }
+
+ // Sets/gets default multi display mode.
+ void SetDefaultMultiDisplayMode(MultiDisplayMode mode);
+ MultiDisplayMode default_multi_display_mode() const {
+ return default_multi_display_mode_;
}
// Update the bounds of the display given by |display_id|.
@@ -397,9 +408,11 @@ private:
// on device as well as during the unit tests.
bool change_display_upon_host_resize_;
- SecondDisplayMode second_display_mode_;
+ MultiDisplayMode multi_display_mode_;
+ MultiDisplayMode default_multi_display_mode_;
+
int64 mirroring_display_id_;
- gfx::Display software_mirroring_display_;
+ DisplayList software_mirroring_display_list_;
// User preference for rotation lock of the internal display.
bool registered_internal_display_rotation_lock_;

Powered by Google App Engine
This is Rietveld 408576698