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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #include "ui/views/widget/widget.h" | 96 #include "ui/views/widget/widget.h" |
97 #include "ui/views/window/dialog_frame_view.h" | 97 #include "ui/views/window/dialog_frame_view.h" |
98 | 98 |
99 #if !defined(OS_MACOSX) | 99 #if !defined(OS_MACOSX) |
100 #include "ash/accelerators/accelerator_controller.h" | 100 #include "ash/accelerators/accelerator_controller.h" |
101 #include "ash/accelerators/accelerator_filter.h" | 101 #include "ash/accelerators/accelerator_filter.h" |
102 #include "ash/accelerators/nested_dispatcher_controller.h" | 102 #include "ash/accelerators/nested_dispatcher_controller.h" |
103 #endif | 103 #endif |
104 | 104 |
105 #if defined(OS_CHROMEOS) | 105 #if defined(OS_CHROMEOS) |
| 106 #include "ash/ash_constants.h" |
106 #include "ash/display/display_change_observer_x11.h" | 107 #include "ash/display/display_change_observer_x11.h" |
107 #include "ash/display/output_configurator_animation.h" | 108 #include "ash/display/output_configurator_animation.h" |
108 #include "base/chromeos/chromeos_version.h" | 109 #include "base/chromeos/chromeos_version.h" |
109 #include "base/message_pump_aurax11.h" | 110 #include "base/message_pump_aurax11.h" |
110 #include "chromeos/display/output_configurator.h" | 111 #include "chromeos/display/output_configurator.h" |
111 #include "content/public/browser/gpu_data_manager.h" | 112 #include "content/public/browser/gpu_data_manager.h" |
112 #include "content/public/common/gpu_feature_type.h" | 113 #include "content/public/common/gpu_feature_type.h" |
113 #endif // defined(OS_CHROMEOS) | 114 #endif // defined(OS_CHROMEOS) |
114 | 115 |
115 namespace ash { | 116 namespace ash { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); | 207 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); |
207 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) | 208 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) |
208 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); | 209 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); |
209 #if defined(OS_CHROMEOS) | 210 #if defined(OS_CHROMEOS) |
210 content::GpuFeatureType blacklisted_features = | 211 content::GpuFeatureType blacklisted_features = |
211 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); | 212 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); |
212 bool is_panel_fitting_disabled = | 213 bool is_panel_fitting_disabled = |
213 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || | 214 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || |
214 CommandLine::ForCurrentProcess()->HasSwitch( | 215 CommandLine::ForCurrentProcess()->HasSwitch( |
215 switches::kAshDisablePanelFitting); | 216 switches::kAshDisablePanelFitting); |
216 output_configurator_->Init(!is_panel_fitting_disabled); | 217 |
| 218 output_configurator_->Init( |
| 219 !is_panel_fitting_disabled, |
| 220 delegate_->IsFirstRunAfterBoot() ? kChromeOsBootColor : 0); |
217 | 221 |
218 output_configurator_->AddObserver(output_configurator_animation_.get()); | 222 output_configurator_->AddObserver(output_configurator_animation_.get()); |
219 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( | 223 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( |
220 output_configurator()); | 224 output_configurator()); |
221 #endif // defined(OS_CHROMEOS) | 225 #endif // defined(OS_CHROMEOS) |
222 AddPreTargetHandler(this); | 226 AddPreTargetHandler(this); |
223 } | 227 } |
224 | 228 |
225 Shell::~Shell() { | 229 Shell::~Shell() { |
226 views::FocusManagerFactory::Install(NULL); | 230 views::FocusManagerFactory::Install(NULL); |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 //////////////////////////////////////////////////////////////////////////////// | 925 //////////////////////////////////////////////////////////////////////////////// |
922 // Shell, aura::client::ActivationChangeObserver implementation: | 926 // Shell, aura::client::ActivationChangeObserver implementation: |
923 | 927 |
924 void Shell::OnWindowActivated(aura::Window* gained_active, | 928 void Shell::OnWindowActivated(aura::Window* gained_active, |
925 aura::Window* lost_active) { | 929 aura::Window* lost_active) { |
926 if (gained_active) | 930 if (gained_active) |
927 active_root_window_ = gained_active->GetRootWindow(); | 931 active_root_window_ = gained_active->GetRootWindow(); |
928 } | 932 } |
929 | 933 |
930 } // namespace ash | 934 } // namespace ash |
OLD | NEW |