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

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: Address DockLeft/DockRight issues Created 6 years, 2 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"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 UpdateShelfVisibility(); 257 UpdateShelfVisibility();
258 } 258 }
259 259
260 ////////////////////////////////////////////////////////////////////////////// 260 //////////////////////////////////////////////////////////////////////////////
261 // WorkspaceLayoutManager, wm::WindowStateObserver implementation: 261 // WorkspaceLayoutManager, wm::WindowStateObserver implementation:
262 262
263 void WorkspaceLayoutManager::OnPostWindowStateTypeChange( 263 void WorkspaceLayoutManager::OnPostWindowStateTypeChange(
264 wm::WindowState* window_state, 264 wm::WindowState* window_state,
265 wm::WindowStateType old_type) { 265 wm::WindowStateType old_type) {
266 266
267 aura::Window* window = window_state->window();
268 if (window_state->IsDocked()) {
varkha 2014/09/29 21:04:34 nit: no need for parens with one-liner.
dtapuska 2014/09/30 14:40:49 Done.
269 wm::DockWindow(window);
varkha 2014/09/29 21:04:34 Just inline window_state->window() here (it gets i
dtapuska 2014/09/30 14:40:49 Done.
270 }
271
267 // Notify observers that fullscreen state may be changing. 272 // Notify observers that fullscreen state may be changing.
268 if (window_state->IsFullscreen() || 273 if (window_state->IsFullscreen() ||
269 old_type == wm::WINDOW_STATE_TYPE_FULLSCREEN) { 274 old_type == wm::WINDOW_STATE_TYPE_FULLSCREEN) {
270 UpdateFullscreenState(); 275 UpdateFullscreenState();
271 } 276 }
272 277
273 UpdateShelfVisibility(); 278 UpdateShelfVisibility();
274 if (backdrop_delegate_) 279 if (backdrop_delegate_)
275 backdrop_delegate_->OnPostWindowStateTypeChange(window_state, old_type); 280 backdrop_delegate_->OnPostWindowStateTypeChange(window_state, old_type);
276 } 281 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 bool is_fullscreen = GetRootWindowController( 327 bool is_fullscreen = GetRootWindowController(
323 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; 328 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL;
324 if (is_fullscreen != is_fullscreen_) { 329 if (is_fullscreen != is_fullscreen_) {
325 ash::Shell::GetInstance()->NotifyFullscreenStateChange( 330 ash::Shell::GetInstance()->NotifyFullscreenStateChange(
326 is_fullscreen, window_->GetRootWindow()); 331 is_fullscreen, window_->GetRootWindow());
327 is_fullscreen_ = is_fullscreen; 332 is_fullscreen_ = is_fullscreen;
328 } 333 }
329 } 334 }
330 335
331 } // namespace ash 336 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698