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

Unified Diff: ash/wm/workspace/snap_sizer.cc

Issue 138003007: [Cleanup] Screen cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make sure screen_for_shutdown is reset everytime Created 6 years, 11 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/wm/workspace/multi_window_resize_controller.cc ('k') | ash/wm/workspace/snap_sizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/snap_sizer.cc
diff --git a/ash/wm/workspace/snap_sizer.cc b/ash/wm/workspace/snap_sizer.cc
index ba35f6ac3ccced34b62368ff953254ae5c86e8e2..6f17339d940ba3a29e885602113de41c8fe150fa 100644
--- a/ash/wm/workspace/snap_sizer.cc
+++ b/ash/wm/workspace/snap_sizer.cc
@@ -7,7 +7,7 @@
#include <cmath>
#include "ash/ash_switches.h"
-#include "ash/screen_ash.h"
+#include "ash/screen_util.h"
#include "ash/wm/window_resizer.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
@@ -55,7 +55,7 @@ int GetMinWidth(aura::Window* window) {
// The aura::WindowDelegate's max size is ignored because
// ash::wm::CanSnapWindow() returns false when a max size is specified.
int GetMaxWidth(aura::Window* window) {
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(window));
+ gfx::Rect work_area(ScreenUtil::GetDisplayWorkAreaBoundsInParent(window));
return std::max(work_area.width() * kMaximumScreenPercent / 100,
GetMinWidth(window));
}
@@ -63,7 +63,7 @@ int GetMaxWidth(aura::Window* window) {
// Returns the width that |window| should be snapped to if resizing is disabled
// in the SnapSizer.
int GetDefaultWidth(aura::Window* window) {
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(window));
+ gfx::Rect work_area(ScreenUtil::GetDisplayWorkAreaBoundsInParent(window));
int width = 0;
if (!CommandLine::ForCurrentProcess()->HasSwitch(
@@ -91,7 +91,7 @@ std::vector<int> BuildIdealWidthList(aura::Window* window) {
int minimum_width = GetMinWidth(window);
int maximum_width = GetMaxWidth(window);
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(window));
+ gfx::Rect work_area(ScreenUtil::GetDisplayWorkAreaBoundsInParent(window));
int half_width = work_area.width() / 2;
if (half_width < minimum_width || half_width > maximum_width)
half_width = 0;
@@ -227,7 +227,7 @@ void SnapSizer::SelectDefaultSizeAndDisableResize() {
}
gfx::Rect SnapSizer::GetTargetBoundsForSize(size_t size_index) const {
- gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
+ gfx::Rect work_area(ScreenUtil::GetDisplayWorkAreaBoundsInParent(
window_state_->window()));
int y = work_area.y();
int max_y = work_area.bottom();
@@ -283,7 +283,7 @@ gfx::Rect SnapSizer::GetTargetBounds() const {
}
bool SnapSizer::AlongEdge(int x) const {
- gfx::Rect area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(
+ gfx::Rect area(ScreenUtil::GetDisplayWorkAreaBoundsInParent(
window_state_->window()));
return (x <= area.x()) || (x >= area.right() - 1);
}
« no previous file with comments | « ash/wm/workspace/multi_window_resize_controller.cc ('k') | ash/wm/workspace/snap_sizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698