OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/shell.h" | 5 #include "ash/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/app_list/app_list.h" | 9 #include "ash/app_list/app_list.h" |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 wifi_enabled_(true), | 234 wifi_enabled_(true), |
235 cellular_enabled_(true), | 235 cellular_enabled_(true), |
236 volume_(0.5) { | 236 volume_(0.5) { |
237 } | 237 } |
238 | 238 |
239 virtual ~DummySystemTrayDelegate() {} | 239 virtual ~DummySystemTrayDelegate() {} |
240 | 240 |
241 private: | 241 private: |
242 | 242 |
243 // Overridden from SystemTrayDelegate: | 243 // Overridden from SystemTrayDelegate: |
| 244 virtual bool GetTrayVisibilityOnStartup() OVERRIDE { return true; } |
| 245 |
244 virtual const std::string GetUserDisplayName() const OVERRIDE { | 246 virtual const std::string GetUserDisplayName() const OVERRIDE { |
245 return "Über tray Über tray Über tray Über tray"; | 247 return "Über tray Über tray Über tray Über tray"; |
246 } | 248 } |
247 | 249 |
248 virtual const std::string GetUserEmail() const OVERRIDE { | 250 virtual const std::string GetUserEmail() const OVERRIDE { |
249 return "über@tray"; | 251 return "über@tray"; |
250 } | 252 } |
251 | 253 |
252 virtual const SkBitmap& GetUserImage() const OVERRIDE { | 254 virtual const SkBitmap& GetUserImage() const OVERRIDE { |
253 return null_image_; | 255 return null_image_; |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 tray_->AddTrayItem(tray_user); | 593 tray_->AddTrayItem(tray_user); |
592 tray_->AddTrayItem(new internal::TrayEmpty()); | 594 tray_->AddTrayItem(new internal::TrayEmpty()); |
593 tray_->AddTrayItem(tray_power_date); | 595 tray_->AddTrayItem(tray_power_date); |
594 tray_->AddTrayItem(tray_network); | 596 tray_->AddTrayItem(tray_network); |
595 tray_->AddTrayItem(tray_ime); | 597 tray_->AddTrayItem(tray_ime); |
596 tray_->AddTrayItem(tray_volume); | 598 tray_->AddTrayItem(tray_volume); |
597 tray_->AddTrayItem(tray_brightness); | 599 tray_->AddTrayItem(tray_brightness); |
598 tray_->AddTrayItem(new internal::TraySettings()); | 600 tray_->AddTrayItem(new internal::TraySettings()); |
599 tray_->AddTrayItem(tray_accessibility); | 601 tray_->AddTrayItem(tray_accessibility); |
600 tray_->AddTrayItem(tray_caps_lock); | 602 tray_->AddTrayItem(tray_caps_lock); |
| 603 |
| 604 tray_->SetVisible(tray_delegate_->GetTrayVisibilityOnStartup()); |
601 } | 605 } |
602 if (!status_widget_) | 606 if (!status_widget_) |
603 status_widget_ = internal::CreateStatusArea(tray_.get()); | 607 status_widget_ = internal::CreateStatusArea(tray_.get()); |
604 | 608 |
605 aura::Window* default_container = | 609 aura::Window* default_container = |
606 GetContainer(internal::kShellWindowId_DefaultContainer); | 610 GetContainer(internal::kShellWindowId_DefaultContainer); |
607 launcher_.reset(new Launcher(default_container)); | 611 launcher_.reset(new Launcher(default_container)); |
608 | 612 |
609 // This controller needs to be set before SetupManagedWindowMode. | 613 // This controller needs to be set before SetupManagedWindowMode. |
610 desktop_background_controller_.reset(new DesktopBackgroundController); | 614 desktop_background_controller_.reset(new DesktopBackgroundController); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 // Create the desktop background image. | 764 // Create the desktop background image. |
761 desktop_background_controller_->SetDefaultDesktopBackgroundImage(); | 765 desktop_background_controller_->SetDefaultDesktopBackgroundImage(); |
762 } | 766 } |
763 | 767 |
764 void Shell::DisableWorkspaceGridLayout() { | 768 void Shell::DisableWorkspaceGridLayout() { |
765 if (workspace_controller_.get()) | 769 if (workspace_controller_.get()) |
766 workspace_controller_->workspace_manager()->set_grid_size(0); | 770 workspace_controller_->workspace_manager()->set_grid_size(0); |
767 } | 771 } |
768 | 772 |
769 } // namespace ash | 773 } // namespace ash |
OLD | NEW |