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

Side by Side Diff: ash/wm/workspace/workspace_layout_manager2.cc

Issue 10883069: Added restore functionality for maximize full/left/right (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test failure Created 8 years, 3 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
« no previous file with comments | « ash/wm/workspace/maximize_bubble_frame_state.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ash/wm/workspace/workspace_layout_manager2.h" 5 #include "ash/wm/workspace/workspace_layout_manager2.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/screen_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/wm/always_on_top_controller.h" 10 #include "ash/wm/always_on_top_controller.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 intptr_t old) { 129 intptr_t old) {
130 if (key == aura::client::kShowStateKey) { 130 if (key == aura::client::kShowStateKey) {
131 ui::WindowShowState old_state = static_cast<ui::WindowShowState>(old); 131 ui::WindowShowState old_state = static_cast<ui::WindowShowState>(old);
132 ui::WindowShowState new_state = 132 ui::WindowShowState new_state =
133 window->GetProperty(aura::client::kShowStateKey); 133 window->GetProperty(aura::client::kShowStateKey);
134 if (old_state == ui::SHOW_STATE_MINIMIZED) { 134 if (old_state == ui::SHOW_STATE_MINIMIZED) {
135 window->layer()->SetOpacity(1.0f); 135 window->layer()->SetOpacity(1.0f);
136 window->layer()->SetTransform(ui::Transform()); 136 window->layer()->SetTransform(ui::Transform());
137 } 137 }
138 if (old_state != ui::SHOW_STATE_MINIMIZED && 138 if (old_state != ui::SHOW_STATE_MINIMIZED &&
139 GetRestoreBoundsInScreen(window) == NULL &&
139 WorkspaceManager2::IsMaximizedState(new_state) && 140 WorkspaceManager2::IsMaximizedState(new_state) &&
140 !WorkspaceManager2::IsMaximizedState(old_state)) { 141 !WorkspaceManager2::IsMaximizedState(old_state)) {
141 SetRestoreBoundsInParent(window, window->bounds()); 142 SetRestoreBoundsInParent(window, window->bounds());
142 } 143 }
143 144
144 // If maximizing or restoring, clone the layer. WorkspaceManager will use it 145 // If maximizing or restoring, clone the layer. WorkspaceManager will use it
145 // (and take overship of it) when animating. Ideally we could use that of 146 // (and take overship of it) when animating. Ideally we could use that of
146 // BaseLayoutManager, but that proves problematic. In particular when 147 // BaseLayoutManager, but that proves problematic. In particular when
147 // restoring we need to animate on top of the workspace animating in. 148 // restoring we need to animate on top of the workspace animating in.
148 ui::Layer* cloned_layer = NULL; 149 ui::Layer* cloned_layer = NULL;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 274 }
274 return false; 275 return false;
275 } 276 }
276 277
277 WorkspaceManager2* WorkspaceLayoutManager2::workspace_manager() { 278 WorkspaceManager2* WorkspaceLayoutManager2::workspace_manager() {
278 return workspace_->workspace_manager(); 279 return workspace_->workspace_manager();
279 } 280 }
280 281
281 } // namespace internal 282 } // namespace internal
282 } // namespace ash 283 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/maximize_bubble_frame_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698