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

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

Issue 2729363002: chromeos: Move files in //ash/common to //ash, part 3 (Closed)
Patch Set: Created 3 years, 9 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/wm/window_util_unittest.cc ('k') | ash/wm/wm_snap_to_pixel_layout_manager.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/wm_screen_util.h" 5 #include "ash/wm/wm_screen_util.h"
6 6
7 #include "ash/common/wm_shell.h"
8 #include "ash/common/wm_window.h"
9 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/wm_shell.h"
9 #include "ash/wm_window.h"
10 #include "ui/display/display.h" 10 #include "ui/display/display.h"
11 #include "ui/display/screen.h" 11 #include "ui/display/screen.h"
12 #include "ui/gfx/geometry/size_conversions.h" 12 #include "ui/gfx/geometry/size_conversions.h"
13 13
14 namespace ash { 14 namespace ash {
15 namespace wm { 15 namespace wm {
16 16
17 gfx::Rect GetDisplayWorkAreaBoundsInParent(WmWindow* window) { 17 gfx::Rect GetDisplayWorkAreaBoundsInParent(WmWindow* window) {
18 display::Display display = window->GetDisplayNearestWindow(); 18 display::Display display = window->GetDisplayNearestWindow();
19 return window->GetParent()->ConvertRectFromScreen(display.work_area()); 19 return window->GetParent()->ConvertRectFromScreen(display.work_area());
(...skipping 18 matching lines...) Expand all
38 float scale = window->GetRootWindow()->GetBounds().height() / size.height(); 38 float scale = window->GetRootWindow()->GetBounds().height() / size.height();
39 size.Scale(scale, scale); 39 size.Scale(scale, scale);
40 return gfx::Rect(gfx::ToCeiledSize(size)); 40 return gfx::Rect(gfx::ToCeiledSize(size));
41 } 41 }
42 42
43 return window->GetRootWindow()->GetBounds(); 43 return window->GetRootWindow()->GetBounds();
44 } 44 }
45 45
46 } // namespace wm 46 } // namespace wm
47 } // namespace ash 47 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_util_unittest.cc ('k') | ash/wm/wm_snap_to_pixel_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698