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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); | 206 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); |
207 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) | 207 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) |
208 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); | 208 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); |
209 #if defined(OS_CHROMEOS) | 209 #if defined(OS_CHROMEOS) |
210 content::GpuFeatureType blacklisted_features = | 210 content::GpuFeatureType blacklisted_features = |
211 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); | 211 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); |
212 bool is_panel_fitting_disabled = | 212 bool is_panel_fitting_disabled = |
213 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || | 213 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || |
214 CommandLine::ForCurrentProcess()->HasSwitch( | 214 CommandLine::ForCurrentProcess()->HasSwitch( |
215 switches::kAshDisablePanelFitting); | 215 switches::kAshDisablePanelFitting); |
216 output_configurator_->Init(!is_panel_fitting_disabled); | 216 output_configurator_->Init(!is_panel_fitting_disabled, |
| 217 delegate_->IsFirstRunAfterBoot()); |
217 | 218 |
218 output_configurator_->AddObserver(output_configurator_animation_.get()); | 219 output_configurator_->AddObserver(output_configurator_animation_.get()); |
219 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( | 220 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( |
220 output_configurator()); | 221 output_configurator()); |
221 #endif // defined(OS_CHROMEOS) | 222 #endif // defined(OS_CHROMEOS) |
222 AddPreTargetHandler(this); | 223 AddPreTargetHandler(this); |
223 } | 224 } |
224 | 225 |
225 Shell::~Shell() { | 226 Shell::~Shell() { |
226 views::FocusManagerFactory::Install(NULL); | 227 views::FocusManagerFactory::Install(NULL); |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 //////////////////////////////////////////////////////////////////////////////// | 922 //////////////////////////////////////////////////////////////////////////////// |
922 // Shell, aura::client::ActivationChangeObserver implementation: | 923 // Shell, aura::client::ActivationChangeObserver implementation: |
923 | 924 |
924 void Shell::OnWindowActivated(aura::Window* gained_active, | 925 void Shell::OnWindowActivated(aura::Window* gained_active, |
925 aura::Window* lost_active) { | 926 aura::Window* lost_active) { |
926 if (gained_active) | 927 if (gained_active) |
927 active_root_window_ = gained_active->GetRootWindow(); | 928 active_root_window_ = gained_active->GetRootWindow(); |
928 } | 929 } |
929 | 930 |
930 } // namespace ash | 931 } // namespace ash |
OLD | NEW |