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

Unified Diff: ui/display/display_layout.cc

Issue 2540313002: Split //ui/display and create //ui/display/manager. (Closed)
Patch Set: Cleanup export header. 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
« no previous file with comments | « ui/display/display_layout.h ('k') | ui/display/display_layout_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/display_layout.cc
diff --git a/ui/display/manager/display_layout.cc b/ui/display/display_layout.cc
similarity index 95%
rename from ui/display/manager/display_layout.cc
rename to ui/display/display_layout.cc
index bfee319bd4d955b16f1b95234dd15bd3bc21e1ac..bf20ae4b07f77ad021451f195c8c29426dc8e686 100644
--- a/ui/display/manager/display_layout.cc
+++ b/ui/display/display_layout.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/display/manager/display_layout.h"
+#include "ui/display/display_layout.h"
#include <algorithm>
#include <set>
@@ -16,7 +16,7 @@
#include "ui/gfx/geometry/insets.h"
namespace display {
-namespace {
+namespace {
// DisplayPlacement Positions
const char kTop[] = "top";
@@ -191,8 +191,7 @@ void DisplayLayout::ApplyToDisplayList(Displays* display_list,
parents.erase(parent_id);
for (const DisplayPlacement& placement : placement_list) {
if (placement.parent_display_id == parent_id) {
- if (ApplyDisplayPlacement(placement,
- display_list,
+ if (ApplyDisplayPlacement(placement, display_list,
minimum_offset_overlap) &&
updated_ids) {
updated_ids->push_back(placement.display_id);
@@ -331,18 +330,14 @@ bool DisplayLayout::ApplyDisplayPlacement(const DisplayPlacement& placement,
if (placement.offset_reference == DisplayPlacement::BOTTOM_RIGHT)
offset = parent_bounds.width() - offset - target_bounds.width();
- offset = std::min(
- offset, parent_bounds.width() - minimum_offset_overlap);
- offset = std::max(
- offset, -target_bounds.width() + minimum_offset_overlap);
+ offset = std::min(offset, parent_bounds.width() - minimum_offset_overlap);
+ offset = std::max(offset, -target_bounds.width() + minimum_offset_overlap);
} else {
if (placement.offset_reference == DisplayPlacement::BOTTOM_RIGHT)
offset = parent_bounds.height() - offset - target_bounds.height();
- offset = std::min(
- offset, parent_bounds.height() - minimum_offset_overlap);
- offset = std::max(
- offset, -target_bounds.height() + minimum_offset_overlap);
+ offset = std::min(offset, parent_bounds.height() - minimum_offset_overlap);
+ offset = std::max(offset, -target_bounds.height() + minimum_offset_overlap);
}
switch (position) {
case DisplayPlacement::TOP:
« no previous file with comments | « ui/display/display_layout.h ('k') | ui/display/display_layout_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698