| 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" |
| 11 #include "ash/drag_drop/drag_drop_controller.h" | 11 #include "ash/drag_drop/drag_drop_controller.h" |
| 12 #include "ash/focus_cycler.h" | 12 #include "ash/focus_cycler.h" |
| 13 #include "ash/ime/input_method_event_filter.h" | 13 #include "ash/ime/input_method_event_filter.h" |
| 14 #include "ash/launcher/launcher.h" | 14 #include "ash/launcher/launcher.h" |
| 15 #include "ash/shell_delegate.h" | 15 #include "ash/shell_delegate.h" |
| 16 #include "ash/shell_factory.h" | 16 #include "ash/shell_factory.h" |
| 17 #include "ash/shell_window_ids.h" | 17 #include "ash/shell_window_ids.h" |
| 18 #include "ash/system/audio/tray_volume.h" | 18 #include "ash/system/audio/tray_volume.h" |
| 19 #include "ash/system/brightness/tray_brightness.h" | 19 #include "ash/system/brightness/tray_brightness.h" |
| 20 #include "ash/system/settings/tray_settings.h" | 20 #include "ash/system/settings/tray_settings.h" |
| 21 #include "ash/system/power/power_status_controller.h" |
| 22 #include "ash/system/power/tray_power_date.h" |
| 21 #include "ash/system/tray/system_tray_delegate.h" | 23 #include "ash/system/tray/system_tray_delegate.h" |
| 22 #include "ash/system/tray/system_tray.h" | 24 #include "ash/system/tray/system_tray.h" |
| 23 #include "ash/system/tray_user.h" | 25 #include "ash/system/tray_user.h" |
| 24 #include "ash/tooltips/tooltip_controller.h" | 26 #include "ash/tooltips/tooltip_controller.h" |
| 25 #include "ash/wm/activation_controller.h" | 27 #include "ash/wm/activation_controller.h" |
| 26 #include "ash/wm/base_layout_manager.h" | 28 #include "ash/wm/base_layout_manager.h" |
| 27 #include "ash/wm/compact_layout_manager.h" | 29 #include "ash/wm/compact_layout_manager.h" |
| 28 #include "ash/wm/compact_status_area_layout_manager.h" | 30 #include "ash/wm/compact_status_area_layout_manager.h" |
| 29 #include "ash/wm/dialog_frame_view.h" | 31 #include "ash/wm/dialog_frame_view.h" |
| 30 #include "ash/wm/panel_window_event_filter.h" | 32 #include "ash/wm/panel_window_event_filter.h" |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 tray_.reset(new SystemTray()); | 417 tray_.reset(new SystemTray()); |
| 416 status_widget_->GetContentsView()->AddChildView(tray_.get()); | 418 status_widget_->GetContentsView()->AddChildView(tray_.get()); |
| 417 | 419 |
| 418 if (delegate_.get()) | 420 if (delegate_.get()) |
| 419 tray_delegate_.reset(delegate_->CreateSystemTrayDelegate(tray_.get())); | 421 tray_delegate_.reset(delegate_->CreateSystemTrayDelegate(tray_.get())); |
| 420 if (!tray_delegate_.get()) | 422 if (!tray_delegate_.get()) |
| 421 tray_delegate_.reset(new DummySystemTrayDelegate()); | 423 tray_delegate_.reset(new DummySystemTrayDelegate()); |
| 422 | 424 |
| 423 internal::TrayVolume* tray_volume = new internal::TrayVolume(); | 425 internal::TrayVolume* tray_volume = new internal::TrayVolume(); |
| 424 internal::TrayBrightness* tray_brightness = new internal::TrayBrightness(); | 426 internal::TrayBrightness* tray_brightness = new internal::TrayBrightness(); |
| 427 internal::TrayPowerDate* tray_power_date = new internal::TrayPowerDate(); |
| 425 audio_controller_ = tray_volume; | 428 audio_controller_ = tray_volume; |
| 426 brightness_controller_ = tray_brightness; | 429 brightness_controller_ = tray_brightness; |
| 430 power_status_controller_ = tray_power_date; |
| 427 | 431 |
| 428 tray_->AddTrayItem(new internal::TrayUser()); | 432 tray_->AddTrayItem(new internal::TrayUser()); |
| 433 tray_->AddTrayItem(tray_power_date); |
| 429 tray_->AddTrayItem(tray_volume); | 434 tray_->AddTrayItem(tray_volume); |
| 430 tray_->AddTrayItem(tray_brightness); | 435 tray_->AddTrayItem(tray_brightness); |
| 431 tray_->AddTrayItem(new internal::TraySettings()); | 436 tray_->AddTrayItem(new internal::TraySettings()); |
| 432 } | 437 } |
| 433 | 438 |
| 434 aura::Window* default_container = | 439 aura::Window* default_container = |
| 435 GetContainer(internal::kShellWindowId_DefaultContainer); | 440 GetContainer(internal::kShellWindowId_DefaultContainer); |
| 436 launcher_.reset(new Launcher(default_container)); | 441 launcher_.reset(new Launcher(default_container)); |
| 437 | 442 |
| 438 if (window_mode_ == MODE_COMPACT) | 443 if (window_mode_ == MODE_COMPACT) |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 | 660 |
| 656 // Create the desktop background image. | 661 // Create the desktop background image. |
| 657 SetDesktopBackgroundMode(BACKGROUND_IMAGE); | 662 SetDesktopBackgroundMode(BACKGROUND_IMAGE); |
| 658 } | 663 } |
| 659 | 664 |
| 660 void Shell::ResetLayoutManager(int container_id) { | 665 void Shell::ResetLayoutManager(int container_id) { |
| 661 GetContainer(container_id)->SetLayoutManager(NULL); | 666 GetContainer(container_id)->SetLayoutManager(NULL); |
| 662 } | 667 } |
| 663 | 668 |
| 664 } // namespace ash | 669 } // namespace ash |
| OLD | NEW |