| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 active_root_window_(NULL), | 183 active_root_window_(NULL), |
| 184 delegate_(delegate), | 184 delegate_(delegate), |
| 185 #if defined(OS_CHROMEOS) | 185 #if defined(OS_CHROMEOS) |
| 186 output_configurator_(new chromeos::OutputConfigurator()), | 186 output_configurator_(new chromeos::OutputConfigurator()), |
| 187 output_configurator_animation_( | 187 output_configurator_animation_( |
| 188 new internal::OutputConfiguratorAnimation()), | 188 new internal::OutputConfiguratorAnimation()), |
| 189 #endif // defined(OS_CHROMEOS) | 189 #endif // defined(OS_CHROMEOS) |
| 190 browser_context_(NULL), | 190 browser_context_(NULL), |
| 191 simulate_modal_window_open_for_testing_(false) { | 191 simulate_modal_window_open_for_testing_(false) { |
| 192 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466 | 192 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466 |
| 193 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); | |
| 194 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); | 193 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); |
| 195 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); | 194 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); |
| 196 #if defined(OS_CHROMEOS) | 195 #if defined(OS_CHROMEOS) |
| 197 content::GpuFeatureType blacklisted_features = | 196 content::GpuFeatureType blacklisted_features = |
| 198 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); | 197 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); |
| 199 bool is_panel_fitting_disabled = | 198 bool is_panel_fitting_disabled = |
| 200 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || | 199 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || |
| 201 CommandLine::ForCurrentProcess()->HasSwitch( | 200 CommandLine::ForCurrentProcess()->HasSwitch( |
| 202 switches::kAshDisablePanelFitting); | 201 switches::kAshDisablePanelFitting); |
| 203 output_configurator_->Init(!is_panel_fitting_disabled); | 202 output_configurator_->Init(!is_panel_fitting_disabled); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 return GetInstance()->display_controller()->GetPrimaryRootWindow(); | 321 return GetInstance()->display_controller()->GetPrimaryRootWindow(); |
| 323 } | 322 } |
| 324 | 323 |
| 325 // static | 324 // static |
| 326 aura::RootWindow* Shell::GetActiveRootWindow() { | 325 aura::RootWindow* Shell::GetActiveRootWindow() { |
| 327 return GetInstance()->active_root_window_; | 326 return GetInstance()->active_root_window_; |
| 328 } | 327 } |
| 329 | 328 |
| 330 // static | 329 // static |
| 331 gfx::Screen* Shell::GetScreen() { | 330 gfx::Screen* Shell::GetScreen() { |
| 332 return gfx::Screen::GetScreenFor(GetPrimaryRootWindow()); | 331 return gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_ALTERNATE); |
| 333 } | 332 } |
| 334 | 333 |
| 335 // static | 334 // static |
| 336 Shell::RootWindowList Shell::GetAllRootWindows() { | 335 Shell::RootWindowList Shell::GetAllRootWindows() { |
| 337 return Shell::GetInstance()->display_controller()-> | 336 return Shell::GetInstance()->display_controller()-> |
| 338 GetAllRootWindows(); | 337 GetAllRootWindows(); |
| 339 } | 338 } |
| 340 | 339 |
| 341 // static | 340 // static |
| 342 aura::Window* Shell::GetContainer(aura::RootWindow* root_window, | 341 aura::Window* Shell::GetContainer(aura::RootWindow* root_window, |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 iter != controllers.end(); ++iter) { | 767 iter != controllers.end(); ++iter) { |
| 769 if ((*iter)->GetSystemModalLayoutManager(window)-> | 768 if ((*iter)->GetSystemModalLayoutManager(window)-> |
| 770 CanWindowReceiveEvents(window)) { | 769 CanWindowReceiveEvents(window)) { |
| 771 return true; | 770 return true; |
| 772 } | 771 } |
| 773 } | 772 } |
| 774 return false; | 773 return false; |
| 775 } | 774 } |
| 776 | 775 |
| 777 } // namespace ash | 776 } // namespace ash |
| OLD | NEW |