OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef UI_DISPLAY_CHROMEOS_DISPLAY_SNAPSHOT_VIRTUAL_H_ | 5 #ifndef UI_DISPLAY_CHROMEOS_DISPLAY_SNAPSHOT_VIRTUAL_H_ |
6 #define UI_DISPLAY_CHROMEOS_DISPLAY_SNAPSHOT_VIRTUAL_H_ | 6 #define UI_DISPLAY_CHROMEOS_DISPLAY_SNAPSHOT_VIRTUAL_H_ |
7 | 7 |
8 #include "ui/display/types/display_snapshot.h" | |
9 | |
10 #include <stdint.h> | 8 #include <stdint.h> |
11 | 9 |
| 10 #include <memory> |
| 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | |
14 #include "ui/display/types/display_mode.h" | 13 #include "ui/display/types/display_mode.h" |
| 14 #include "ui/display/types/display_snapshot.h" |
15 | 15 |
16 namespace ui { | 16 namespace ui { |
17 | 17 |
18 // This class represents a virtual display to be enabled on demand. The display | 18 // This class represents a virtual display to be enabled on demand. The display |
19 // is constructed for the desired pixel resolution. | 19 // is constructed for the desired pixel resolution. |
20 class DisplaySnapshotVirtual : public DisplaySnapshot { | 20 class DisplaySnapshotVirtual : public DisplaySnapshot { |
21 public: | 21 public: |
22 // |display_id| is the numerical identifier for the virtual display, | 22 // |display_id| is the numerical identifier for the virtual display, |
23 // |display_size| is the pixel dimensions for the display. | 23 // |display_size| is the pixel dimensions for the display. |
24 DisplaySnapshotVirtual(int64_t display_id, const gfx::Size& display_size); | 24 DisplaySnapshotVirtual(int64_t display_id, const gfx::Size& display_size); |
25 ~DisplaySnapshotVirtual() override; | 25 ~DisplaySnapshotVirtual() override; |
26 | 26 |
27 // DisplaySnapshot overrides. | 27 // DisplaySnapshot overrides. |
28 std::string ToString() const override; | 28 std::string ToString() const override; |
29 | 29 |
30 private: | 30 private: |
31 scoped_ptr<DisplayMode> mode_; | 31 std::unique_ptr<DisplayMode> mode_; |
32 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshotVirtual); | 32 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshotVirtual); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace ui | 35 } // namespace ui |
36 | 36 |
37 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_SNAPSHOT_VIRTUAL_H_ | 37 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_SNAPSHOT_VIRTUAL_H_ |
OLD | NEW |