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

Unified Diff: ui/display/chromeos/display_snapshot_virtual.h

Issue 1456623002: Add support for virtual displays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test (removing need for friend on DisplayConfigurator) Created 5 years, 1 month 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: ui/display/chromeos/display_snapshot_virtual.h
diff --git a/ui/display/chromeos/display_snapshot_virtual.h b/ui/display/chromeos/display_snapshot_virtual.h
new file mode 100644
index 0000000000000000000000000000000000000000..fe8610cca34cac7904db89eaa5862029451de0fd
--- /dev/null
+++ b/ui/display/chromeos/display_snapshot_virtual.h
@@ -0,0 +1,40 @@
+// Copyright 2014 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.
+
+#ifndef UI_DISPLAY_CHROMEOS_DISPLAY_SNAPSHOT_VIRTUAL_H_
+#define UI_DISPLAY_CHROMEOS_DISPLAY_SNAPSHOT_VIRTUAL_H_
+
+#include "ui/display/types/display_snapshot.h"
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/display/types/display_mode.h"
+
+namespace ui {
+
+// This class represents a virtual display to be enabled on demand. The display
+// is constructed for the desired pixel resolution.
+class DisplaySnapshotVirtual : public DisplaySnapshot {
+ public:
+ // |display_id| is the numerical identifier for the virtual display,
+ // |display_size| is the pixel dimensions for the display.
+ DisplaySnapshotVirtual(int64_t display_id, gfx::Size display_size);
oshima 2015/11/24 22:19:27 const gfx::Size &
robert.bradford 2015/11/26 16:29:40 Done.
+ ~DisplaySnapshotVirtual() override;
+
+ // DisplaySnapshot overrides.
+ std::string ToString() const override;
+
+ // Update the identifer to |display_id|. This is used by DisplayConfigurator
+ // to update the virtual display's id after the physical displays are
+ // enumerated.
+ void set_display_id(int64_t display_id) { display_id_ = display_id; }
oshima 2015/11/24 22:19:27 where this is used?
robert.bradford 2015/11/26 16:29:40 Left over from the pre-DisplayConfigurator split o
+
+ private:
+ scoped_ptr<DisplayMode> mode_;
+ DISALLOW_COPY_AND_ASSIGN(DisplaySnapshotVirtual);
+};
+
+} // namespace ui
+
+#endif // UI_DISPLAY_CHROMEOS_DISPLAY_SNAPSHOT_VIRTUAL_H_

Powered by Google App Engine
This is Rietveld 408576698