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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 #endif // defined(OS_CHROMEOS) | 623 #endif // defined(OS_CHROMEOS) |
624 | 624 |
625 #if defined(OS_CHROMEOS) | 625 #if defined(OS_CHROMEOS) |
626 internal::PowerStatus::Initialize(); | 626 internal::PowerStatus::Initialize(); |
627 #endif | 627 #endif |
628 } | 628 } |
629 | 629 |
630 Shell::~Shell() { | 630 Shell::~Shell() { |
631 TRACE_EVENT0("shutdown", "ash::Shell::Destructor"); | 631 TRACE_EVENT0("shutdown", "ash::Shell::Destructor"); |
632 | 632 |
| 633 delegate_->PreShutdown(); |
| 634 |
633 views::FocusManagerFactory::Install(NULL); | 635 views::FocusManagerFactory::Install(NULL); |
634 | 636 |
635 // Remove the focus from any window. This will prevent overhead and side | 637 // Remove the focus from any window. This will prevent overhead and side |
636 // effects (e.g. crashes) from changing focus during shutdown. | 638 // effects (e.g. crashes) from changing focus during shutdown. |
637 // See bug crbug.com/134502. | 639 // See bug crbug.com/134502. |
638 aura::client::GetFocusClient(GetPrimaryRootWindow())->FocusWindow(NULL); | 640 aura::client::GetFocusClient(GetPrimaryRootWindow())->FocusWindow(NULL); |
639 | 641 |
640 // Please keep in same order as in Init() because it's easy to miss one. | 642 // Please keep in same order as in Init() because it's easy to miss one. |
641 if (window_modality_controller_) | 643 if (window_modality_controller_) |
642 window_modality_controller_.reset(); | 644 window_modality_controller_.reset(); |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 //////////////////////////////////////////////////////////////////////////////// | 1115 //////////////////////////////////////////////////////////////////////////////// |
1114 // Shell, aura::client::ActivationChangeObserver implementation: | 1116 // Shell, aura::client::ActivationChangeObserver implementation: |
1115 | 1117 |
1116 void Shell::OnWindowActivated(aura::Window* gained_active, | 1118 void Shell::OnWindowActivated(aura::Window* gained_active, |
1117 aura::Window* lost_active) { | 1119 aura::Window* lost_active) { |
1118 if (gained_active) | 1120 if (gained_active) |
1119 target_root_window_ = gained_active->GetRootWindow(); | 1121 target_root_window_ = gained_active->GetRootWindow(); |
1120 } | 1122 } |
1121 | 1123 |
1122 } // namespace ash | 1124 } // namespace ash |
OLD | NEW |