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

Unified Diff: ash/display/display_controller.cc

Issue 1116313002: Layout login/lock screen, shelf and app list inside the first display in Unified Desktop mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « ash/ash_switches.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_controller.cc
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index 4044fe76464973527bd587b74faa68f5f90330be..e28472e09f3fe91ec454f2b230fb52236df36750 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -22,6 +22,7 @@
#include "ash/screen_util.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
+#include "ash/system/tray/system_tray.h"
#include "ash/wm/coordinate_conversion.h"
#include "base/command_line.h"
#include "base/stl_util.h"
@@ -643,6 +644,19 @@ void DisplayController::OnDisplayAdded(const gfx::Display& display) {
if (primary_tree_host_for_replace_) {
AshWindowTreeHost* to_delete = primary_tree_host_for_replace_;
primary_tree_host_for_replace_ = nullptr;
+
+ // Show the shelf if the original WTH had a visible system
+ // tray. It may or may not be visible depending on OOBE state.
+ ash::SystemTray* old_tray =
+ GetRootWindowController(to_delete->AsWindowTreeHost()->window())
+ ->GetSystemTray();
+ ash::SystemTray* new_tray =
+ ash::Shell::GetInstance()->GetPrimarySystemTray();
+ if (old_tray->GetWidget()->IsVisible()) {
+ new_tray->SetVisible(true);
+ new_tray->GetWidget()->Show();
+ }
+
DeleteHost(to_delete);
#ifndef NDEBUG
auto iter = std::find_if(
« no previous file with comments | « ash/ash_switches.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698