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

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

Issue 2906803002: Rename MaximizeMode to TabletMode (Closed)
Patch Set: updated filter Created 3 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/window_positioner.h" 5 #include "ash/wm/window_positioner.h"
6 6
7 #include "ash/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_port.h" 9 #include "ash/shell_port.h"
10 #include "ash/wm/mru_window_tracker.h" 10 #include "ash/wm/mru_window_tracker.h"
(...skipping 16 matching lines...) Expand all
27 // static 27 // static
28 const int WindowPositioner::kDesktopBorderSize = 16; 28 const int WindowPositioner::kDesktopBorderSize = 16;
29 29
30 // Maximum width of a window even if there is more room on the desktop. 30 // Maximum width of a window even if there is more room on the desktop.
31 // static 31 // static
32 const int WindowPositioner::kMaximumWindowWidth = 1100; 32 const int WindowPositioner::kMaximumWindowWidth = 1100;
33 33
34 namespace { 34 namespace {
35 35
36 // When a window gets opened in default mode and the screen is less than or 36 // When a window gets opened in default mode and the screen is less than or
37 // equal to this width, the window will get opened in maximized mode. This value 37 // equal to this width, the window will get opened in tablet mode. This value
38 // can be reduced to a "tame" number if the feature is disabled. 38 // can be reduced to a "tame" number if the feature is disabled.
39 const int kForceMaximizeWidthLimit = 1366; 39 const int kForceMaximizeWidthLimit = 1366;
40 40
41 // The time in milliseconds which should be used to visually move a window 41 // The time in milliseconds which should be used to visually move a window
42 // through an automatic "intelligent" window management option. 42 // through an automatic "intelligent" window management option.
43 const int kWindowAutoMoveDurationMS = 125; 43 const int kWindowAutoMoveDurationMS = 125;
44 44
45 // If set to true all window repositioning actions will be ignored. Set through 45 // If set to true all window repositioning actions will be ignored. Set through
46 // WindowPositioner::SetIgnoreActivations(). 46 // WindowPositioner::SetIgnoreActivations().
47 static bool disable_auto_positioning = false; 47 static bool disable_auto_positioning = false;
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 // If the alignment was pushing the window out of the screen, we ignore the 571 // If the alignment was pushing the window out of the screen, we ignore the
572 // alignment for that call. 572 // alignment for that call.
573 if (abs(pos.right() - work_area.right()) < grid) 573 if (abs(pos.right() - work_area.right()) < grid)
574 x = work_area.right() - w; 574 x = work_area.right() - w;
575 if (abs(pos.bottom() - work_area.bottom()) < grid) 575 if (abs(pos.bottom() - work_area.bottom()) < grid)
576 y = work_area.bottom() - h; 576 y = work_area.bottom() - h;
577 return gfx::Rect(x, y, w, h); 577 return gfx::Rect(x, y, w, h);
578 } 578 }
579 579
580 } // namespace ash 580 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698