OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.h
" | 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.h
" |
6 | 6 |
7 #include "apps/ui/views/app_window_frame_view.h" | 7 #include "apps/ui/views/app_window_frame_view.h" |
8 #include "ash/ash_constants.h" | 8 #include "ash/ash_constants.h" |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/frame/custom_frame_view_ash.h" | 10 #include "ash/frame/custom_frame_view_ash.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 static_cast<int>(ash::AppType::CHROME_APP)); | 133 static_cast<int>(ash::AppType::CHROME_APP)); |
134 } | 134 } |
135 } | 135 } |
136 | 136 |
137 void ChromeNativeAppWindowViewsAuraAsh::OnBeforeWidgetInit( | 137 void ChromeNativeAppWindowViewsAuraAsh::OnBeforeWidgetInit( |
138 const AppWindow::CreateParams& create_params, | 138 const AppWindow::CreateParams& create_params, |
139 views::Widget::InitParams* init_params, | 139 views::Widget::InitParams* init_params, |
140 views::Widget* widget) { | 140 views::Widget* widget) { |
141 ChromeNativeAppWindowViewsAura::OnBeforeWidgetInit(create_params, init_params, | 141 ChromeNativeAppWindowViewsAura::OnBeforeWidgetInit(create_params, init_params, |
142 widget); | 142 widget); |
143 if (create_params.is_ime_window) { | 143 if (create_params.is_ime_window || create_params.show_on_lock_screen) { |
144 // Put ime windows into the ime window container on the primary display. | 144 // Put ime windows and lock screen windows into their respective window |
145 int container_id = ash::kShellWindowId_ImeWindowParentContainer; | 145 // containers on the primary display. |
| 146 int container_id = create_params.is_ime_window |
| 147 ? ash::kShellWindowId_ImeWindowParentContainer |
| 148 : ash::kShellWindowId_LockActionHandlerContainer; |
146 if (ash_util::IsRunningInMash()) { | 149 if (ash_util::IsRunningInMash()) { |
147 init_params->mus_properties | 150 init_params->mus_properties |
148 [ui::mojom::WindowManager::kContainerId_InitProperty] = | 151 [ui::mojom::WindowManager::kContainerId_InitProperty] = |
149 mojo::ConvertTo<std::vector<uint8_t>>(container_id); | 152 mojo::ConvertTo<std::vector<uint8_t>>(container_id); |
150 int display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); | 153 int display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); |
151 init_params | 154 init_params |
152 ->mus_properties[ui::mojom::WindowManager::kDisplayId_InitProperty] = | 155 ->mus_properties[ui::mojom::WindowManager::kDisplayId_InitProperty] = |
153 mojo::ConvertTo<std::vector<uint8_t>>(display_id); | 156 mojo::ConvertTo<std::vector<uint8_t>>(display_id); |
154 } else { | 157 } else { |
155 init_params->parent = ash::Shell::GetContainer( | 158 init_params->parent = ash::Shell::GetContainer( |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 bool activate_on_pointer) { | 362 bool activate_on_pointer) { |
360 widget()->GetNativeWindow()->SetProperty(aura::client::kActivateOnPointerKey, | 363 widget()->GetNativeWindow()->SetProperty(aura::client::kActivateOnPointerKey, |
361 activate_on_pointer); | 364 activate_on_pointer); |
362 } | 365 } |
363 | 366 |
364 void ChromeNativeAppWindowViewsAuraAsh::OnMenuClosed() { | 367 void ChromeNativeAppWindowViewsAuraAsh::OnMenuClosed() { |
365 menu_runner_.reset(); | 368 menu_runner_.reset(); |
366 menu_model_adapter_.reset(); | 369 menu_model_adapter_.reset(); |
367 menu_model_.reset(); | 370 menu_model_.reset(); |
368 } | 371 } |
OLD | NEW |