| 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/accelerator_controller.h" | 10 #include "ash/accelerators/accelerator_controller.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "ash/shelf/shelf_item_delegate.h" | 42 #include "ash/shelf/shelf_item_delegate.h" |
| 43 #include "ash/shelf/shelf_item_delegate_manager.h" | 43 #include "ash/shelf/shelf_item_delegate_manager.h" |
| 44 #include "ash/shelf/shelf_layout_manager.h" | 44 #include "ash/shelf/shelf_layout_manager.h" |
| 45 #include "ash/shelf/shelf_model.h" | 45 #include "ash/shelf/shelf_model.h" |
| 46 #include "ash/shelf/shelf_widget.h" | 46 #include "ash/shelf/shelf_widget.h" |
| 47 #include "ash/shelf/shelf_window_watcher.h" | 47 #include "ash/shelf/shelf_window_watcher.h" |
| 48 #include "ash/shell_delegate.h" | 48 #include "ash/shell_delegate.h" |
| 49 #include "ash/shell_factory.h" | 49 #include "ash/shell_factory.h" |
| 50 #include "ash/shell_init_params.h" | 50 #include "ash/shell_init_params.h" |
| 51 #include "ash/shell_window_ids.h" | 51 #include "ash/shell_window_ids.h" |
| 52 #include "ash/surfaces/surface_controller.h" |
| 52 #include "ash/system/locale/locale_notification_controller.h" | 53 #include "ash/system/locale/locale_notification_controller.h" |
| 53 #include "ash/system/status_area_widget.h" | 54 #include "ash/system/status_area_widget.h" |
| 54 #include "ash/system/tray/system_tray_delegate.h" | 55 #include "ash/system/tray/system_tray_delegate.h" |
| 55 #include "ash/system/tray/system_tray_notifier.h" | 56 #include "ash/system/tray/system_tray_notifier.h" |
| 56 #include "ash/utility/partial_screenshot_controller.h" | 57 #include "ash/utility/partial_screenshot_controller.h" |
| 57 #include "ash/wm/app_list_controller.h" | 58 #include "ash/wm/app_list_controller.h" |
| 58 #include "ash/wm/ash_focus_rules.h" | 59 #include "ash/wm/ash_focus_rules.h" |
| 59 #include "ash/wm/ash_native_cursor_manager.h" | 60 #include "ash/wm/ash_native_cursor_manager.h" |
| 60 #include "ash/wm/coordinate_conversion.h" | 61 #include "ash/wm/coordinate_conversion.h" |
| 61 #include "ash/wm/event_client_impl.h" | 62 #include "ash/wm/event_client_impl.h" |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 scoped_ptr<::wm::NativeCursorManager>(native_cursor_manager_)), | 647 scoped_ptr<::wm::NativeCursorManager>(native_cursor_manager_)), |
| 647 simulate_modal_window_open_for_testing_(false), | 648 simulate_modal_window_open_for_testing_(false), |
| 648 is_touch_hud_projection_enabled_(false), | 649 is_touch_hud_projection_enabled_(false), |
| 649 blocking_pool_(blocking_pool) { | 650 blocking_pool_(blocking_pool) { |
| 650 DCHECK(delegate_.get()); | 651 DCHECK(delegate_.get()); |
| 651 DCHECK(aura::Env::GetInstanceDontCreate()); | 652 DCHECK(aura::Env::GetInstanceDontCreate()); |
| 652 gpu_support_.reset(delegate_->CreateGPUSupport()); | 653 gpu_support_.reset(delegate_->CreateGPUSupport()); |
| 653 display_manager_.reset(new DisplayManager); | 654 display_manager_.reset(new DisplayManager); |
| 654 window_tree_host_manager_.reset(new WindowTreeHostManager); | 655 window_tree_host_manager_.reset(new WindowTreeHostManager); |
| 655 user_metrics_recorder_.reset(new UserMetricsRecorder); | 656 user_metrics_recorder_.reset(new UserMetricsRecorder); |
| 657 surface_controller_.reset(new SurfaceController); |
| 656 | 658 |
| 657 #if defined(OS_CHROMEOS) | 659 #if defined(OS_CHROMEOS) |
| 658 PowerStatus::Initialize(); | 660 PowerStatus::Initialize(); |
| 659 #endif | 661 #endif |
| 660 } | 662 } |
| 661 | 663 |
| 662 Shell::~Shell() { | 664 Shell::~Shell() { |
| 663 TRACE_EVENT0("shutdown", "ash::Shell::Destructor"); | 665 TRACE_EVENT0("shutdown", "ash::Shell::Destructor"); |
| 664 | 666 |
| 665 user_metrics_recorder_->OnShellShuttingDown(); | 667 user_metrics_recorder_->OnShellShuttingDown(); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 toplevel_window_event_handler_.reset(); | 787 toplevel_window_event_handler_.reset(); |
| 786 visibility_controller_.reset(); | 788 visibility_controller_.reset(); |
| 787 // |shelf_item_delegate_manager_| observes |shelf_model_|. It must be | 789 // |shelf_item_delegate_manager_| observes |shelf_model_|. It must be |
| 788 // destroyed before |shelf_model_| is destroyed. | 790 // destroyed before |shelf_model_| is destroyed. |
| 789 shelf_item_delegate_manager_.reset(); | 791 shelf_item_delegate_manager_.reset(); |
| 790 shelf_model_.reset(); | 792 shelf_model_.reset(); |
| 791 | 793 |
| 792 power_button_controller_.reset(); | 794 power_button_controller_.reset(); |
| 793 lock_state_controller_.reset(); | 795 lock_state_controller_.reset(); |
| 794 | 796 |
| 797 surface_controller_.reset(); |
| 798 |
| 795 #if defined(OS_CHROMEOS) | 799 #if defined(OS_CHROMEOS) |
| 796 resolution_notification_controller_.reset(); | 800 resolution_notification_controller_.reset(); |
| 797 #endif | 801 #endif |
| 798 desktop_background_controller_.reset(); | 802 desktop_background_controller_.reset(); |
| 799 partial_screenshot_controller_.reset(); | 803 partial_screenshot_controller_.reset(); |
| 800 mouse_cursor_filter_.reset(); | 804 mouse_cursor_filter_.reset(); |
| 801 | 805 |
| 802 #if defined(OS_CHROMEOS) | 806 #if defined(OS_CHROMEOS) |
| 803 touch_transformer_controller_.reset(); | 807 touch_transformer_controller_.reset(); |
| 804 #endif // defined(OS_CHROMEOS) | 808 #endif // defined(OS_CHROMEOS) |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 | 1181 |
| 1178 void Shell::OnWindowActivated( | 1182 void Shell::OnWindowActivated( |
| 1179 aura::client::ActivationChangeObserver::ActivationReason reason, | 1183 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 1180 aura::Window* gained_active, | 1184 aura::Window* gained_active, |
| 1181 aura::Window* lost_active) { | 1185 aura::Window* lost_active) { |
| 1182 if (gained_active) | 1186 if (gained_active) |
| 1183 target_root_window_ = gained_active->GetRootWindow(); | 1187 target_root_window_ = gained_active->GetRootWindow(); |
| 1184 } | 1188 } |
| 1185 | 1189 |
| 1186 } // namespace ash | 1190 } // namespace ash |
| OLD | NEW |