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

Unified Diff: ash/display/window_tree_host_manager.cc

Issue 1838833002: Move DisplayLayout and DisplayLayoutBuilder From ash To ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screenwinmove
Patch Set: Fix comment Created 4 years, 8 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
« no previous file with comments | « ash/display/unified_mouse_warp_controller.cc ('k') | ash/display/window_tree_host_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/window_tree_host_manager.cc
diff --git a/ash/display/window_tree_host_manager.cc b/ash/display/window_tree_host_manager.cc
index e919e9b6d1bec64b813690b5f467b719884d352e..9336dfcf494b022a5aa16b74bfc9b3228206ce94 100644
--- a/ash/display/window_tree_host_manager.cc
+++ b/ash/display/window_tree_host_manager.cc
@@ -44,6 +44,7 @@
#include "ui/aura/window_tree_host.h"
#include "ui/base/ime/input_method_factory.h"
#include "ui/compositor/compositor.h"
+#include "ui/display/manager/display_layout.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
#include "ui/wm/core/coordinate_conversion.h"
@@ -439,15 +440,16 @@ void WindowTreeHostManager::SetPrimaryDisplayId(int64_t id) {
GetRootWindowSettings(GetWindow(non_primary_host))->display_id =
old_primary_display.id();
- const DisplayLayout& layout = GetDisplayManager()->GetCurrentDisplayLayout();
+ const display::DisplayLayout& layout =
+ GetDisplayManager()->GetCurrentDisplayLayout();
// The requested primary id can be same as one in the stored layout
// when the primary id is set after new displays are connected.
// Only update the layout if it is requested to swap primary display.
if (layout.primary_id != new_primary_display.id()) {
- scoped_ptr<DisplayLayout> swapped_layout(layout.Copy());
+ scoped_ptr<display::DisplayLayout> swapped_layout(layout.Copy());
swapped_layout->placement_list[0].Swap();
swapped_layout->primary_id = new_primary_display.id();
- DisplayIdList list = display_manager->GetCurrentDisplayIdList();
+ display::DisplayIdList list = display_manager->GetCurrentDisplayIdList();
GetDisplayManager()->layout_store()->RegisterLayoutForDisplayIdList(
list, std::move(swapped_layout));
}
@@ -764,8 +766,8 @@ void WindowTreeHostManager::PostDisplayConfigurationChange() {
DisplayManager* display_manager = GetDisplayManager();
DisplayLayoutStore* layout_store = display_manager->layout_store();
if (display_manager->num_connected_displays() > 1) {
- DisplayIdList list = display_manager->GetCurrentDisplayIdList();
- const DisplayLayout& layout =
+ display::DisplayIdList list = display_manager->GetCurrentDisplayIdList();
+ const display::DisplayLayout& layout =
layout_store->GetRegisteredDisplayLayout(list);
layout_store->UpdateMultiDisplayState(
list, display_manager->IsInMirrorMode(), layout.default_unified);
« no previous file with comments | « ash/display/unified_mouse_warp_controller.cc ('k') | ash/display/window_tree_host_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698