| 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 window_cycle_controller_.reset(); | 642 window_cycle_controller_.reset(); |
| 643 aura::client::SetCaptureClient(root_window, NULL); | 643 aura::client::SetCaptureClient(root_window, NULL); |
| 644 capture_controller_.reset(); | 644 capture_controller_.reset(); |
| 645 aura::client::SetDispatcherClient(root_window, NULL); | 645 aura::client::SetDispatcherClient(root_window, NULL); |
| 646 nested_dispatcher_controller_.reset(); | 646 nested_dispatcher_controller_.reset(); |
| 647 aura::client::SetUserActionClient(root_window, NULL); | 647 aura::client::SetUserActionClient(root_window, NULL); |
| 648 user_action_client_.reset(); | 648 user_action_client_.reset(); |
| 649 aura::client::SetVisibilityClient(root_window, NULL); | 649 aura::client::SetVisibilityClient(root_window, NULL); |
| 650 visibility_controller_.reset(); | 650 visibility_controller_.reset(); |
| 651 | 651 |
| 652 // Delete the activation controller after other controllers | |
| 653 // because they might have registered ActivationChangeObserver. | |
| 654 aura::client::SetActivationClient(root_window, NULL); | |
| 655 activation_controller_.reset(); | |
| 656 | |
| 657 // Launcher widget has a InputMethodBridge that references to | 652 // Launcher widget has a InputMethodBridge that references to |
| 658 // input_method_filter_'s input_method_. So explicitly release launcher_ | 653 // input_method_filter_'s input_method_. So explicitly release launcher_ |
| 659 // before input_method_filter_. And this needs to be after we delete all | 654 // before input_method_filter_. And this needs to be after we delete all |
| 660 // containers in case there are still live browser windows which access | 655 // containers in case there are still live browser windows which access |
| 661 // LauncherModel during close. | 656 // LauncherModel during close. |
| 662 launcher_.reset(); | 657 launcher_.reset(); |
| 663 | 658 |
| 659 // Delete the activation controller after other controllers and launcher |
| 660 // because they might have registered ActivationChangeObserver. |
| 661 aura::client::SetActivationClient(root_window, NULL); |
| 662 activation_controller_.reset(); |
| 663 |
| 664 DCHECK(instance_ == this); | 664 DCHECK(instance_ == this); |
| 665 instance_ = NULL; | 665 instance_ = NULL; |
| 666 | 666 |
| 667 #if defined(OS_CHROMEOS) | 667 #if defined(OS_CHROMEOS) |
| 668 // Remove OutputConfigurator from Dispatcher. | 668 // Remove OutputConfigurator from Dispatcher. |
| 669 static_cast<aura::DispatcherLinux*>( | 669 static_cast<aura::DispatcherLinux*>( |
| 670 aura::Env::GetInstance()->GetDispatcher())->RemoveDispatcherForRootWindow( | 670 aura::Env::GetInstance()->GetDispatcher())->RemoveDispatcherForRootWindow( |
| 671 output_configurator()); | 671 output_configurator()); |
| 672 #endif // defined(OS_CHROMEOS) | 672 #endif // defined(OS_CHROMEOS) |
| 673 } | 673 } |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1106 void Shell::SetCursor(gfx::NativeCursor cursor) { | 1106 void Shell::SetCursor(gfx::NativeCursor cursor) { |
| 1107 // TODO(oshima): set cursor to all root windows. | 1107 // TODO(oshima): set cursor to all root windows. |
| 1108 GetPrimaryRootWindow()->SetCursor(cursor); | 1108 GetPrimaryRootWindow()->SetCursor(cursor); |
| 1109 } | 1109 } |
| 1110 | 1110 |
| 1111 void Shell::ShowCursor(bool visible) { | 1111 void Shell::ShowCursor(bool visible) { |
| 1112 GetPrimaryRootWindow()->ShowCursor(visible); | 1112 GetPrimaryRootWindow()->ShowCursor(visible); |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 } // namespace ash | 1115 } // namespace ash |
| OLD | NEW |