OLD | NEW |
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/common/wm/wm_types.h" | 5 #include "ash/common/wm/wm_types.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace ash { | 9 namespace ash { |
10 namespace wm { | 10 namespace wm { |
(...skipping 10 matching lines...) Expand all Loading... |
21 ui::WindowShowState ToWindowShowState(WindowStateType type) { | 21 ui::WindowShowState ToWindowShowState(WindowStateType type) { |
22 switch (type) { | 22 switch (type) { |
23 case WINDOW_STATE_TYPE_DEFAULT: | 23 case WINDOW_STATE_TYPE_DEFAULT: |
24 return ui::SHOW_STATE_DEFAULT; | 24 return ui::SHOW_STATE_DEFAULT; |
25 case WINDOW_STATE_TYPE_NORMAL: | 25 case WINDOW_STATE_TYPE_NORMAL: |
26 case WINDOW_STATE_TYPE_RIGHT_SNAPPED: | 26 case WINDOW_STATE_TYPE_RIGHT_SNAPPED: |
27 case WINDOW_STATE_TYPE_LEFT_SNAPPED: | 27 case WINDOW_STATE_TYPE_LEFT_SNAPPED: |
28 case WINDOW_STATE_TYPE_AUTO_POSITIONED: | 28 case WINDOW_STATE_TYPE_AUTO_POSITIONED: |
29 return ui::SHOW_STATE_NORMAL; | 29 return ui::SHOW_STATE_NORMAL; |
30 | 30 |
31 // TODO(afakhry): Remove Docked Windows in M58. | |
32 case WINDOW_STATE_TYPE_DOCKED: | |
33 return ui::SHOW_STATE_DOCKED; | |
34 case WINDOW_STATE_TYPE_MINIMIZED: | 31 case WINDOW_STATE_TYPE_MINIMIZED: |
35 case WINDOW_STATE_TYPE_DOCKED_MINIMIZED: | |
36 return ui::SHOW_STATE_MINIMIZED; | 32 return ui::SHOW_STATE_MINIMIZED; |
37 case WINDOW_STATE_TYPE_MAXIMIZED: | 33 case WINDOW_STATE_TYPE_MAXIMIZED: |
38 return ui::SHOW_STATE_MAXIMIZED; | 34 return ui::SHOW_STATE_MAXIMIZED; |
39 case WINDOW_STATE_TYPE_INACTIVE: | 35 case WINDOW_STATE_TYPE_INACTIVE: |
40 return ui::SHOW_STATE_INACTIVE; | 36 return ui::SHOW_STATE_INACTIVE; |
41 case WINDOW_STATE_TYPE_FULLSCREEN: | 37 case WINDOW_STATE_TYPE_FULLSCREEN: |
42 case WINDOW_STATE_TYPE_PINNED: | 38 case WINDOW_STATE_TYPE_PINNED: |
43 case WINDOW_STATE_TYPE_TRUSTED_PINNED: | 39 case WINDOW_STATE_TYPE_TRUSTED_PINNED: |
44 return ui::SHOW_STATE_FULLSCREEN; | 40 return ui::SHOW_STATE_FULLSCREEN; |
45 case WINDOW_STATE_TYPE_END: | 41 case WINDOW_STATE_TYPE_END: |
46 NOTREACHED(); | 42 NOTREACHED(); |
47 } | 43 } |
48 NOTREACHED(); | 44 NOTREACHED(); |
49 return ui::SHOW_STATE_DEFAULT; | 45 return ui::SHOW_STATE_DEFAULT; |
50 } | 46 } |
51 | 47 |
52 bool IsMaximizedOrFullscreenOrPinnedWindowStateType(WindowStateType type) { | 48 bool IsMaximizedOrFullscreenOrPinnedWindowStateType(WindowStateType type) { |
53 return type == WINDOW_STATE_TYPE_MAXIMIZED || | 49 return type == WINDOW_STATE_TYPE_MAXIMIZED || |
54 type == WINDOW_STATE_TYPE_FULLSCREEN || | 50 type == WINDOW_STATE_TYPE_FULLSCREEN || |
55 type == WINDOW_STATE_TYPE_PINNED || | 51 type == WINDOW_STATE_TYPE_PINNED || |
56 type == WINDOW_STATE_TYPE_TRUSTED_PINNED; | 52 type == WINDOW_STATE_TYPE_TRUSTED_PINNED; |
57 } | 53 } |
58 | 54 |
59 } // namespace wm | 55 } // namespace wm |
60 } // namespace ash | 56 } // namespace ash |
OLD | NEW |