| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 delegate_(delegate), | 187 delegate_(delegate), |
| 188 #if defined(OS_CHROMEOS) | 188 #if defined(OS_CHROMEOS) |
| 189 output_configurator_(new chromeos::OutputConfigurator()), | 189 output_configurator_(new chromeos::OutputConfigurator()), |
| 190 output_configurator_animation_( | 190 output_configurator_animation_( |
| 191 new internal::OutputConfiguratorAnimation()), | 191 new internal::OutputConfiguratorAnimation()), |
| 192 #endif // defined(OS_CHROMEOS) | 192 #endif // defined(OS_CHROMEOS) |
| 193 shelf_(NULL), | 193 shelf_(NULL), |
| 194 panel_layout_manager_(NULL), | 194 panel_layout_manager_(NULL), |
| 195 status_area_widget_(NULL), | 195 status_area_widget_(NULL), |
| 196 browser_context_(NULL) { | 196 browser_context_(NULL) { |
| 197 gfx::Screen::SetInstance(screen_); | 197 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); |
| 198 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); |
| 198 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); | 199 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); |
| 199 #if defined(OS_CHROMEOS) | 200 #if defined(OS_CHROMEOS) |
| 200 output_configurator_->AddObserver(output_configurator_animation_.get()); | 201 output_configurator_->AddObserver(output_configurator_animation_.get()); |
| 201 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( | 202 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( |
| 202 output_configurator()); | 203 output_configurator()); |
| 203 #endif // defined(OS_CHROMEOS) | 204 #endif // defined(OS_CHROMEOS) |
| 204 } | 205 } |
| 205 | 206 |
| 206 Shell::~Shell() { | 207 Shell::~Shell() { |
| 207 views::FocusManagerFactory::Install(NULL); | 208 views::FocusManagerFactory::Install(NULL); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 aura::RootWindow* Shell::GetPrimaryRootWindow() { | 331 aura::RootWindow* Shell::GetPrimaryRootWindow() { |
| 331 return GetInstance()->display_controller()->GetPrimaryRootWindow(); | 332 return GetInstance()->display_controller()->GetPrimaryRootWindow(); |
| 332 } | 333 } |
| 333 | 334 |
| 334 // static | 335 // static |
| 335 aura::RootWindow* Shell::GetActiveRootWindow() { | 336 aura::RootWindow* Shell::GetActiveRootWindow() { |
| 336 return GetInstance()->active_root_window_; | 337 return GetInstance()->active_root_window_; |
| 337 } | 338 } |
| 338 | 339 |
| 339 // static | 340 // static |
| 341 gfx::Screen* Shell::GetAshScreen() { |
| 342 return gfx::Screen::GetScreenFor(GetPrimaryRootWindow()); |
| 343 } |
| 344 |
| 345 // static |
| 340 Shell::RootWindowList Shell::GetAllRootWindows() { | 346 Shell::RootWindowList Shell::GetAllRootWindows() { |
| 341 return Shell::GetInstance()->display_controller()-> | 347 return Shell::GetInstance()->display_controller()-> |
| 342 GetAllRootWindows(); | 348 GetAllRootWindows(); |
| 343 } | 349 } |
| 344 | 350 |
| 345 // static | 351 // static |
| 346 aura::Window* Shell::GetContainer(aura::RootWindow* root_window, | 352 aura::Window* Shell::GetContainer(aura::RootWindow* root_window, |
| 347 int container_id) { | 353 int container_id) { |
| 348 return root_window->GetChildById(container_id); | 354 return root_window->GetChildById(container_id); |
| 349 } | 355 } |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 iter != controllers.end(); ++iter) { | 831 iter != controllers.end(); ++iter) { |
| 826 if ((*iter)->GetSystemModalLayoutManager()-> | 832 if ((*iter)->GetSystemModalLayoutManager()-> |
| 827 CanWindowReceiveEvents(window)) { | 833 CanWindowReceiveEvents(window)) { |
| 828 return true; | 834 return true; |
| 829 } | 835 } |
| 830 } | 836 } |
| 831 return false; | 837 return false; |
| 832 } | 838 } |
| 833 | 839 |
| 834 } // namespace ash | 840 } // namespace ash |
| OLD | NEW |