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

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: 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 AdjustWindowsBounds(AdjustWindowReason reason) OVERRIDE;
64 AdjustWindowReason reason) OVERRIDE; 64 virtual void AdjustWindowBounds(aura::Window* window,
65 virtual void AdjustWindowSizeForScreenChange( 65 AdjustWindowReason reason) OVERRIDE;
66 aura::Window* window,
67 AdjustWindowReason reason) OVERRIDE;
68 66
69 void UpdateDesktopVisibility(); 67 void UpdateDesktopVisibility();
70 68
71 // Updates the bounds of the window from a show state change. 69 // Updates the bounds of the window from a show state change.
72 void UpdateBoundsFromShowState(aura::Window* window); 70 void UpdateBoundsFromShowState(aura::Window* window);
73 71
74 // If |window| is maximized or fullscreen the bounds of the window are set and 72 // If |window| is maximized or fullscreen the bounds of the window are set and
75 // true is returned. Does nothing otherwise. 73 // true is returned. Does nothing otherwise.
76 bool SetMaximizedOrFullscreenBounds(aura::Window* window); 74 bool SetMaximizedOrFullscreenBounds(aura::Window* window);
77 75
78 internal::ShelfLayoutManager* shelf_; 76 internal::ShelfLayoutManager* shelf_;
79 aura::Window* window_; 77 aura::Window* window_;
80 78
81 // The work area. Cached to avoid unnecessarily moving windows during a 79 // The work area. Cached to avoid unnecessarily moving windows during a
82 // workspace switch. 80 // workspace switch.
83 gfx::Rect work_area_; 81 gfx::Rect work_area_;
84 82
85 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); 83 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager);
86 }; 84 };
87 85
88 } // namespace internal 86 } // namespace internal
89 } // namespace ash 87 } // namespace ash
90 88
91 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ 89 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698