Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc

Issue 2934513003: Changes in app.window and app.runtime to support lock screen note taking (Closed)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/apps/chrome_app_window_client.cc ('k') | extensions/browser/api/app_window/app_window_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698