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

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

Issue 2048443002: ABANDONED: mash: Move shell delegate interfaces to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moveshelfmodel
Patch Set: Created 4 years, 6 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
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/wm/system_modal_container_layout_manager.h" 5 #include "ash/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/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
10 #include "ash/session/session_state_delegate.h"
11 #include "ash/shell.h" 11 #include "ash/shell.h"
12 #include "ash/wm/dim_window.h" 12 #include "ash/wm/dim_window.h"
13 #include "ash/wm/window_util.h" 13 #include "ash/wm/window_util.h"
14 #include "ui/aura/client/aura_constants.h" 14 #include "ui/aura/client/aura_constants.h"
15 #include "ui/aura/client/capture_client.h" 15 #include "ui/aura/client/capture_client.h"
16 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
17 #include "ui/aura/window_property.h" 17 #include "ui/aura/window_property.h"
18 #include "ui/compositor/layer.h" 18 #include "ui/compositor/layer.h"
19 #include "ui/keyboard/keyboard_controller.h" 19 #include "ui/keyboard/keyboard_controller.h"
20 20
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 bool SystemModalContainerLayoutManager::DialogIsCentered( 253 bool SystemModalContainerLayoutManager::DialogIsCentered(
254 const gfx::Rect& window_bounds) { 254 const gfx::Rect& window_bounds) {
255 gfx::Point window_center = window_bounds.CenterPoint(); 255 gfx::Point window_center = window_bounds.CenterPoint();
256 gfx::Point container_center = GetUsableDialogArea().CenterPoint(); 256 gfx::Point container_center = GetUsableDialogArea().CenterPoint();
257 return 257 return
258 std::abs(window_center.x() - container_center.x()) < kCenterPixelDelta && 258 std::abs(window_center.x() - container_center.x()) < kCenterPixelDelta &&
259 std::abs(window_center.y() - container_center.y()) < kCenterPixelDelta; 259 std::abs(window_center.y() - container_center.y()) < kCenterPixelDelta;
260 } 260 }
261 261
262 } // namespace ash 262 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698