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

Side by Side Diff: ui/display/display_layout.h

Issue 2573673003: Detect and fix overlapping displays (Closed)
Patch Set: Nits Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_DISPLAY_LAYOUT_H_ 5 #ifndef UI_DISPLAY_DISPLAY_LAYOUT_H_
6 #define UI_DISPLAY_DISPLAY_LAYOUT_H_ 6 #define UI_DISPLAY_DISPLAY_LAYOUT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 }; 79 };
80 80
81 class DISPLAY_EXPORT DisplayLayout final { 81 class DISPLAY_EXPORT DisplayLayout final {
82 public: 82 public:
83 DisplayLayout(); 83 DisplayLayout();
84 ~DisplayLayout(); 84 ~DisplayLayout();
85 85
86 // Applies the layout to the displays in |display_list|. 86 // Applies the layout to the displays in |display_list|.
87 // |updated_ids| (optional) contains the ids for displays whose bounds have 87 // |updated_ids| (optional) contains the ids for displays whose bounds have
88 // changed. |minimum_offset_overlap| represents the minimum required overlap 88 // changed. |minimum_offset_overlap| represents the minimum required overlap
89 // between displays. 89 // between displays. Any overlap between displays will be fixed, and the
90 // display placement will be fixed.
90 void ApplyToDisplayList(Displays* display_list, 91 void ApplyToDisplayList(Displays* display_list,
91 std::vector<int64_t>* updated_ids, 92 std::vector<int64_t>* updated_ids,
92 int minimum_offset_overlap) const; 93 int minimum_offset_overlap);
93 94
94 // Validates the layout object. 95 // Validates the layout object.
95 static bool Validate(const DisplayIdList& list, const DisplayLayout& layout); 96 static bool Validate(const DisplayIdList& list, const DisplayLayout& layout);
96 97
97 std::vector<DisplayPlacement> placement_list; 98 std::vector<DisplayPlacement> placement_list;
98 99
99 // True if displays are mirrored. 100 // True if displays are mirrored.
100 bool mirrored; 101 bool mirrored;
101 102
102 // True if multi displays should default to unified mode. 103 // True if multi displays should default to unified mode.
(...skipping 21 matching lines...) Expand all
124 static bool ApplyDisplayPlacement(const DisplayPlacement& placement, 125 static bool ApplyDisplayPlacement(const DisplayPlacement& placement,
125 Displays* display_list, 126 Displays* display_list,
126 int minimum_offset_overlap); 127 int minimum_offset_overlap);
127 128
128 DISALLOW_COPY_AND_ASSIGN(DisplayLayout); 129 DISALLOW_COPY_AND_ASSIGN(DisplayLayout);
129 }; 130 };
130 131
131 } // namespace display 132 } // namespace display
132 133
133 #endif // UI_DISPLAY_DISPLAY_LAYOUT_H_ 134 #endif // UI_DISPLAY_DISPLAY_LAYOUT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/display_options_handler.cc ('k') | ui/display/display_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698