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

Side by Side Diff: ash/common/wm/system_modal_container_layout_manager.cc

Issue 2430593002: mash: Use ash shell window container ids instead of ash::mojom::Container (Closed)
Patch Set: rebase Created 4 years, 2 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
« no previous file with comments | « ash/common/wm/switchable_windows.cc ('k') | ash/common/wm/window_cycle_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ash/common/wm/system_modal_container_layout_manager.h" 5 #include "ash/common/wm/system_modal_container_layout_manager.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/shell_window_ids.h"
11 #include "ash/common/wm/window_dimmer.h" 10 #include "ash/common/wm/window_dimmer.h"
12 #include "ash/common/wm_shell.h" 11 #include "ash/common/wm_shell.h"
13 #include "ash/common/wm_window.h" 12 #include "ash/common/wm_window.h"
14 #include "ash/common/wm_window_property.h" 13 #include "ash/common/wm_window_property.h"
14 #include "ash/public/cpp/shell_window_ids.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/stl_util.h" 16 #include "base/stl_util.h"
17 #include "ui/keyboard/keyboard_controller.h" 17 #include "ui/keyboard/keyboard_controller.h"
18 18
19 namespace ash { 19 namespace ash {
20 namespace { 20 namespace {
21 21
22 // The center point of the window can diverge this much from the center point 22 // The center point of the window can diverge this much from the center point
23 // of the container to be kept centered upon resizing operations. 23 // of the container to be kept centered upon resizing operations.
24 const int kCenterPixelDelta = 32; 24 const int kCenterPixelDelta = 32;
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 bool SystemModalContainerLayoutManager::IsBoundsCentered( 264 bool SystemModalContainerLayoutManager::IsBoundsCentered(
265 const gfx::Rect& bounds) const { 265 const gfx::Rect& bounds) const {
266 gfx::Point window_center = bounds.CenterPoint(); 266 gfx::Point window_center = bounds.CenterPoint();
267 gfx::Point container_center = GetUsableDialogArea().CenterPoint(); 267 gfx::Point container_center = GetUsableDialogArea().CenterPoint();
268 return std::abs(window_center.x() - container_center.x()) < 268 return std::abs(window_center.x() - container_center.x()) <
269 kCenterPixelDelta && 269 kCenterPixelDelta &&
270 std::abs(window_center.y() - container_center.y()) < kCenterPixelDelta; 270 std::abs(window_center.y() - container_center.y()) < kCenterPixelDelta;
271 } 271 }
272 272
273 } // namespace ash 273 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/switchable_windows.cc ('k') | ash/common/wm/window_cycle_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698