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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 root->ShowRootWindow(); | 851 root->ShowRootWindow(); |
852 // Activate new root for testing. | 852 // Activate new root for testing. |
853 active_root_window_ = root; | 853 active_root_window_ = root; |
854 } | 854 } |
855 | 855 |
856 void Shell::DoInitialWorkspaceAnimation() { | 856 void Shell::DoInitialWorkspaceAnimation() { |
857 return GetPrimaryRootWindowController()->workspace_controller()-> | 857 return GetPrimaryRootWindowController()->workspace_controller()-> |
858 DoInitialAnimation(); | 858 DoInitialAnimation(); |
859 } | 859 } |
860 | 860 |
861 message_center::MessageCenter* Shell::message_center() { | |
862 if (!message_center_.get()) | |
863 message_center_.reset(new message_center::MessageCenter()); | |
864 return message_center_.get(); | |
865 } | |
866 | |
867 void Shell::InitRootWindowController( | 861 void Shell::InitRootWindowController( |
868 internal::RootWindowController* controller) { | 862 internal::RootWindowController* controller) { |
869 aura::RootWindow* root_window = controller->root_window(); | 863 aura::RootWindow* root_window = controller->root_window(); |
870 DCHECK(activation_client_); | 864 DCHECK(activation_client_); |
871 DCHECK(visibility_controller_.get()); | 865 DCHECK(visibility_controller_.get()); |
872 DCHECK(drag_drop_controller_.get()); | 866 DCHECK(drag_drop_controller_.get()); |
873 DCHECK(capture_controller_.get()); | 867 DCHECK(capture_controller_.get()); |
874 DCHECK(window_cycle_controller_.get()); | 868 DCHECK(window_cycle_controller_.get()); |
875 | 869 |
876 aura::client::SetFocusClient(root_window, focus_client_.get()); | 870 aura::client::SetFocusClient(root_window, focus_client_.get()); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 //////////////////////////////////////////////////////////////////////////////// | 942 //////////////////////////////////////////////////////////////////////////////// |
949 // Shell, aura::client::ActivationChangeObserver implementation: | 943 // Shell, aura::client::ActivationChangeObserver implementation: |
950 | 944 |
951 void Shell::OnWindowActivated(aura::Window* gained_active, | 945 void Shell::OnWindowActivated(aura::Window* gained_active, |
952 aura::Window* lost_active) { | 946 aura::Window* lost_active) { |
953 if (gained_active) | 947 if (gained_active) |
954 active_root_window_ = gained_active->GetRootWindow(); | 948 active_root_window_ = gained_active->GetRootWindow(); |
955 } | 949 } |
956 | 950 |
957 } // namespace ash | 951 } // namespace ash |
OLD | NEW |