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

Side by Side Diff: ash/common/wm/maximize_mode/maximize_mode_window_manager.cc

Issue 2822613004: [M58] ash: Do not constrain window bounds if requested (Closed)
Patch Set: Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/common/wm/maximize_mode/maximize_mode_window_manager.h" 5 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
9 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h" 9 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h"
10 #include "ash/common/wm/maximize_mode/maximize_mode_window_state.h" 10 #include "ash/common/wm/maximize_mode/maximize_mode_window_state.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // not managed by us. 264 // not managed by us.
265 if (window->IsAlwaysOnTop()) 265 if (window->IsAlwaysOnTop())
266 return false; 266 return false;
267 267
268 // Windows in the dock should not be managed by us. 268 // Windows in the dock should not be managed by us.
269 if (window->GetWindowState()->IsDocked()) 269 if (window->GetWindowState()->IsDocked())
270 return false; 270 return false;
271 271
272 // If the changing bounds in the maximized/fullscreen is allowed, then 272 // If the changing bounds in the maximized/fullscreen is allowed, then
273 // let the client manage it even in maximized mode. 273 // let the client manage it even in maximized mode.
274 if (window->GetWindowState()->allow_set_bounds_in_maximized()) 274 if (window->GetWindowState()->allow_set_bounds_direct())
275 return false; 275 return false;
276 276
277 return window->GetType() == ui::wm::WINDOW_TYPE_NORMAL; 277 return window->GetType() == ui::wm::WINDOW_TYPE_NORMAL;
278 } 278 }
279 279
280 void MaximizeModeWindowManager::AddWindowCreationObservers() { 280 void MaximizeModeWindowManager::AddWindowCreationObservers() {
281 DCHECK(observed_container_windows_.empty()); 281 DCHECK(observed_container_windows_.empty());
282 // Observe window activations/creations in the default containers on all root 282 // Observe window activations/creations in the default containers on all root
283 // windows. 283 // windows.
284 for (aura::Window* root : Shell::GetInstance()->GetAllRootWindows()) { 284 for (aura::Window* root : Shell::GetInstance()->GetAllRootWindows()) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 RootWindowController* controller = root->GetRootWindowController(); 324 RootWindowController* controller = root->GetRootWindowController();
325 WmWindow* default_container = 325 WmWindow* default_container =
326 root->GetChildByShellWindowId(kShellWindowId_DefaultContainer); 326 root->GetChildByShellWindowId(kShellWindowId_DefaultContainer);
327 controller->workspace_controller()->SetMaximizeBackdropDelegate( 327 controller->workspace_controller()->SetMaximizeBackdropDelegate(
328 enable ? base::MakeUnique<WorkspaceBackdropDelegate>(default_container) 328 enable ? base::MakeUnique<WorkspaceBackdropDelegate>(default_container)
329 : nullptr); 329 : nullptr);
330 } 330 }
331 } 331 }
332 332
333 } // namespace ash 333 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/default_state.cc ('k') | ash/common/wm/maximize_mode/maximize_mode_window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698