| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "ash/common/wm/root_window_finder.h" | 37 #include "ash/common/wm/root_window_finder.h" |
| 38 #include "ash/common/wm/window_positioner.h" | 38 #include "ash/common/wm/window_positioner.h" |
| 39 #include "ash/common/wm/workspace_controller.h" | 39 #include "ash/common/wm/workspace_controller.h" |
| 40 #include "ash/common/wm_root_window_controller.h" | 40 #include "ash/common/wm_root_window_controller.h" |
| 41 #include "ash/common/wm_shell.h" | 41 #include "ash/common/wm_shell.h" |
| 42 #include "ash/display/cursor_window_controller.h" | 42 #include "ash/display/cursor_window_controller.h" |
| 43 #include "ash/display/display_configuration_controller.h" | 43 #include "ash/display/display_configuration_controller.h" |
| 44 #include "ash/display/display_manager.h" | 44 #include "ash/display/display_manager.h" |
| 45 #include "ash/display/event_transformation_handler.h" | 45 #include "ash/display/event_transformation_handler.h" |
| 46 #include "ash/display/mouse_cursor_event_filter.h" | 46 #include "ash/display/mouse_cursor_event_filter.h" |
| 47 #include "ash/display/screen_ash.h" |
| 47 #include "ash/display/screen_position_controller.h" | 48 #include "ash/display/screen_position_controller.h" |
| 48 #include "ash/display/window_tree_host_manager.h" | 49 #include "ash/display/window_tree_host_manager.h" |
| 49 #include "ash/drag_drop/drag_drop_controller.h" | 50 #include "ash/drag_drop/drag_drop_controller.h" |
| 50 #include "ash/first_run/first_run_helper_impl.h" | 51 #include "ash/first_run/first_run_helper_impl.h" |
| 51 #include "ash/high_contrast/high_contrast_controller.h" | 52 #include "ash/high_contrast/high_contrast_controller.h" |
| 52 #include "ash/host/ash_window_tree_host_init_params.h" | 53 #include "ash/host/ash_window_tree_host_init_params.h" |
| 53 #include "ash/ime/input_method_event_handler.h" | 54 #include "ash/ime/input_method_event_handler.h" |
| 54 #include "ash/magnifier/magnification_controller.h" | 55 #include "ash/magnifier/magnification_controller.h" |
| 55 #include "ash/magnifier/partial_magnification_controller.h" | 56 #include "ash/magnifier/partial_magnification_controller.h" |
| 56 #include "ash/root_window_controller.h" | 57 #include "ash/root_window_controller.h" |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 activation_client_(nullptr), | 494 activation_client_(nullptr), |
| 494 #if defined(OS_CHROMEOS) | 495 #if defined(OS_CHROMEOS) |
| 495 display_configurator_(new ui::DisplayConfigurator()), | 496 display_configurator_(new ui::DisplayConfigurator()), |
| 496 #endif // defined(OS_CHROMEOS) | 497 #endif // defined(OS_CHROMEOS) |
| 497 native_cursor_manager_(nullptr), | 498 native_cursor_manager_(nullptr), |
| 498 simulate_modal_window_open_for_testing_(false), | 499 simulate_modal_window_open_for_testing_(false), |
| 499 is_touch_hud_projection_enabled_(false), | 500 is_touch_hud_projection_enabled_(false), |
| 500 blocking_pool_(blocking_pool) { | 501 blocking_pool_(blocking_pool) { |
| 501 DCHECK(aura::Env::GetInstanceDontCreate()); | 502 DCHECK(aura::Env::GetInstanceDontCreate()); |
| 502 gpu_support_.reset(wm_shell_->delegate()->CreateGPUSupport()); | 503 gpu_support_.reset(wm_shell_->delegate()->CreateGPUSupport()); |
| 503 display_manager_.reset(new DisplayManager); | 504 display_manager_.reset(ScreenAsh::CreateDisplayManager()); |
| 504 window_tree_host_manager_.reset(new WindowTreeHostManager); | 505 window_tree_host_manager_.reset(new WindowTreeHostManager); |
| 505 user_metrics_recorder_.reset(new UserMetricsRecorder); | 506 user_metrics_recorder_.reset(new UserMetricsRecorder); |
| 506 | 507 |
| 507 #if defined(OS_CHROMEOS) | 508 #if defined(OS_CHROMEOS) |
| 508 PowerStatus::Initialize(); | 509 PowerStatus::Initialize(); |
| 509 #endif | 510 #endif |
| 510 } | 511 } |
| 511 | 512 |
| 512 Shell::~Shell() { | 513 Shell::~Shell() { |
| 513 TRACE_EVENT0("shutdown", "ash::Shell::Destructor"); | 514 TRACE_EVENT0("shutdown", "ash::Shell::Destructor"); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 #if defined(OS_CHROMEOS) | 635 #if defined(OS_CHROMEOS) |
| 635 touch_transformer_controller_.reset(); | 636 touch_transformer_controller_.reset(); |
| 636 stylus_metrics_recorder_.reset(); | 637 stylus_metrics_recorder_.reset(); |
| 637 audio_a11y_controller_.reset(); | 638 audio_a11y_controller_.reset(); |
| 638 #endif // defined(OS_CHROMEOS) | 639 #endif // defined(OS_CHROMEOS) |
| 639 | 640 |
| 640 // This also deletes all RootWindows. Note that we invoke Shutdown() on | 641 // This also deletes all RootWindows. Note that we invoke Shutdown() on |
| 641 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since | 642 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since |
| 642 // destruction | 643 // destruction |
| 643 // of its owned RootWindowControllers relies on the value. | 644 // of its owned RootWindowControllers relies on the value. |
| 644 display_manager_->CreateScreenForShutdown(); | 645 ScreenAsh::CreateScreenForShutdown(); |
| 645 display_configuration_controller_.reset(); | 646 display_configuration_controller_.reset(); |
| 646 | 647 |
| 647 wm_shell_->Shutdown(); | 648 wm_shell_->Shutdown(); |
| 648 // Depends on |focus_client_|, so must be destroyed before. | 649 // Depends on |focus_client_|, so must be destroyed before. |
| 649 window_tree_host_manager_->Shutdown(); | 650 window_tree_host_manager_->Shutdown(); |
| 650 window_tree_host_manager_.reset(); | 651 window_tree_host_manager_.reset(); |
| 651 focus_client_.reset(); | 652 focus_client_.reset(); |
| 652 screen_position_controller_.reset(); | 653 screen_position_controller_.reset(); |
| 653 | 654 |
| 654 keyboard::KeyboardController::ResetInstance(nullptr); | 655 keyboard::KeyboardController::ResetInstance(nullptr); |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { | 1026 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { |
| 1026 return std::unique_ptr<ui::EventTargetIterator>(); | 1027 return std::unique_ptr<ui::EventTargetIterator>(); |
| 1027 } | 1028 } |
| 1028 | 1029 |
| 1029 ui::EventTargeter* Shell::GetEventTargeter() { | 1030 ui::EventTargeter* Shell::GetEventTargeter() { |
| 1030 NOTREACHED(); | 1031 NOTREACHED(); |
| 1031 return nullptr; | 1032 return nullptr; |
| 1032 } | 1033 } |
| 1033 | 1034 |
| 1034 } // namespace ash | 1035 } // namespace ash |
| OLD | NEW |