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

Side by Side Diff: ash/wm/workspace/workspace_layout_manager.h

Issue 21979005: Make sure that 30%of restored window is always visible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: AdjustWindowBoundsWhenAdded Created 7 years, 4 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 | Annotate | Revision Log
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 #ifndef ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ 6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "ash/shell_observer.h" 10 #include "ash/shell_observer.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // Overriden from WindowObserver: 54 // Overriden from WindowObserver:
55 virtual void OnWindowPropertyChanged(aura::Window* window, 55 virtual void OnWindowPropertyChanged(aura::Window* window,
56 const void* key, 56 const void* key,
57 intptr_t old) OVERRIDE; 57 intptr_t old) OVERRIDE;
58 58
59 private: 59 private:
60 // Overridden from BaseLayoutManager: 60 // Overridden from BaseLayoutManager:
61 virtual void ShowStateChanged(aura::Window* window, 61 virtual void ShowStateChanged(aura::Window* window,
62 ui::WindowShowState last_show_state) OVERRIDE; 62 ui::WindowShowState last_show_state) OVERRIDE;
63 virtual void AdjustWindowSizesForScreenChange( 63 virtual void AdjustWindowsBoundsForWorkAreaChange(
64 AdjustWindowReason reason) OVERRIDE; 64 AdjustWindowReason reason) OVERRIDE;
65 virtual void AdjustWindowSizeForScreenChange( 65 virtual void AdjustWindowBoundsForWorkAreaChange(
66 aura::Window* window, 66 aura::Window* window,
67 AdjustWindowReason reason) OVERRIDE; 67 AdjustWindowReason reason) OVERRIDE;
68 68
69 void AdjustWindowBoundsWhenAdded(aura::Window* window);
70
69 void UpdateDesktopVisibility(); 71 void UpdateDesktopVisibility();
70 72
71 // Updates the bounds of the window from a show state change. 73 // Updates the bounds of the window from a show state change.
72 void UpdateBoundsFromShowState(aura::Window* window); 74 void UpdateBoundsFromShowState(aura::Window* window);
73 75
74 // If |window| is maximized or fullscreen the bounds of the window are set and 76 // If |window| is maximized or fullscreen the bounds of the window are set and
75 // true is returned. Does nothing otherwise. 77 // true is returned. Does nothing otherwise.
76 bool SetMaximizedOrFullscreenBounds(aura::Window* window); 78 bool SetMaximizedOrFullscreenBounds(aura::Window* window);
77 79
78 internal::ShelfLayoutManager* shelf_; 80 internal::ShelfLayoutManager* shelf_;
79 aura::Window* window_; 81 aura::Window* window_;
80 82
81 // The work area. Cached to avoid unnecessarily moving windows during a 83 // The work area. Cached to avoid unnecessarily moving windows during a
82 // workspace switch. 84 // workspace switch.
83 gfx::Rect work_area_; 85 gfx::Rect work_area_;
84 86
85 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); 87 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager);
86 }; 88 };
87 89
88 } // namespace internal 90 } // namespace internal
89 } // namespace ash 91 } // namespace ash
90 92
91 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ 93 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698