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

Side by Side Diff: ui/display/chromeos/test/test_display_snapshot.h

Issue 667753002: Treat displays with and without EDID the same way (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
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_TEST_TEST_DISPLAY_SNAPSHOT_H_ 5 #ifndef UI_DISPLAY_CHROMEOS_TEST_TEST_DISPLAY_SNAPSHOT_H_
6 #define UI_DISPLAY_CHROMEOS_TEST_TEST_DISPLAY_SNAPSHOT_H_ 6 #define UI_DISPLAY_CHROMEOS_TEST_TEST_DISPLAY_SNAPSHOT_H_
7 7
8 #include "ui/display/display_export.h" 8 #include "ui/display/display_export.h"
9 #include "ui/display/types/display_snapshot.h" 9 #include "ui/display/types/display_snapshot.h"
10 10
11 namespace ui { 11 namespace ui {
12 12
13 class DISPLAY_EXPORT TestDisplaySnapshot : public DisplaySnapshot { 13 class DISPLAY_EXPORT TestDisplaySnapshot : public DisplaySnapshot {
14 public: 14 public:
15 TestDisplaySnapshot(); 15 TestDisplaySnapshot();
16 TestDisplaySnapshot(int64_t display_id, 16 TestDisplaySnapshot(int64_t display_id,
17 bool has_proper_display_id,
18 const gfx::Point& origin, 17 const gfx::Point& origin,
19 const gfx::Size& physical_size, 18 const gfx::Size& physical_size,
20 DisplayConnectionType type, 19 DisplayConnectionType type,
21 bool is_aspect_preserving_scaling, 20 bool is_aspect_preserving_scaling,
22 const std::vector<const DisplayMode*>& modes, 21 const std::vector<const DisplayMode*>& modes,
23 const DisplayMode* current_mode, 22 const DisplayMode* current_mode,
24 const DisplayMode* native_mode); 23 const DisplayMode* native_mode);
25 virtual ~TestDisplaySnapshot(); 24 virtual ~TestDisplaySnapshot();
26 25
27 void set_type(DisplayConnectionType type) { type_ = type; } 26 void set_type(DisplayConnectionType type) { type_ = type; }
28 void set_modes(const std::vector<const DisplayMode*>& modes) { 27 void set_modes(const std::vector<const DisplayMode*>& modes) {
29 modes_ = modes; 28 modes_ = modes;
30 } 29 }
31 void set_current_mode(const ui::DisplayMode* mode) { current_mode_ = mode; } 30 void set_current_mode(const ui::DisplayMode* mode) { current_mode_ = mode; }
32 void set_native_mode(const ui::DisplayMode* mode) { native_mode_ = mode; } 31 void set_native_mode(const ui::DisplayMode* mode) { native_mode_ = mode; }
33 void set_is_aspect_preserving_scaling(bool state) { 32 void set_is_aspect_preserving_scaling(bool state) {
34 is_aspect_preserving_scaling_ = state; 33 is_aspect_preserving_scaling_ = state;
35 } 34 }
36 void set_display_id(int64_t id) { display_id_ = id; } 35 void set_display_id(int64_t id) { display_id_ = id; }
37 void set_has_proper_display_id(bool has_display_id) {
38 has_proper_display_id_ = has_display_id;
39 }
40 36
41 // DisplaySnapshot overrides: 37 // DisplaySnapshot overrides:
42 virtual std::string ToString() const override; 38 virtual std::string ToString() const override;
43 39
44 private: 40 private:
45 DISALLOW_COPY_AND_ASSIGN(TestDisplaySnapshot); 41 DISALLOW_COPY_AND_ASSIGN(TestDisplaySnapshot);
46 }; 42 };
47 43
48 } // namespace ui 44 } // namespace ui
49 45
50 #endif // UI_DISPLAY_CHROMEOS_TEST_TEST_DISPLAY_SNAPSHOT_H_ 46 #endif // UI_DISPLAY_CHROMEOS_TEST_TEST_DISPLAY_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « ui/display/chromeos/display_configurator_unittest.cc ('k') | ui/display/chromeos/test/test_display_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698