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

Side by Side Diff: chrome/browser/chromeos/login/ui/login_display_host_impl.cc

Issue 2430593002: mash: Use ash shell window container ids instead of ash::mojom::Container (Closed)
Patch Set: rebase Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/login/ui/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/shell_window_ids.h"
11 #include "ash/common/wallpaper/wallpaper_controller.h" 10 #include "ash/common/wallpaper/wallpaper_controller.h"
12 #include "ash/common/wallpaper/wallpaper_delegate.h" 11 #include "ash/common/wallpaper/wallpaper_delegate.h"
13 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
14 #include "ash/public/interfaces/container.mojom.h" 13 #include "ash/public/cpp/shell_window_ids.h"
15 #include "ash/shell.h" 14 #include "ash/shell.h"
16 #include "base/bind.h" 15 #include "base/bind.h"
17 #include "base/command_line.h" 16 #include "base/command_line.h"
18 #include "base/location.h" 17 #include "base/location.h"
19 #include "base/logging.h" 18 #include "base/logging.h"
20 #include "base/macros.h" 19 #include "base/macros.h"
21 #include "base/single_thread_task_runner.h" 20 #include "base/single_thread_task_runner.h"
22 #include "base/strings/string_split.h" 21 #include "base/strings/string_split.h"
23 #include "base/strings/utf_string_conversions.h" 22 #include "base/strings/utf_string_conversions.h"
24 #include "base/threading/thread_restrictions.h" 23 #include "base/threading/thread_restrictions.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #include "components/prefs/pref_service.h" 81 #include "components/prefs/pref_service.h"
83 #include "components/session_manager/core/session_manager.h" 82 #include "components/session_manager/core/session_manager.h"
84 #include "components/user_manager/user.h" 83 #include "components/user_manager/user.h"
85 #include "components/user_manager/user_manager.h" 84 #include "components/user_manager/user_manager.h"
86 #include "content/public/browser/notification_service.h" 85 #include "content/public/browser/notification_service.h"
87 #include "content/public/browser/notification_types.h" 86 #include "content/public/browser/notification_types.h"
88 #include "content/public/browser/web_contents.h" 87 #include "content/public/browser/web_contents.h"
89 #include "content/public/browser/web_ui.h" 88 #include "content/public/browser/web_ui.h"
90 #include "media/audio/sounds/sounds_manager.h" 89 #include "media/audio/sounds/sounds_manager.h"
91 #include "services/ui/public/cpp/property_type_converters.h" 90 #include "services/ui/public/cpp/property_type_converters.h"
91 #include "services/ui/public/interfaces/window_manager.mojom.h"
92 #include "ui/aura/window.h" 92 #include "ui/aura/window.h"
93 #include "ui/base/ime/chromeos/extension_ime_util.h" 93 #include "ui/base/ime/chromeos/extension_ime_util.h"
94 #include "ui/base/ime/chromeos/input_method_manager.h" 94 #include "ui/base/ime/chromeos/input_method_manager.h"
95 #include "ui/base/resource/resource_bundle.h" 95 #include "ui/base/resource/resource_bundle.h"
96 #include "ui/compositor/layer.h" 96 #include "ui/compositor/layer.h"
97 #include "ui/compositor/layer_animation_observer.h" 97 #include "ui/compositor/layer_animation_observer.h"
98 #include "ui/compositor/scoped_layer_animation_settings.h" 98 #include "ui/compositor/scoped_layer_animation_settings.h"
99 #include "ui/display/display.h" 99 #include "ui/display/display.h"
100 #include "ui/display/screen.h" 100 #include "ui/display/screen.h"
101 #include "ui/events/event_utils.h" 101 #include "ui/events/event_utils.h"
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 1125 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
1126 params.bounds = wallpaper_bounds(); 1126 params.bounds = wallpaper_bounds();
1127 params.show_state = ui::SHOW_STATE_FULLSCREEN; 1127 params.show_state = ui::SHOW_STATE_FULLSCREEN;
1128 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 1128 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
1129 // The ash::Shell containers are not available in Mash 1129 // The ash::Shell containers are not available in Mash
1130 if (!chrome::IsRunningInMash()) { 1130 if (!chrome::IsRunningInMash()) {
1131 params.parent = 1131 params.parent =
1132 ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), 1132 ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),
1133 ash::kShellWindowId_LockScreenContainer); 1133 ash::kShellWindowId_LockScreenContainer);
1134 } else { 1134 } else {
1135 params.mus_properties[ash::mojom::kWindowContainer_Property] = 1135 using ui::mojom::WindowManager;
1136 params.mus_properties[WindowManager::kInitialContainerId_Property] =
1136 mojo::ConvertTo<std::vector<uint8_t>>( 1137 mojo::ConvertTo<std::vector<uint8_t>>(
1137 static_cast<int32_t>(ash::mojom::Container::LOGIN_WINDOWS)); 1138 ash::kShellWindowId_LockScreenContainer);
1138 } 1139 }
1139 login_window_ = new views::Widget; 1140 login_window_ = new views::Widget;
1140 params.delegate = new LoginWidgetDelegate(login_window_); 1141 params.delegate = new LoginWidgetDelegate(login_window_);
1141 login_window_->Init(params); 1142 login_window_->Init(params);
1142 1143
1143 login_view_ = new WebUILoginView(); 1144 login_view_ = new WebUILoginView();
1144 login_view_->Init(); 1145 login_view_->Init();
1145 if (login_view_->webui_visible()) 1146 if (login_view_->webui_visible())
1146 OnLoginPromptVisible(); 1147 OnLoginPromptVisible();
1147 1148
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 1367
1367 locale_util::SwitchLanguageCallback callback( 1368 locale_util::SwitchLanguageCallback callback(
1368 base::Bind(&OnLanguageSwitchedCallback, base::Passed(std::move(data)))); 1369 base::Bind(&OnLanguageSwitchedCallback, base::Passed(std::move(data))));
1369 1370
1370 // Load locale keyboards here. Hardware layout would be automatically enabled. 1371 // Load locale keyboards here. Hardware layout would be automatically enabled.
1371 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */, 1372 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */,
1372 callback, ProfileManager::GetActiveUserProfile()); 1373 callback, ProfileManager::GetActiveUserProfile());
1373 } 1374 }
1374 1375
1375 } // namespace chromeos 1376 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/lock_window.cc ('k') | chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698