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

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 varkha's comments in #7 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 if (window_state->IsDocked())
268 wm::DockWindow(window_state->window());
varkha 2014/10/01 19:08:51 I assume this can never get called when the window
dtapuska 2014/10/01 20:17:42 No I don't believe so. The listeners are removed w
269
267 // Notify observers that fullscreen state may be changing. 270 // Notify observers that fullscreen state may be changing.
268 if (window_state->IsFullscreen() || 271 if (window_state->IsFullscreen() ||
269 old_type == wm::WINDOW_STATE_TYPE_FULLSCREEN) { 272 old_type == wm::WINDOW_STATE_TYPE_FULLSCREEN) {
270 UpdateFullscreenState(); 273 UpdateFullscreenState();
271 } 274 }
272 275
273 UpdateShelfVisibility(); 276 UpdateShelfVisibility();
274 if (backdrop_delegate_) 277 if (backdrop_delegate_)
275 backdrop_delegate_->OnPostWindowStateTypeChange(window_state, old_type); 278 backdrop_delegate_->OnPostWindowStateTypeChange(window_state, old_type);
276 } 279 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 bool is_fullscreen = GetRootWindowController( 325 bool is_fullscreen = GetRootWindowController(
323 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; 326 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL;
324 if (is_fullscreen != is_fullscreen_) { 327 if (is_fullscreen != is_fullscreen_) {
325 ash::Shell::GetInstance()->NotifyFullscreenStateChange( 328 ash::Shell::GetInstance()->NotifyFullscreenStateChange(
326 is_fullscreen, window_->GetRootWindow()); 329 is_fullscreen, window_->GetRootWindow());
327 is_fullscreen_ = is_fullscreen; 330 is_fullscreen_ = is_fullscreen;
328 } 331 }
329 } 332 }
330 333
331 } // namespace ash 334 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698