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

Unified Diff: chrome/browser/ui/ash/network_connect_delegate_chromeos.cc

Issue 2427823002: cros: Move system tray delegate widget container code to SystemTrayClient (Closed)
Patch Set: cleanup 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/ash/system_tray_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/network_connect_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/network_connect_delegate_chromeos.cc b/chrome/browser/ui/ash/network_connect_delegate_chromeos.cc
index d509ce2015800dbe338491aa0b66d3296da67990..51a0b0e0986b28acb4c8cc026cd2a11719e5ecd0 100644
--- a/chrome/browser/ui/ash/network_connect_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/network_connect_delegate_chromeos.cc
@@ -4,10 +4,7 @@
#include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h"
-#include "ash/common/login_status.h"
#include "ash/common/session/session_state_delegate.h"
-#include "ash/common/shell_window_ids.h"
-#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/wm_shell.h"
#include "ash/shell.h"
#include "chrome/browser/chromeos/enrollment_dialog_view.h"
@@ -24,19 +21,7 @@ bool IsUIAvailable() {
}
gfx::NativeWindow GetNativeWindow() {
- ash::WmShell* wm_shell = ash::WmShell::Get();
- const bool session_started =
- wm_shell->GetSessionStateDelegate()->IsActiveUserSessionStarted();
- const ash::LoginStatus login_status =
- wm_shell->system_tray_delegate()->GetUserLoginStatus();
- const bool is_in_secondary_login_screen =
- wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen();
-
- int container_id =
- (!session_started || login_status == ash::LoginStatus::NOT_LOGGED_IN ||
- login_status == ash::LoginStatus::LOCKED || is_in_secondary_login_screen)
- ? ash::kShellWindowId_LockSystemModalContainer
- : ash::kShellWindowId_SystemModalContainer;
+ int container_id = SystemTrayClient::GetDialogParentContainerId();
return ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),
container_id);
}
« no previous file with comments | « no previous file | chrome/browser/ui/ash/system_tray_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698