| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/aura_shell/workspace/workspace.h" | 5 #include "ui/aura_shell/workspace/workspace.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 } | 218 } |
| 219 workspace_manager_->set_layout_in_progress(false); | 219 workspace_manager_->set_layout_in_progress(false); |
| 220 } | 220 } |
| 221 | 221 |
| 222 bool Workspace::ContainsFullscreenWindow() const { | 222 bool Workspace::ContainsFullscreenWindow() const { |
| 223 for (aura::Window::Windows::const_iterator i = windows_.begin(); | 223 for (aura::Window::Windows::const_iterator i = windows_.begin(); |
| 224 i != windows_.end(); | 224 i != windows_.end(); |
| 225 ++i) { | 225 ++i) { |
| 226 aura::Window* w = *i; | 226 aura::Window* w = *i; |
| 227 if (w->IsVisible() && | 227 if (w->IsVisible() && |
| 228 w->GetIntProperty(aura::kShowStateKey) == ui::SHOW_STATE_FULLSCREEN) | 228 w->GetIntProperty(aura::client::kShowStateKey) == |
| 229 ui::SHOW_STATE_FULLSCREEN) |
| 229 return true; | 230 return true; |
| 230 } | 231 } |
| 231 return false; | 232 return false; |
| 232 } | 233 } |
| 233 | 234 |
| 234 int Workspace::GetIndexOf(aura::Window* window) const { | 235 int Workspace::GetIndexOf(aura::Window* window) const { |
| 235 aura::Window::Windows::const_iterator i = | 236 aura::Window::Windows::const_iterator i = |
| 236 std::find(windows_.begin(), windows_.end(), window); | 237 std::find(windows_.begin(), windows_.end(), window); |
| 237 return i == windows_.end() ? -1 : i - windows_.begin(); | 238 return i == windows_.end() ? -1 : i - windows_.begin(); |
| 238 } | 239 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 277 |
| 277 // static | 278 // static |
| 278 size_t Workspace::SetMaxWindowsCount(size_t max) { | 279 size_t Workspace::SetMaxWindowsCount(size_t max) { |
| 279 int old = g_max_windows_per_workspace; | 280 int old = g_max_windows_per_workspace; |
| 280 g_max_windows_per_workspace = max; | 281 g_max_windows_per_workspace = max; |
| 281 return old; | 282 return old; |
| 282 } | 283 } |
| 283 | 284 |
| 284 } // namespace internal | 285 } // namespace internal |
| 285 } // namespace aura_shell | 286 } // namespace aura_shell |
| OLD | NEW |