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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 } | 390 } |
391 | 391 |
392 void Shell::OnMaximizeModeStarted() { | 392 void Shell::OnMaximizeModeStarted() { |
393 FOR_EACH_OBSERVER(ShellObserver, observers_, OnMaximizeModeStarted()); | 393 FOR_EACH_OBSERVER(ShellObserver, observers_, OnMaximizeModeStarted()); |
394 } | 394 } |
395 | 395 |
396 void Shell::OnMaximizeModeEnded() { | 396 void Shell::OnMaximizeModeEnded() { |
397 FOR_EACH_OBSERVER(ShellObserver, observers_, OnMaximizeModeEnded()); | 397 FOR_EACH_OBSERVER(ShellObserver, observers_, OnMaximizeModeEnded()); |
398 } | 398 } |
399 | 399 |
| 400 void Shell::OnRootWindowAdded(aura::Window* root_window) { |
| 401 FOR_EACH_OBSERVER(ShellObserver, observers_, OnRootWindowAdded(root_window)); |
| 402 } |
| 403 |
400 void Shell::CreateShelf() { | 404 void Shell::CreateShelf() { |
401 RootWindowControllerList controllers = GetAllRootWindowControllers(); | 405 RootWindowControllerList controllers = GetAllRootWindowControllers(); |
402 for (RootWindowControllerList::iterator iter = controllers.begin(); | 406 for (RootWindowControllerList::iterator iter = controllers.begin(); |
403 iter != controllers.end(); ++iter) | 407 iter != controllers.end(); ++iter) |
404 (*iter)->shelf()->CreateShelf(); | 408 (*iter)->shelf()->CreateShelf(); |
405 } | 409 } |
406 | 410 |
407 void Shell::CreateKeyboard() { | 411 void Shell::CreateKeyboard() { |
408 // TODO(bshe): Primary root window controller may not be the controller to | 412 // TODO(bshe): Primary root window controller may not be the controller to |
409 // attach virtual keyboard. See http://crbug.com/303429 | 413 // attach virtual keyboard. See http://crbug.com/303429 |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 // Controllers who have WindowObserver added must be deleted | 696 // Controllers who have WindowObserver added must be deleted |
693 // before |display_controller_| is deleted. | 697 // before |display_controller_| is deleted. |
694 | 698 |
695 #if defined(OS_CHROMEOS) | 699 #if defined(OS_CHROMEOS) |
696 // VideoActivityNotifier must be deleted before |video_detector_| is | 700 // VideoActivityNotifier must be deleted before |video_detector_| is |
697 // deleted because it's observing video activity through | 701 // deleted because it's observing video activity through |
698 // VideoDetectorObserver interface. | 702 // VideoDetectorObserver interface. |
699 video_activity_notifier_.reset(); | 703 video_activity_notifier_.reset(); |
700 #endif // defined(OS_CHROMEOS) | 704 #endif // defined(OS_CHROMEOS) |
701 video_detector_.reset(); | 705 video_detector_.reset(); |
| 706 high_contrast_controller_.reset(); |
702 | 707 |
703 shadow_controller_.reset(); | 708 shadow_controller_.reset(); |
704 resize_shadow_controller_.reset(); | 709 resize_shadow_controller_.reset(); |
705 | 710 |
706 window_selector_controller_.reset(); | 711 window_selector_controller_.reset(); |
707 mru_window_tracker_.reset(); | 712 mru_window_tracker_.reset(); |
708 | 713 |
709 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| | 714 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| |
710 // and has window observers. | 715 // and has window observers. |
711 shelf_window_watcher_.reset(); | 716 shelf_window_watcher_.reset(); |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 //////////////////////////////////////////////////////////////////////////////// | 1116 //////////////////////////////////////////////////////////////////////////////// |
1112 // Shell, aura::client::ActivationChangeObserver implementation: | 1117 // Shell, aura::client::ActivationChangeObserver implementation: |
1113 | 1118 |
1114 void Shell::OnWindowActivated(aura::Window* gained_active, | 1119 void Shell::OnWindowActivated(aura::Window* gained_active, |
1115 aura::Window* lost_active) { | 1120 aura::Window* lost_active) { |
1116 if (gained_active) | 1121 if (gained_active) |
1117 target_root_window_ = gained_active->GetRootWindow(); | 1122 target_root_window_ = gained_active->GetRootWindow(); |
1118 } | 1123 } |
1119 | 1124 |
1120 } // namespace ash | 1125 } // namespace ash |
OLD | NEW |