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 | |
61 bool IsWindowMaximized(aura::Window* window) { | 54 bool IsWindowMaximized(aura::Window* window) { |
62 return window->GetProperty(aura::client::kShowStateKey) == | 55 return window->GetProperty(aura::client::kShowStateKey) == |
63 ui::SHOW_STATE_MAXIMIZED; | 56 ui::SHOW_STATE_MAXIMIZED; |
64 } | 57 } |
65 | 58 |
66 bool IsWindowFullscreen(aura::Window* window) { | 59 bool IsWindowFullscreen(aura::Window* window) { |
67 return window->GetProperty(aura::client::kShowStateKey) == | 60 return window->GetProperty(aura::client::kShowStateKey) == |
68 ui::SHOW_STATE_FULLSCREEN; | 61 ui::SHOW_STATE_FULLSCREEN; |
69 } | 62 } |
70 | 63 |
(...skipping 18 matching lines...) Expand all Loading... |
89 void SetOpenWindowSplit(aura::Window* window, bool value) { | 82 void SetOpenWindowSplit(aura::Window* window, bool value) { |
90 window->SetProperty(kOpenWindowSplitKey, value); | 83 window->SetProperty(kOpenWindowSplitKey, value); |
91 } | 84 } |
92 | 85 |
93 bool GetOpenWindowSplit(aura::Window* window) { | 86 bool GetOpenWindowSplit(aura::Window* window) { |
94 return window->GetProperty(kOpenWindowSplitKey); | 87 return window->GetProperty(kOpenWindowSplitKey); |
95 } | 88 } |
96 | 89 |
97 } // namespace wm | 90 } // namespace wm |
98 } // namespace ash | 91 } // namespace ash |
OLD | NEW |