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

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

Issue 594383002: Change behaviour of the Alt-] and Alt-[ keys so that it cycles through SnapLeft/SnapRight to DockLe… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@event
Patch Set: Created 6 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
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_manager.h" 5 #include "ash/wm/workspace/workspace_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/display/display_controller.h" 9 #include "ash/display/display_controller.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
11 #include "ash/screen_util.h" 11 #include "ash/screen_util.h"
12 #include "ash/session/session_state_delegate.h" 12 #include "ash/session/session_state_delegate.h"
13 #include "ash/shelf/shelf_layout_manager.h" 13 #include "ash/shelf/shelf_layout_manager.h"
14 #include "ash/shell.h" 14 #include "ash/shell.h"
15 #include "ash/shell_window_ids.h"
15 #include "ash/wm/always_on_top_controller.h" 16 #include "ash/wm/always_on_top_controller.h"
16 #include "ash/wm/window_animations.h" 17 #include "ash/wm/window_animations.h"
17 #include "ash/wm/window_positioner.h" 18 #include "ash/wm/window_positioner.h"
18 #include "ash/wm/window_properties.h" 19 #include "ash/wm/window_properties.h"
19 #include "ash/wm/window_state.h" 20 #include "ash/wm/window_state.h"
20 #include "ash/wm/window_util.h" 21 #include "ash/wm/window_util.h"
21 #include "ash/wm/wm_event.h" 22 #include "ash/wm/wm_event.h"
22 #include "ash/wm/workspace/workspace_layout_manager_delegate.h" 23 #include "ash/wm/workspace/workspace_layout_manager_delegate.h"
23 #include "ui/aura/client/aura_constants.h" 24 #include "ui/aura/client/aura_constants.h"
24 #include "ui/aura/window.h" 25 #include "ui/aura/window.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 window_state->Unminimize(); 254 window_state->Unminimize();
254 DCHECK(!window_state->IsMinimized()); 255 DCHECK(!window_state->IsMinimized());
255 } 256 }
256 UpdateFullscreenState(); 257 UpdateFullscreenState();
257 UpdateShelfVisibility(); 258 UpdateShelfVisibility();
258 } 259 }
259 260
260 ////////////////////////////////////////////////////////////////////////////// 261 //////////////////////////////////////////////////////////////////////////////
261 // WorkspaceLayoutManager, wm::WindowStateObserver implementation: 262 // WorkspaceLayoutManager, wm::WindowStateObserver implementation:
262 263
264 void WorkspaceLayoutManager::OnPreWindowStateTypeChange(
varkha 2014/09/24 03:16:23 Can this code be placed in some place that is dock
dtapuska 2014/09/25 23:27:09 see comment in panel_layout_manager.cc
265 wm::WindowState* window_state,
266 wm::WindowStateType old_type) {
267 aura::Window* window = window_state->window();
268 if (window_state->IsDocked()) {
269 // Reparent the window into the docked windows container in order to get it
270 // on top of other docked windows.
271 aura::Window* docked_container = Shell::GetContainer(
272 window->GetRootWindow(),
273 kShellWindowId_DockedContainer);
274 wm::ReparentChildWithTransientChildren(window,
275 window->parent(),
276 docked_container);
277 }
278 }
279
263 void WorkspaceLayoutManager::OnPostWindowStateTypeChange( 280 void WorkspaceLayoutManager::OnPostWindowStateTypeChange(
264 wm::WindowState* window_state, 281 wm::WindowState* window_state,
265 wm::WindowStateType old_type) { 282 wm::WindowStateType old_type) {
266 283
267 // Notify observers that fullscreen state may be changing. 284 // Notify observers that fullscreen state may be changing.
268 if (window_state->IsFullscreen() || 285 if (window_state->IsFullscreen() ||
269 old_type == wm::WINDOW_STATE_TYPE_FULLSCREEN) { 286 old_type == wm::WINDOW_STATE_TYPE_FULLSCREEN) {
270 UpdateFullscreenState(); 287 UpdateFullscreenState();
271 } 288 }
272 289
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 bool is_fullscreen = GetRootWindowController( 339 bool is_fullscreen = GetRootWindowController(
323 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; 340 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL;
324 if (is_fullscreen != is_fullscreen_) { 341 if (is_fullscreen != is_fullscreen_) {
325 ash::Shell::GetInstance()->NotifyFullscreenStateChange( 342 ash::Shell::GetInstance()->NotifyFullscreenStateChange(
326 is_fullscreen, window_->GetRootWindow()); 343 is_fullscreen, window_->GetRootWindow());
327 is_fullscreen_ = is_fullscreen; 344 is_fullscreen_ = is_fullscreen;
328 } 345 }
329 } 346 }
330 347
331 } // namespace ash 348 } // namespace ash
OLDNEW
« ash/wm/panels/panel_layout_manager.cc ('K') | « ash/wm/workspace/workspace_layout_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698