Chromium Code Reviews| 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(); |
| + } |
| + |
|
Jun Mukai
2015/05/01 22:14:45
Is this necessary? In the extended desktop mode,
oshima
2015/05/01 23:44:52
I'm showing the tray itself when necessary. It's h
Jun Mukai
2015/05/02 03:41:28
Okay. I was confused by the bubble visibility and
|
| DeleteHost(to_delete); |
| #ifndef NDEBUG |
| auto iter = std::find_if( |