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

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

Issue 9467021: Attempt 3: Makes managed mode constrain the height of windows so they don't (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Da fix Created 8 years, 10 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/workspace_layout_manager.h ('k') | ash/wm/workspace/workspace_window_resizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_layout_manager.cc
diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc
index a705059d824bd8cae644b19cb516eedd0703378d..bbe26f571e8d50d95b192feeeadaefd1b86c3b02 100644
--- a/ash/wm/workspace/workspace_layout_manager.cc
+++ b/ash/wm/workspace/workspace_layout_manager.cc
@@ -31,38 +31,6 @@ WorkspaceLayoutManager::WorkspaceLayoutManager(
WorkspaceLayoutManager::~WorkspaceLayoutManager() {}
-void WorkspaceLayoutManager::PrepareForMoveOrResize(
- aura::Window* drag,
- aura::MouseEvent* event) {
-}
-
-void WorkspaceLayoutManager::CancelMoveOrResize(
- aura::Window* drag,
- aura::MouseEvent* event) {
-}
-
-void WorkspaceLayoutManager::ProcessMove(
- aura::Window* drag,
- aura::MouseEvent* event) {
- // TODO: needs implementation for TYPE_SPLIT. For TYPE_SPLIT I want to
- // disallow eventfilter from moving and instead deal with it here.
-}
-
-void WorkspaceLayoutManager::EndMove(
- aura::Window* drag,
- aura::MouseEvent* evnet) {
- // TODO: see comment in ProcessMove.
-}
-
-void WorkspaceLayoutManager::EndResize(
- aura::Window* drag,
- aura::MouseEvent* evnet) {
- // TODO: see comment in ProcessMove.
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// WorkspaceLayoutManager, aura::LayoutManager implementation:
-
void WorkspaceLayoutManager::OnWindowResized() {
// Workspace is updated via RootWindowObserver::OnRootWindowResized.
}
@@ -112,10 +80,14 @@ void WorkspaceLayoutManager::SetChildBounds(
aura::Window* child,
const gfx::Rect& requested_bounds) {
gfx::Rect child_bounds(requested_bounds);
- if (window_util::IsWindowMaximized(child))
+ if (window_util::IsWindowMaximized(child)) {
child_bounds = gfx::Screen::GetMonitorWorkAreaNearestWindow(child);
- else if (window_util::IsWindowFullscreen(child))
+ } else if (window_util::IsWindowFullscreen(child)) {
child_bounds = gfx::Screen::GetMonitorAreaNearestWindow(child);
+ } else {
+ child_bounds = gfx::Screen::GetMonitorWorkAreaNearestWindow(child).
+ AdjustToFit(requested_bounds);
+ }
SetChildBoundsDirect(child, child_bounds);
}
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager.h ('k') | ash/wm/workspace/workspace_window_resizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698