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

Unified Diff: ui/display/chromeos/test/test_display_snapshot.h

Issue 187073002: Refactoring display configuration state to allow generic state objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 9 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: ui/display/chromeos/test/test_display_snapshot.h
diff --git a/ui/display/chromeos/test/test_display_snapshot.h b/ui/display/chromeos/test/test_display_snapshot.h
new file mode 100644
index 0000000000000000000000000000000000000000..f1e94f2f13f9c73c6e27cf6a93972703ad0ac968
--- /dev/null
+++ b/ui/display/chromeos/test/test_display_snapshot.h
@@ -0,0 +1,51 @@
+// 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_TEST_TEST_DISPLAY_SNAPSHOT_H_
+#define UI_DISPLAY_CHROMEOS_TEST_TEST_DISPLAY_SNAPSHOT_H_
+
+#include "ui/display/chromeos/display_snapshot.h"
+
+namespace ui {
+
+class DISPLAY_EXPORT TestDisplaySnapshot : public DisplaySnapshot {
+ public:
+ TestDisplaySnapshot();
+ TestDisplaySnapshot(int64_t display_id,
+ bool has_proper_display_id,
+ const gfx::Point& origin,
+ const gfx::Size& physical_size,
+ OutputType type,
+ bool is_aspect_preserving_scaling,
+ const std::vector<const DisplayMode*>& modes,
+ const DisplayMode* current_mode,
+ const DisplayMode* native_mode);
+ virtual ~TestDisplaySnapshot();
+
+ void set_type(OutputType type) { type_ = type; }
+ void set_modes(const std::vector<const DisplayMode*>& modes) {
+ modes_ = modes;
+ }
+ void set_current_mode(const ui::DisplayMode* mode) { current_mode_ = mode; }
+ void set_native_mode(const ui::DisplayMode* mode) { native_mode_ = mode; }
+ void set_is_aspect_preserving_scaling(bool state) {
+ is_aspect_preserving_scaling_ = state;
+ }
+ void set_display_id(int64_t id) { display_id_ = id; }
+ void set_has_proper_display_id(bool has_display_id) {
+ has_proper_display_id_ = has_display_id;
+ }
+
+ // DisplaySnapshot overrides:
+ virtual std::string GetDisplayName() OVERRIDE;
+ virtual bool GetOverscanFlag() OVERRIDE;
+ virtual std::string ToString() const OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TestDisplaySnapshot);
+};
+
+} // namespace ui
+
+#endif // UI_DISPLAY_CHROMEOS_TEST_TEST_DISPLAY_SNAPSHOT_H_
« no previous file with comments | « ui/display/chromeos/output_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