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

Unified Diff: chrome/browser/chromeos/login/ui/lock_window.cc

Issue 2836163002: mash: Shell ref clean up for screen lock (Closed)
Patch Set: rebase, fix compile Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/ui/lock_window.cc
diff --git a/chrome/browser/chromeos/login/ui/lock_window.cc b/chrome/browser/chromeos/login/ui/lock_window.cc
index 92173e3e8bcacb21941e57e541ca75a3f67de5b9..c810969bf7f60444fbb15348b8c1c2c10633da4b 100644
--- a/chrome/browser/chromeos/login/ui/lock_window.cc
+++ b/chrome/browser/chromeos/login/ui/lock_window.cc
@@ -6,6 +6,9 @@
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/shell.h"
+#include "chrome/browser/ui/ash/ash_util.h"
+#include "services/ui/public/cpp/property_type_converters.h"
+#include "services/ui/public/interfaces/window_manager.mojom.h"
#include "ui/aura/window.h"
#include "ui/events/gestures/gesture_recognizer.h"
@@ -20,9 +23,15 @@ LockWindow::LockWindow(views::View* initially_focused_view)
params.delegate = this;
params.show_state = ui::SHOW_STATE_FULLSCREEN;
params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
- params.parent =
- ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),
- ash::kShellWindowId_LockScreenContainer);
+ const int kLockContainer = ash::kShellWindowId_LockScreenContainer;
+ if (ash_util::IsRunningInMash()) {
+ using ui::mojom::WindowManager;
+ params.mus_properties[WindowManager::kContainerId_InitProperty] =
+ mojo::ConvertTo<std::vector<uint8_t>>(kLockContainer);
+ } else {
+ params.parent = ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),
+ kLockContainer);
+ }
Init(params);
SetVisibilityAnimationTransition(views::Widget::ANIMATE_NONE);
}
« no previous file with comments | « chrome/browser/chromeos/login/lock/webui_screen_locker.cc ('k') | chrome/browser/ui/ash/session_controller_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698