Chromium Code Reviews| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 static_cast<int>(ash::AppType::CHROME_APP)); | 139 static_cast<int>(ash::AppType::CHROME_APP)); |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 | 142 |
| 143 void ChromeNativeAppWindowViewsAuraAsh::OnBeforeWidgetInit( | 143 void ChromeNativeAppWindowViewsAuraAsh::OnBeforeWidgetInit( |
| 144 const AppWindow::CreateParams& create_params, | 144 const AppWindow::CreateParams& create_params, |
| 145 views::Widget::InitParams* init_params, | 145 views::Widget::InitParams* init_params, |
| 146 views::Widget* widget) { | 146 views::Widget* widget) { |
| 147 ChromeNativeAppWindowViewsAura::OnBeforeWidgetInit(create_params, init_params, | 147 ChromeNativeAppWindowViewsAura::OnBeforeWidgetInit(create_params, init_params, |
| 148 widget); | 148 widget); |
| 149 if (create_params.is_ime_window) { | 149 if (create_params.is_ime_window || create_params.show_on_lock_screen) { |
| 150 // Put ime windows into the ime window container on the primary display. | 150 // Put ime windows and lock screen windows into their respective window |
|
benwells
2017/06/13 10:30:46
Nit: two spaces after respective
tbarzic
2017/06/13 19:17:59
Done.
| |
| 151 int container_id = ash::kShellWindowId_ImeWindowParentContainer; | 151 // containers on the primary display. |
| 152 int container_id = create_params.is_ime_window | |
| 153 ? ash::kShellWindowId_ImeWindowParentContainer | |
| 154 : ash::kShellWindowId_LockActionHandlerContainer; | |
| 152 if (ash_util::IsRunningInMash()) { | 155 if (ash_util::IsRunningInMash()) { |
| 153 init_params->mus_properties | 156 init_params->mus_properties |
| 154 [ui::mojom::WindowManager::kContainerId_InitProperty] = | 157 [ui::mojom::WindowManager::kContainerId_InitProperty] = |
| 155 mojo::ConvertTo<std::vector<uint8_t>>(container_id); | 158 mojo::ConvertTo<std::vector<uint8_t>>(container_id); |
| 156 int display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); | 159 int display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); |
| 157 init_params | 160 init_params |
| 158 ->mus_properties[ui::mojom::WindowManager::kDisplayId_InitProperty] = | 161 ->mus_properties[ui::mojom::WindowManager::kDisplayId_InitProperty] = |
| 159 mojo::ConvertTo<std::vector<uint8_t>>(display_id); | 162 mojo::ConvertTo<std::vector<uint8_t>>(display_id); |
| 160 } else { | 163 } else { |
| 161 init_params->parent = ash::Shell::GetContainer( | 164 init_params->parent = ash::Shell::GetContainer( |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 373 bool activate_on_pointer) { | 376 bool activate_on_pointer) { |
| 374 widget()->GetNativeWindow()->SetProperty(aura::client::kActivateOnPointerKey, | 377 widget()->GetNativeWindow()->SetProperty(aura::client::kActivateOnPointerKey, |
| 375 activate_on_pointer); | 378 activate_on_pointer); |
| 376 } | 379 } |
| 377 | 380 |
| 378 void ChromeNativeAppWindowViewsAuraAsh::OnMenuClosed() { | 381 void ChromeNativeAppWindowViewsAuraAsh::OnMenuClosed() { |
| 379 menu_runner_.reset(); | 382 menu_runner_.reset(); |
| 380 menu_model_adapter_.reset(); | 383 menu_model_adapter_.reset(); |
| 381 menu_model_.reset(); | 384 menu_model_.reset(); |
| 382 } | 385 } |
| OLD | NEW |