| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 #include "base/command_line.h" | 77 #include "base/command_line.h" |
| 78 #include "base/debug/leak_annotations.h" | 78 #include "base/debug/leak_annotations.h" |
| 79 #include "ui/aura/client/aura_constants.h" | 79 #include "ui/aura/client/aura_constants.h" |
| 80 #include "ui/aura/client/user_action_client.h" | 80 #include "ui/aura/client/user_action_client.h" |
| 81 #include "ui/aura/env.h" | 81 #include "ui/aura/env.h" |
| 82 #include "ui/aura/focus_manager.h" | 82 #include "ui/aura/focus_manager.h" |
| 83 #include "ui/aura/layout_manager.h" | 83 #include "ui/aura/layout_manager.h" |
| 84 #include "ui/aura/root_window.h" | 84 #include "ui/aura/root_window.h" |
| 85 #include "ui/aura/window.h" | 85 #include "ui/aura/window.h" |
| 86 #include "ui/base/ui_base_switches.h" | 86 #include "ui/base/ui_base_switches.h" |
| 87 #include "ui/compositor/compositor_retriever_delegate.h" |
| 87 #include "ui/compositor/layer.h" | 88 #include "ui/compositor/layer.h" |
| 88 #include "ui/compositor/layer_animator.h" | 89 #include "ui/compositor/layer_animator.h" |
| 89 #include "ui/gfx/display.h" | 90 #include "ui/gfx/display.h" |
| 90 #include "ui/gfx/image/image_skia.h" | 91 #include "ui/gfx/image/image_skia.h" |
| 91 #include "ui/gfx/screen.h" | 92 #include "ui/gfx/screen.h" |
| 92 #include "ui/gfx/size.h" | 93 #include "ui/gfx/size.h" |
| 93 #include "ui/keyboard/keyboard.h" | 94 #include "ui/keyboard/keyboard.h" |
| 94 #include "ui/keyboard/keyboard_util.h" | 95 #include "ui/keyboard/keyboard_util.h" |
| 95 #include "ui/message_center/message_center.h" | 96 #include "ui/message_center/message_center.h" |
| 96 #include "ui/views/corewm/compound_event_filter.h" | 97 #include "ui/views/corewm/compound_event_filter.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 simulate_modal_window_open_for_testing_(false), | 219 simulate_modal_window_open_for_testing_(false), |
| 219 is_touch_hud_projection_enabled_(false) { | 220 is_touch_hud_projection_enabled_(false) { |
| 220 DCHECK(delegate_.get()); | 221 DCHECK(delegate_.get()); |
| 221 display_manager_.reset(new internal::DisplayManager); | 222 display_manager_.reset(new internal::DisplayManager); |
| 222 | 223 |
| 223 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466 | 224 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466 |
| 224 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); | 225 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); |
| 225 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) | 226 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) |
| 226 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); | 227 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); |
| 227 display_controller_.reset(new DisplayController); | 228 display_controller_.reset(new DisplayController); |
| 229 ui::CompositorRetrieverDelegate::SetDelegate(display_controller_.get()); |
| 228 #if defined(OS_CHROMEOS) && defined(USE_X11) | 230 #if defined(OS_CHROMEOS) && defined(USE_X11) |
| 229 bool is_panel_fitting_disabled = | 231 bool is_panel_fitting_disabled = |
| 230 content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( | 232 content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( |
| 231 gpu::GPU_FEATURE_TYPE_PANEL_FITTING); | 233 gpu::GPU_FEATURE_TYPE_PANEL_FITTING); |
| 232 | 234 |
| 233 output_configurator_->Init(!is_panel_fitting_disabled); | 235 output_configurator_->Init(!is_panel_fitting_disabled); |
| 234 | 236 |
| 235 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( | 237 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( |
| 236 output_configurator()); | 238 output_configurator()); |
| 237 // We can't do this with a root window listener because XI_HierarchyChanged | 239 // We can't do this with a root window listener because XI_HierarchyChanged |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 //////////////////////////////////////////////////////////////////////////////// | 986 //////////////////////////////////////////////////////////////////////////////// |
| 985 // Shell, aura::client::ActivationChangeObserver implementation: | 987 // Shell, aura::client::ActivationChangeObserver implementation: |
| 986 | 988 |
| 987 void Shell::OnWindowActivated(aura::Window* gained_active, | 989 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 988 aura::Window* lost_active) { | 990 aura::Window* lost_active) { |
| 989 if (gained_active) | 991 if (gained_active) |
| 990 target_root_window_ = gained_active->GetRootWindow(); | 992 target_root_window_ = gained_active->GetRootWindow(); |
| 991 } | 993 } |
| 992 | 994 |
| 993 } // namespace ash | 995 } // namespace ash |
| OLD | NEW |