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