| Index: ui/gfx/display_layout.h
|
| diff --git a/ui/gfx/display_layout.h b/ui/gfx/display_layout.h
|
| index 8d1d57ec7270764e1e154cb3dc061f6e04102e4f..c7215627812d1747d6e08c0a1d929e120e30124e 100644
|
| --- a/ui/gfx/display_layout.h
|
| +++ b/ui/gfx/display_layout.h
|
| @@ -55,14 +55,27 @@ struct GFX_EXPORT DisplayPlacement {
|
| enum Position { TOP, RIGHT, BOTTOM, LEFT };
|
| Position position;
|
|
|
| - // The offset of the position of the secondary display. The offset is
|
| - // based on the top/left edge of the primary display.
|
| + // The offset of the position with respect to the parent.
|
| int offset;
|
|
|
| - explicit DisplayPlacement(const DisplayPlacement& placement);
|
| + // Determines if the offset is relative to the TOP_LEFT or the BOTTOM_RIGHT.
|
| + // Defaults to TOP_LEFT.
|
| + enum OffsetReference { TOP_LEFT, BOTTOM_RIGHT };
|
| + OffsetReference offset_reference;
|
| +
|
| DisplayPlacement(Position position, int offset);
|
| + DisplayPlacement(Position position,
|
| + int offset,
|
| + OffsetReference offset_reference);
|
| + DisplayPlacement(int64_t display_id,
|
| + int64_t parent_display_id,
|
| + Position position,
|
| + int offset,
|
| + OffsetReference offset_reference);
|
| DisplayPlacement();
|
|
|
| + DisplayPlacement(const DisplayPlacement& placement);
|
| +
|
| DisplayPlacement& Swap();
|
|
|
| std::string ToString() const;
|
| @@ -77,6 +90,19 @@ class GFX_EXPORT DisplayLayout final {
|
| DisplayLayout();
|
| ~DisplayLayout();
|
|
|
| + // Applies the layout and updates the bounds of displays in |display_list|.
|
| + // |updated_ids| contains the ids for displays whose bounds have changed.
|
| + void ApplyToDisplayList(DisplayList* display_list,
|
| + std::vector<int64_t>* updated_ids,
|
| + int minimum_offset_overlap) const;
|
| +
|
| + // Apply the display placement to the display layout.
|
| + // Returns true if the display bounds has been updated.
|
| + bool ApplyDisplayPlacement(const gfx::DisplayPlacement& placement,
|
| + gfx::DisplayList* display_list,
|
| + int minimum_offset_overlap) const;
|
| +
|
| +
|
| // Validates the layout object.
|
| static bool Validate(const DisplayIdList& list, const DisplayLayout& layout);
|
|
|
|
|