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

Unified Diff: ui/display/display_layout.h

Issue 2573673003: Detect and fix overlapping displays (Closed)
Patch Set: Fix compile on Windows Created 4 years 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/display_layout.h
diff --git a/ui/display/display_layout.h b/ui/display/display_layout.h
index e9f85f75b95b2824f4c4e8f7f20f035a502b239d..0cec03dd79ba23d789b80ea4e2b6bfdd5a290bfa 100644
--- a/ui/display/display_layout.h
+++ b/ui/display/display_layout.h
@@ -86,10 +86,11 @@ class DISPLAY_EXPORT DisplayLayout final {
// Applies the layout to the displays in |display_list|.
// |updated_ids| (optional) contains the ids for displays whose bounds have
// changed. |minimum_offset_overlap| represents the minimum required overlap
- // between displays.
+ // between displays. Any overlap between displays will be fixed, and the
+ // display placement will be fixed.
void ApplyToDisplayList(Displays* display_list,
std::vector<int64_t>* updated_ids,
- int minimum_offset_overlap) const;
+ int minimum_offset_overlap);
// Validates the layout object.
static bool Validate(const DisplayIdList& list, const DisplayLayout& layout);
@@ -125,6 +126,10 @@ class DISPLAY_EXPORT DisplayLayout final {
Displays* display_list,
int minimum_offset_overlap);
+ // After this layout has been applied to the |display_list|, this function is
+ // called to update the offsets in the |placement_list|.
+ void UpdateOffsets(Displays* display_list);
+
DISALLOW_COPY_AND_ASSIGN(DisplayLayout);
};

Powered by Google App Engine
This is Rietveld 408576698