Chromium Code Reviews| Index: ash/mus/container_ids.cc |
| diff --git a/ash/mus/container_ids.cc b/ash/mus/container_ids.cc |
| index 3d95fea3db3e0143f12f1aa4df02e27ec6098539..2829a24491fedc0906bbc68f5d1c1b8066bf8eb6 100644 |
| --- a/ash/mus/container_ids.cc |
| +++ b/ash/mus/container_ids.cc |
| @@ -12,137 +12,51 @@ using ash::mojom::Container; |
| namespace ash { |
| namespace mus { |
| -const Container kActivationContainers[] = { |
| - // TODO(sky): figure out right set of containers. I suspect this should be |
| - // all non containers. |
| - Container::USER_PRIVATE_WINDOWS, |
| - Container::USER_PRIVATE_ALWAYS_ON_TOP_WINDOWS, |
| - Container::USER_PRIVATE_DOCKED_WINDOWS, |
| - Container::USER_PRIVATE_PRESENTATION_WINDOWS, |
| - Container::USER_PRIVATE_PANELS, Container::USER_PRIVATE_APP_LIST, |
| - Container::USER_PRIVATE_SYSTEM_MODAL, Container::LOGIN, |
| - // Bubble windows must be allowed to activate because some of them rely on |
| - // deactivation to close. |
| - Container::BUBBLES, |
| +const int kActivationContainers[] = { |
| + kShellWindowId_VirtualKeyboardContainer, |
| + kShellWindowId_DefaultContainer, |
| + kShellWindowId_AlwaysOnTopContainer, |
| + kShellWindowId_DockedContainer, |
| + kShellWindowId_ShelfContainer, |
| + kShellWindowId_ShelfBubbleContainer, |
| + kShellWindowId_PanelContainer, |
| + kShellWindowId_AppListContainer, |
| + kShellWindowId_SystemModalContainer, |
| + kShellWindowId_LockScreenContainer, |
| + kShellWindowId_LockSystemModalContainer, |
| + kShellWindowId_StatusContainer, |
| + kShellWindowId_ImeWindowParentContainer, |
| + kShellWindowId_MenuContainer, |
| + kShellWindowId_SettingBubbleContainer, |
| + kShellWindowId_OverlayContainer, |
|
James Cook
2016/06/03 00:24:58
Where does this list come from? Does the order mat
sky
2016/06/03 03:07:03
Good call. They should be the same. updated.
|
| }; |
| const size_t kNumActivationContainers = arraysize(kActivationContainers); |
| -Container AshContainerToMashContainer(int ash_id) { |
| - switch (ash_id) { |
| - case kShellWindowId_UnparentedControlContainer: |
| - case kShellWindowId_LockScreenContainer: |
| - case kShellWindowId_LockSystemModalContainer: |
| - // We should never be asked to parent windows of these types. |
| - NOTREACHED(); |
| - return Container::USER_PRIVATE; |
| - |
| - case kShellWindowId_DefaultContainer: |
| - return Container::USER_PRIVATE_WINDOWS; |
| - |
| - case kShellWindowId_AlwaysOnTopContainer: |
| - return Container::USER_PRIVATE_ALWAYS_ON_TOP_WINDOWS; |
| - |
| - case kShellWindowId_DockedContainer: |
| - return Container::USER_PRIVATE_DOCKED_WINDOWS; |
| - |
| - case kShellWindowId_ShelfContainer: |
| - return Container::USER_PRIVATE_SHELF; |
| - |
| - case kShellWindowId_PanelContainer: |
| - return Container::USER_PRIVATE_PANELS; |
| - |
| - case kShellWindowId_AppListContainer: |
| - return Container::USER_PRIVATE_APP_LIST; |
| - |
| - case kShellWindowId_SystemModalContainer: |
| - return Container::USER_PRIVATE_SYSTEM_MODAL; |
| - |
| - case kShellWindowId_MenuContainer: |
| - return Container::MENUS; |
| - |
| - case kShellWindowId_DragImageAndTooltipContainer: |
| - return Container::DRAG_AND_TOOLTIPS; |
| - |
| - default: |
| - NOTREACHED(); |
| - } |
| - return Container::USER_PRIVATE_WINDOWS; |
| -} |
| - |
| -int MashContainerToAshContainer(Container container) { |
| +int MashContainerToAshShellWindowId(Container container) { |
| switch (container) { |
| - case Container::ROOT: |
| - return kUnknownAshId; |
| - |
| - case Container::ALL_USER_BACKGROUND: |
| - return kUnknownAshId; |
| - |
| - case Container::USER: |
| - return kUnknownAshId; |
| - |
| case Container::USER_BACKGROUND: |
| - return kUnknownAshId; |
| - |
| - case Container::USER_PRIVATE: |
| - return kUnknownAshId; |
| - |
| - case Container::USER_PRIVATE_WINDOWS: |
| - return kShellWindowId_DefaultContainer; |
| - |
| - case Container::USER_PRIVATE_ALWAYS_ON_TOP_WINDOWS: |
| - return kShellWindowId_AlwaysOnTopContainer; |
| - |
| - case Container::USER_PRIVATE_DOCKED_WINDOWS: |
| - return kShellWindowId_DockedContainer; |
| - |
| - case Container::USER_PRIVATE_PRESENTATION_WINDOWS: |
| - return kUnknownAshId; |
| + return kShellWindowId_DesktopBackgroundContainer; |
| case Container::USER_PRIVATE_SHELF: |
| return kShellWindowId_ShelfContainer; |
| - case Container::USER_PRIVATE_PANELS: |
| - return kShellWindowId_PanelContainer; |
| - |
| - case Container::USER_PRIVATE_APP_LIST: |
| - return kShellWindowId_AppListContainer; |
| - |
| - case Container::USER_PRIVATE_SYSTEM_MODAL: |
| - return kShellWindowId_SystemModalContainer; |
| - |
| - case Container::LOGIN: |
| - return kUnknownAshId; |
| - |
| case Container::LOGIN_WINDOWS: |
| - return kUnknownAshId; |
| - |
| - case Container::LOGIN_APP: |
| - return kUnknownAshId; |
| - |
| - case Container::LOGIN_SHELF: |
| - return kUnknownAshId; |
| + return kShellWindowId_LockScreenContainer; |
| case Container::STATUS: |
| - return kUnknownAshId; |
| + return kShellWindowId_StatusContainer; |
| case Container::BUBBLES: |
| - return kUnknownAshId; |
| - |
| - case Container::SYSTEM_MODAL_WINDOWS: |
| - return kUnknownAshId; |
| - |
| - case Container::KEYBOARD: |
| - return kUnknownAshId; |
| + // TODO(sky): this mapping isn't right, but BUBBLES should go away once |
| + // http://crbug.com/616859 lands. |
| + return kShellWindowId_SettingBubbleContainer; |
| case Container::MENUS: |
| return kShellWindowId_MenuContainer; |
| case Container::DRAG_AND_TOOLTIPS: |
| return kShellWindowId_DragImageAndTooltipContainer; |
| - |
| - case Container::COUNT: |
| - return kUnknownAshId; |
| } |
| return kUnknownAshId; |
| } |