| 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 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 // Set accelerator controller delegates. | 946 // Set accelerator controller delegates. |
| 947 accelerator_controller_->SetBrightnessControlDelegate( | 947 accelerator_controller_->SetBrightnessControlDelegate( |
| 948 scoped_ptr<ash::BrightnessControlDelegate>( | 948 scoped_ptr<ash::BrightnessControlDelegate>( |
| 949 new ash::system::BrightnessControllerChromeos).Pass()); | 949 new ash::system::BrightnessControllerChromeos).Pass()); |
| 950 | 950 |
| 951 power_event_observer_.reset(new internal::PowerEventObserver()); | 951 power_event_observer_.reset(new internal::PowerEventObserver()); |
| 952 user_activity_notifier_.reset( | 952 user_activity_notifier_.reset( |
| 953 new internal::UserActivityNotifier(user_activity_detector_.get())); | 953 new internal::UserActivityNotifier(user_activity_detector_.get())); |
| 954 video_activity_notifier_.reset( | 954 video_activity_notifier_.reset( |
| 955 new internal::VideoActivityNotifier(video_detector_.get())); | 955 new internal::VideoActivityNotifier(video_detector_.get())); |
| 956 |
| 957 #if defined(USE_X11) |
| 958 cursor_manager_.SetNativeCursorEnabled(false); |
| 959 display_controller_->EnableCompositedCursor( |
| 960 internal::GetRootWindowController(root_window)->GetContainer( |
| 961 internal::kShellWindowId_OverlayContainer)); |
| 962 #endif |
| 963 |
| 956 #endif | 964 #endif |
| 957 | 965 |
| 958 weak_display_manager_factory_.reset( | 966 weak_display_manager_factory_.reset( |
| 959 new base::WeakPtrFactory<internal::DisplayManager>( | 967 new base::WeakPtrFactory<internal::DisplayManager>( |
| 960 display_manager_.get())); | 968 display_manager_.get())); |
| 961 // The compositor thread and main message loop have to be running in | 969 // The compositor thread and main message loop have to be running in |
| 962 // order to create mirror window. Run it after the main message loop | 970 // order to create mirror window. Run it after the main message loop |
| 963 // is started. | 971 // is started. |
| 964 base::MessageLoopForUI::current()->PostTask( | 972 base::MessageLoopForUI::current()->PostTask( |
| 965 FROM_HERE, | 973 FROM_HERE, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 //////////////////////////////////////////////////////////////////////////////// | 1062 //////////////////////////////////////////////////////////////////////////////// |
| 1055 // Shell, aura::client::ActivationChangeObserver implementation: | 1063 // Shell, aura::client::ActivationChangeObserver implementation: |
| 1056 | 1064 |
| 1057 void Shell::OnWindowActivated(aura::Window* gained_active, | 1065 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 1058 aura::Window* lost_active) { | 1066 aura::Window* lost_active) { |
| 1059 if (gained_active) | 1067 if (gained_active) |
| 1060 target_root_window_ = gained_active->GetRootWindow(); | 1068 target_root_window_ = gained_active->GetRootWindow(); |
| 1061 } | 1069 } |
| 1062 | 1070 |
| 1063 } // namespace ash | 1071 } // namespace ash |
| OLD | NEW |