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