OLD | NEW |
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/window_util.h" | 5 #include "ash/wm/window_util.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/wm/activation_controller.h" | 8 #include "ash/wm/activation_controller.h" |
9 #include "ui/aura/client/activation_client.h" | 9 #include "ui/aura/client/activation_client.h" |
10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 aura::Window* GetActiveWindow() { | 45 aura::Window* GetActiveWindow() { |
46 return aura::client::GetActivationClient(Shell::GetRootWindow())-> | 46 return aura::client::GetActivationClient(Shell::GetRootWindow())-> |
47 GetActiveWindow(); | 47 GetActiveWindow(); |
48 } | 48 } |
49 | 49 |
50 aura::Window* GetActivatableWindow(aura::Window* window) { | 50 aura::Window* GetActivatableWindow(aura::Window* window) { |
51 return internal::ActivationController::GetActivatableWindow(window); | 51 return internal::ActivationController::GetActivatableWindow(window); |
52 } | 52 } |
53 | 53 |
| 54 bool IsWindowNormal(aura::Window* window) { |
| 55 return window->GetProperty(aura::client::kShowStateKey) == |
| 56 ui::SHOW_STATE_NORMAL || |
| 57 window->GetProperty(aura::client::kShowStateKey) == |
| 58 ui::SHOW_STATE_DEFAULT; |
| 59 } |
| 60 |
54 bool IsWindowMaximized(aura::Window* window) { | 61 bool IsWindowMaximized(aura::Window* window) { |
55 return window->GetProperty(aura::client::kShowStateKey) == | 62 return window->GetProperty(aura::client::kShowStateKey) == |
56 ui::SHOW_STATE_MAXIMIZED; | 63 ui::SHOW_STATE_MAXIMIZED; |
57 } | 64 } |
58 | 65 |
59 bool IsWindowFullscreen(aura::Window* window) { | 66 bool IsWindowFullscreen(aura::Window* window) { |
60 return window->GetProperty(aura::client::kShowStateKey) == | 67 return window->GetProperty(aura::client::kShowStateKey) == |
61 ui::SHOW_STATE_FULLSCREEN; | 68 ui::SHOW_STATE_FULLSCREEN; |
62 } | 69 } |
63 | 70 |
(...skipping 18 matching lines...) Expand all Loading... |
82 void SetOpenWindowSplit(aura::Window* window, bool value) { | 89 void SetOpenWindowSplit(aura::Window* window, bool value) { |
83 window->SetProperty(kOpenWindowSplitKey, value); | 90 window->SetProperty(kOpenWindowSplitKey, value); |
84 } | 91 } |
85 | 92 |
86 bool GetOpenWindowSplit(aura::Window* window) { | 93 bool GetOpenWindowSplit(aura::Window* window) { |
87 return window->GetProperty(kOpenWindowSplitKey); | 94 return window->GetProperty(kOpenWindowSplitKey); |
88 } | 95 } |
89 | 96 |
90 } // namespace wm | 97 } // namespace wm |
91 } // namespace ash | 98 } // namespace ash |
OLD | NEW |