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/accelerators/focus_manager_factory.h" | 10 #include "ash/accelerators/focus_manager_factory.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 #include "ui/views/widget/native_widget_aura.h" | 92 #include "ui/views/widget/native_widget_aura.h" |
93 #include "ui/views/widget/widget.h" | 93 #include "ui/views/widget/widget.h" |
94 | 94 |
95 #if !defined(OS_MACOSX) | 95 #if !defined(OS_MACOSX) |
96 #include "ash/accelerators/accelerator_controller.h" | 96 #include "ash/accelerators/accelerator_controller.h" |
97 #include "ash/accelerators/accelerator_filter.h" | 97 #include "ash/accelerators/accelerator_filter.h" |
98 #include "ash/accelerators/nested_dispatcher_controller.h" | 98 #include "ash/accelerators/nested_dispatcher_controller.h" |
99 #endif | 99 #endif |
100 | 100 |
101 #if defined(OS_CHROMEOS) | 101 #if defined(OS_CHROMEOS) |
| 102 #include "ash/display/output_configurator_animation.h" |
102 #include "chromeos/display/output_configurator.h" | 103 #include "chromeos/display/output_configurator.h" |
103 #include "ui/aura/dispatcher_linux.h" | 104 #include "ui/aura/dispatcher_linux.h" |
104 #endif // defined(OS_CHROMEOS) | 105 #endif // defined(OS_CHROMEOS) |
105 | 106 |
106 namespace ash { | 107 namespace ash { |
107 | 108 |
108 namespace { | 109 namespace { |
109 | 110 |
110 using aura::Window; | 111 using aura::Window; |
111 using views::Widget; | 112 using views::Widget; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 output_configurator_(new chromeos::OutputConfigurator()), | 184 output_configurator_(new chromeos::OutputConfigurator()), |
184 #endif // defined(OS_CHROMEOS) | 185 #endif // defined(OS_CHROMEOS) |
185 shelf_(NULL), | 186 shelf_(NULL), |
186 panel_layout_manager_(NULL), | 187 panel_layout_manager_(NULL), |
187 status_area_widget_(NULL), | 188 status_area_widget_(NULL), |
188 browser_context_(NULL) { | 189 browser_context_(NULL) { |
189 gfx::Screen::SetInstance(screen_); | 190 gfx::Screen::SetInstance(screen_); |
190 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); | 191 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); |
191 #if defined(OS_CHROMEOS) | 192 #if defined(OS_CHROMEOS) |
192 // OutputConfigurator needs to get events regarding added/removed outputs. | 193 // OutputConfigurator needs to get events regarding added/removed outputs. |
| 194 output_configurator_->set_animation_delegate( |
| 195 new internal::OutputConfiguratorAnimation); |
193 static_cast<aura::DispatcherLinux*>( | 196 static_cast<aura::DispatcherLinux*>( |
194 aura::Env::GetInstance()->GetDispatcher())->AddDispatcherForRootWindow( | 197 aura::Env::GetInstance()->GetDispatcher())->AddDispatcherForRootWindow( |
195 output_configurator()); | 198 output_configurator()); |
196 #endif // defined(OS_CHROMEOS) | 199 #endif // defined(OS_CHROMEOS) |
197 } | 200 } |
198 | 201 |
199 Shell::~Shell() { | 202 Shell::~Shell() { |
200 views::FocusManagerFactory::Install(NULL); | 203 views::FocusManagerFactory::Install(NULL); |
201 | 204 |
202 // Remove the focus from any window. This will prevent overhead and side | 205 // Remove the focus from any window. This will prevent overhead and side |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 } | 787 } |
785 | 788 |
786 void Shell::ShowCursor(bool visible) { | 789 void Shell::ShowCursor(bool visible) { |
787 RootWindowList root_windows = GetAllRootWindows(); | 790 RootWindowList root_windows = GetAllRootWindows(); |
788 for (RootWindowList::iterator iter = root_windows.begin(); | 791 for (RootWindowList::iterator iter = root_windows.begin(); |
789 iter != root_windows.end(); ++iter) | 792 iter != root_windows.end(); ++iter) |
790 (*iter)->ShowCursor(visible); | 793 (*iter)->ShowCursor(visible); |
791 } | 794 } |
792 | 795 |
793 } // namespace ash | 796 } // namespace ash |
OLD | NEW |