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 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
11 #include "ash/desktop_background/desktop_background_controller.h" | 11 #include "ash/desktop_background/desktop_background_controller.h" |
12 #include "ash/desktop_background/desktop_background_resources.h" | 12 #include "ash/desktop_background/desktop_background_resources.h" |
13 #include "ash/desktop_background/desktop_background_view.h" | 13 #include "ash/desktop_background/desktop_background_view.h" |
14 #include "ash/drag_drop/drag_drop_controller.h" | 14 #include "ash/drag_drop/drag_drop_controller.h" |
15 #include "ash/focus_cycler.h" | 15 #include "ash/focus_cycler.h" |
16 #include "ash/high_contrast/high_contrast_controller.h" | |
16 #include "ash/launcher/launcher.h" | 17 #include "ash/launcher/launcher.h" |
17 #include "ash/magnifier/magnification_controller.h" | 18 #include "ash/magnifier/magnification_controller.h" |
18 #include "ash/monitor/monitor_controller.h" | 19 #include "ash/monitor/monitor_controller.h" |
19 #include "ash/monitor/multi_monitor_manager.h" | 20 #include "ash/monitor/multi_monitor_manager.h" |
20 #include "ash/screen_ash.h" | 21 #include "ash/screen_ash.h" |
21 #include "ash/shell_context_menu.h" | 22 #include "ash/shell_context_menu.h" |
22 #include "ash/shell_delegate.h" | 23 #include "ash/shell_delegate.h" |
23 #include "ash/shell_factory.h" | 24 #include "ash/shell_factory.h" |
24 #include "ash/shell_window_ids.h" | 25 #include "ash/shell_window_ids.h" |
25 #include "ash/system/bluetooth/bluetooth_observer.h" | 26 #include "ash/system/bluetooth/bluetooth_observer.h" |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
731 window_modality_controller_.reset(new internal::WindowModalityController); | 732 window_modality_controller_.reset(new internal::WindowModalityController); |
732 AddRootWindowEventFilter(window_modality_controller_.get()); | 733 AddRootWindowEventFilter(window_modality_controller_.get()); |
733 | 734 |
734 visibility_controller_.reset(new internal::VisibilityController); | 735 visibility_controller_.reset(new internal::VisibilityController); |
735 | 736 |
736 tooltip_controller_.reset(new internal::TooltipController); | 737 tooltip_controller_.reset(new internal::TooltipController); |
737 AddRootWindowEventFilter(tooltip_controller_.get()); | 738 AddRootWindowEventFilter(tooltip_controller_.get()); |
738 | 739 |
739 drag_drop_controller_.reset(new internal::DragDropController); | 740 drag_drop_controller_.reset(new internal::DragDropController); |
740 magnification_controller_.reset(new internal::MagnificationController); | 741 magnification_controller_.reset(new internal::MagnificationController); |
742 high_contrast_controller_.reset(new HighContrastController); | |
741 power_button_controller_.reset(new PowerButtonController); | 743 power_button_controller_.reset(new PowerButtonController); |
742 AddShellObserver(power_button_controller_.get()); | 744 AddShellObserver(power_button_controller_.get()); |
743 video_detector_.reset(new VideoDetector); | 745 video_detector_.reset(new VideoDetector); |
744 window_cycle_controller_.reset(new WindowCycleController); | 746 window_cycle_controller_.reset(new WindowCycleController); |
745 monitor_controller_.reset(new internal::MonitorController); | 747 monitor_controller_.reset(new internal::MonitorController); |
746 screen_dimmer_.reset(new internal::ScreenDimmer); | 748 screen_dimmer_.reset(new internal::ScreenDimmer); |
749 | |
750 //high_contrast_controller_->SetEnabled(delegate_->IsHighContrastEnabled()); | |
sky
2012/05/17 15:54:15
Remove this
Zachary Kuznia
2012/05/21 05:50:05
Done.
| |
747 } | 751 } |
748 | 752 |
749 aura::Window* Shell::GetContainer(int container_id) { | 753 aura::Window* Shell::GetContainer(int container_id) { |
750 return const_cast<aura::Window*>( | 754 return const_cast<aura::Window*>( |
751 const_cast<const Shell*>(this)->GetContainer(container_id)); | 755 const_cast<const Shell*>(this)->GetContainer(container_id)); |
752 } | 756 } |
753 | 757 |
754 const aura::Window* Shell::GetContainer(int container_id) const { | 758 const aura::Window* Shell::GetContainer(int container_id) const { |
755 return GetRootWindow()->GetChildById(container_id); | 759 return GetRootWindow()->GetChildById(container_id); |
756 } | 760 } |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
940 panel_container->SetLayoutManager(panel_layout_manager_); | 944 panel_container->SetLayoutManager(panel_layout_manager_); |
941 } | 945 } |
942 } | 946 } |
943 | 947 |
944 void Shell::DisableWorkspaceGridLayout() { | 948 void Shell::DisableWorkspaceGridLayout() { |
945 if (workspace_controller_.get()) | 949 if (workspace_controller_.get()) |
946 workspace_controller_->workspace_manager()->set_grid_size(0); | 950 workspace_controller_->workspace_manager()->set_grid_size(0); |
947 } | 951 } |
948 | 952 |
949 } // namespace ash | 953 } // namespace ash |
OLD | NEW |