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
3 // found in the LICENSE file.
5 #ifndef UI_DISPLAY_CHROMEOS_TEST_TEST_DISPLAY_SNAPSHOT_H_
6 #define UI_DISPLAY_CHROMEOS_TEST_TEST_DISPLAY_SNAPSHOT_H_
8 #include "ui/display/display_export.h"
9 #include "ui/display/types/display_snapshot.h"
13 class DISPLAY_EXPORT TestDisplaySnapshot
: public DisplaySnapshot
{
15 TestDisplaySnapshot();
16 TestDisplaySnapshot(int64_t display_id
,
17 const gfx::Point
& origin
,
18 const gfx::Size
& physical_size
,
19 DisplayConnectionType type
,
20 bool is_aspect_preserving_scaling
,
21 const std::vector
<const DisplayMode
*>& modes
,
22 const DisplayMode
* current_mode
,
23 const DisplayMode
* native_mode
);
24 ~TestDisplaySnapshot() override
;
26 void set_type(DisplayConnectionType type
) { type_
= type
; }
27 void set_modes(const std::vector
<const DisplayMode
*>& modes
) {
30 void set_current_mode(const ui::DisplayMode
* mode
) { current_mode_
= mode
; }
31 void set_native_mode(const ui::DisplayMode
* mode
) { native_mode_
= mode
; }
32 void set_is_aspect_preserving_scaling(bool state
) {
33 is_aspect_preserving_scaling_
= state
;
35 void set_display_id(int64_t id
) { display_id_
= id
; }
37 // DisplaySnapshot overrides:
38 std::string
ToString() const override
;
41 DISALLOW_COPY_AND_ASSIGN(TestDisplaySnapshot
);
46 #endif // UI_DISPLAY_CHROMEOS_TEST_TEST_DISPLAY_SNAPSHOT_H_