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

Unified Diff: ash/shell.cc

Issue 9596002: ash uber tray: Make it work in ash_shell, and a couple more fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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/focus_cycler_unittest.cc ('k') | ash/shell/shell_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 913d585baf1fa8a4c42c2ddf6ce2a464f11e4538..dee419c652e9dd986d49af2813489101b231fe7a 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -410,21 +410,17 @@ void Shell::Init() {
if (delegate_.get())
status_widget_ = delegate_->CreateStatusArea();
- if (!status_widget_)
- status_widget_ = internal::CreateStatusArea();
if (command_line->HasSwitch(switches::kAshUberTray)) {
// TODO(sad): This is rather ugly at the moment. This is because we are
// supporting both the old and the new status bar at the same time. This
// will soon get better once the new one is ready and the old one goes out
// the door.
- if (delegate_.get())
- status_widget_ = delegate_->CreateStatusArea();
- if (!status_widget_)
- status_widget_ = internal::CreateStatusArea();
- status_widget_->GetContentsView()->RemoveAllChildViews(false);
tray_.reset(new SystemTray());
- status_widget_->GetContentsView()->AddChildView(tray_.get());
+ if (status_widget_) {
+ status_widget_->GetContentsView()->RemoveAllChildViews(false);
+ status_widget_->GetContentsView()->AddChildView(tray_.get());
+ }
if (delegate_.get())
tray_delegate_.reset(delegate_->CreateSystemTrayDelegate(tray_.get()));
@@ -444,6 +440,8 @@ void Shell::Init() {
tray_->AddTrayItem(tray_brightness);
tray_->AddTrayItem(new internal::TraySettings());
}
+ if (!status_widget_)
+ status_widget_ = internal::CreateStatusArea(tray_.get());
aura::Window* default_container =
GetContainer(internal::kShellWindowId_DefaultContainer);
« no previous file with comments | « ash/focus_cycler_unittest.cc ('k') | ash/shell/shell_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698