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

Side by Side Diff: ash/wm/window_state.cc

Issue 38073004: Not moving a docked window when restoring a previously maximized window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Not moving a docked window when restoring a previously maximized window (IsDocked moved to namespac… Created 7 years, 1 month 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
« no previous file with comments | « ash/wm/window_state.h ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/window_state.h" 5 #include "ash/wm/window_state.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/window_properties.h" 10 #include "ash/wm/window_properties.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 bool WindowState::IsNormalShowState() const { 69 bool WindowState::IsNormalShowState() const {
70 ui::WindowShowState state = window_->GetProperty(aura::client::kShowStateKey); 70 ui::WindowShowState state = window_->GetProperty(aura::client::kShowStateKey);
71 return state == ui::SHOW_STATE_NORMAL || state == ui::SHOW_STATE_DEFAULT; 71 return state == ui::SHOW_STATE_NORMAL || state == ui::SHOW_STATE_DEFAULT;
72 } 72 }
73 73
74 bool WindowState::IsActive() const { 74 bool WindowState::IsActive() const {
75 return IsActiveWindow(window_); 75 return IsActiveWindow(window_);
76 } 76 }
77 77
78 bool WindowState::IsDocked() const {
79 return window_->parent() &&
80 window_->parent()->id() == internal::kShellWindowId_DockedContainer;
81 }
82
78 bool WindowState::CanMaximize() const { 83 bool WindowState::CanMaximize() const {
79 return window_->GetProperty(aura::client::kCanMaximizeKey); 84 return window_->GetProperty(aura::client::kCanMaximizeKey);
80 } 85 }
81 86
82 bool WindowState::CanMinimize() const { 87 bool WindowState::CanMinimize() const {
83 internal::RootWindowController* controller = 88 internal::RootWindowController* controller =
84 internal::RootWindowController::ForWindow(window_); 89 internal::RootWindowController::ForWindow(window_);
85 if (!controller) 90 if (!controller)
86 return false; 91 return false;
87 aura::Window* lockscreen = controller->GetContainer( 92 aura::Window* lockscreen = controller->GetContainer(
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 276 }
272 return settings; 277 return settings;
273 } 278 }
274 279
275 const WindowState* GetWindowState(const aura::Window* window) { 280 const WindowState* GetWindowState(const aura::Window* window) {
276 return GetWindowState(const_cast<aura::Window*>(window)); 281 return GetWindowState(const_cast<aura::Window*>(window));
277 } 282 }
278 283
279 } // namespace wm 284 } // namespace wm
280 } // namespace ash 285 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_state.h ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698