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" | 21 #include "ash/system/power/power_status_controller.h" |
22 #include "ash/system/power/tray_power_date.h" | 22 #include "ash/system/power/tray_power_date.h" |
23 #include "ash/system/tray/system_tray_delegate.h" | 23 #include "ash/system/tray/system_tray_delegate.h" |
24 #include "ash/system/tray/system_tray.h" | 24 #include "ash/system/tray/system_tray.h" |
| 25 #include "ash/system/tray/tray_empty.h" |
25 #include "ash/system/user/tray_user.h" | 26 #include "ash/system/user/tray_user.h" |
26 #include "ash/tooltips/tooltip_controller.h" | 27 #include "ash/tooltips/tooltip_controller.h" |
27 #include "ash/wm/activation_controller.h" | 28 #include "ash/wm/activation_controller.h" |
28 #include "ash/wm/base_layout_manager.h" | 29 #include "ash/wm/base_layout_manager.h" |
29 #include "ash/wm/compact_layout_manager.h" | 30 #include "ash/wm/compact_layout_manager.h" |
30 #include "ash/wm/compact_status_area_layout_manager.h" | 31 #include "ash/wm/compact_status_area_layout_manager.h" |
31 #include "ash/wm/dialog_frame_view.h" | 32 #include "ash/wm/dialog_frame_view.h" |
32 #include "ash/wm/panel_window_event_filter.h" | 33 #include "ash/wm/panel_window_event_filter.h" |
33 #include "ash/wm/panel_layout_manager.h" | 34 #include "ash/wm/panel_layout_manager.h" |
34 #include "ash/wm/partial_screenshot_event_filter.h" | 35 #include "ash/wm/partial_screenshot_event_filter.h" |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 tray_delegate_.reset(new DummySystemTrayDelegate()); | 433 tray_delegate_.reset(new DummySystemTrayDelegate()); |
433 | 434 |
434 internal::TrayVolume* tray_volume = new internal::TrayVolume(); | 435 internal::TrayVolume* tray_volume = new internal::TrayVolume(); |
435 internal::TrayBrightness* tray_brightness = new internal::TrayBrightness(); | 436 internal::TrayBrightness* tray_brightness = new internal::TrayBrightness(); |
436 internal::TrayPowerDate* tray_power_date = new internal::TrayPowerDate(); | 437 internal::TrayPowerDate* tray_power_date = new internal::TrayPowerDate(); |
437 audio_controller_ = tray_volume; | 438 audio_controller_ = tray_volume; |
438 brightness_controller_ = tray_brightness; | 439 brightness_controller_ = tray_brightness; |
439 power_status_controller_ = tray_power_date; | 440 power_status_controller_ = tray_power_date; |
440 | 441 |
441 tray_->AddTrayItem(new internal::TrayUser()); | 442 tray_->AddTrayItem(new internal::TrayUser()); |
| 443 tray_->AddTrayItem(new internal::TrayEmpty()); |
442 tray_->AddTrayItem(tray_power_date); | 444 tray_->AddTrayItem(tray_power_date); |
443 tray_->AddTrayItem(tray_volume); | 445 tray_->AddTrayItem(tray_volume); |
444 tray_->AddTrayItem(tray_brightness); | 446 tray_->AddTrayItem(tray_brightness); |
445 tray_->AddTrayItem(new internal::TraySettings()); | 447 tray_->AddTrayItem(new internal::TraySettings()); |
446 } | 448 } |
447 | 449 |
448 aura::Window* default_container = | 450 aura::Window* default_container = |
449 GetContainer(internal::kShellWindowId_DefaultContainer); | 451 GetContainer(internal::kShellWindowId_DefaultContainer); |
450 launcher_.reset(new Launcher(default_container)); | 452 launcher_.reset(new Launcher(default_container)); |
451 | 453 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 void Shell::ResetLayoutManager(int container_id) { | 676 void Shell::ResetLayoutManager(int container_id) { |
675 GetContainer(container_id)->SetLayoutManager(NULL); | 677 GetContainer(container_id)->SetLayoutManager(NULL); |
676 } | 678 } |
677 | 679 |
678 void Shell::DisableWorkspaceGridLayout() { | 680 void Shell::DisableWorkspaceGridLayout() { |
679 if (workspace_controller_.get()) | 681 if (workspace_controller_.get()) |
680 workspace_controller_->workspace_manager()->set_grid_size(0); | 682 workspace_controller_->workspace_manager()->set_grid_size(0); |
681 } | 683 } |
682 | 684 |
683 } // namespace ash | 685 } // namespace ash |
OLD | NEW |