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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
299 virtual void OnAccessibilityModeChanged( | 299 virtual void OnAccessibilityModeChanged( |
300 AccessibilityNotificationVisibility notify) OVERRIDE { | 300 AccessibilityNotificationVisibility notify) OVERRIDE { |
301 UpdateTouchExplorationState(); | 301 UpdateTouchExplorationState(); |
302 } | 302 } |
303 | 303 |
304 scoped_ptr<ui::TouchExplorationController> touch_exploration_controller_; | 304 scoped_ptr<ui::TouchExplorationController> touch_exploration_controller_; |
305 RootWindowController* root_window_controller_; | 305 RootWindowController* root_window_controller_; |
306 | 306 |
307 DISALLOW_COPY_AND_ASSIGN(CrosAccessibilityObserver); | 307 DISALLOW_COPY_AND_ASSIGN(CrosAccessibilityObserver); |
308 }; | 308 }; |
309 #endif // OS_CHROMEOS | 309 #endif // OS_CHROMEOS |
jonross
2014/05/29 15:24:42
cpplint
| |
310 | 310 |
311 } // namespace | 311 } // namespace |
312 | 312 |
313 void RootWindowController::CreateForPrimaryDisplay(AshWindowTreeHost* host) { | 313 void RootWindowController::CreateForPrimaryDisplay(AshWindowTreeHost* host) { |
314 RootWindowController* controller = new RootWindowController(host); | 314 RootWindowController* controller = new RootWindowController(host); |
315 controller->Init(RootWindowController::PRIMARY, | 315 controller->Init(RootWindowController::PRIMARY, |
316 Shell::GetInstance()->delegate()->IsFirstRunAfterBoot()); | 316 Shell::GetInstance()->delegate()->IsFirstRunAfterBoot()); |
317 } | 317 } |
318 | 318 |
319 void RootWindowController::CreateForSecondaryDisplay(AshWindowTreeHost* host) { | 319 void RootWindowController::CreateForSecondaryDisplay(AshWindowTreeHost* host) { |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
519 // before move it to |kDesktopController|. | 519 // before move it to |kDesktopController|. |
520 DCHECK_EQ(controller->widget(), widget); | 520 DCHECK_EQ(controller->widget(), widget); |
521 // Release the old controller and close its background widget. | 521 // Release the old controller and close its background widget. |
522 SetWallpaperController(controller); | 522 SetWallpaperController(controller); |
523 } | 523 } |
524 } | 524 } |
525 | 525 |
526 void RootWindowController::CloseChildWindows() { | 526 void RootWindowController::CloseChildWindows() { |
527 mouse_event_target_.reset(); | 527 mouse_event_target_.reset(); |
528 | 528 |
529 // Remove observer as deactivating keyboard causes |docked_layout_manager_| | |
530 // to fire notifications. | |
531 if (docked_layout_manager_ && shelf_ && shelf_->shelf_layout_manager()) | |
532 docked_layout_manager_->RemoveObserver(shelf_->shelf_layout_manager()); | |
533 | |
529 // Deactivate keyboard container before closing child windows and shutting | 534 // Deactivate keyboard container before closing child windows and shutting |
530 // down associated layout managers. | 535 // down associated layout managers. |
531 DeactivateKeyboard(keyboard::KeyboardController::GetInstance()); | 536 DeactivateKeyboard(keyboard::KeyboardController::GetInstance()); |
532 | 537 |
533 // panel_layout_manager_ needs to be shut down before windows are destroyed. | 538 // panel_layout_manager_ needs to be shut down before windows are destroyed. |
534 if (panel_layout_manager_) { | 539 if (panel_layout_manager_) { |
535 panel_layout_manager_->Shutdown(); | 540 panel_layout_manager_->Shutdown(); |
536 panel_layout_manager_ = NULL; | 541 panel_layout_manager_ = NULL; |
537 } | 542 } |
538 // docked_layout_manager_ needs to be shut down before windows are destroyed. | 543 // docked_layout_manager_ needs to be shut down before windows are destroyed. |
539 if (docked_layout_manager_) { | 544 if (docked_layout_manager_) { |
540 if (shelf_ && shelf_->shelf_layout_manager()) | |
541 docked_layout_manager_->RemoveObserver(shelf_->shelf_layout_manager()); | |
542 docked_layout_manager_->Shutdown(); | 545 docked_layout_manager_->Shutdown(); |
543 docked_layout_manager_ = NULL; | 546 docked_layout_manager_ = NULL; |
544 } | 547 } |
545 aura::Window* root_window = GetRootWindow(); | 548 aura::Window* root_window = GetRootWindow(); |
546 aura::client::SetDragDropClient(root_window, NULL); | 549 aura::client::SetDragDropClient(root_window, NULL); |
547 | 550 |
548 // TODO(harrym): Remove when Status Area Widget is a child view. | 551 // TODO(harrym): Remove when Status Area Widget is a child view. |
549 if (shelf_) { | 552 if (shelf_) { |
550 shelf_->ShutdownStatusAreaWidget(); | 553 shelf_->ShutdownStatusAreaWidget(); |
551 | 554 |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1097 else | 1100 else |
1098 DisableTouchHudProjection(); | 1101 DisableTouchHudProjection(); |
1099 } | 1102 } |
1100 | 1103 |
1101 RootWindowController* GetRootWindowController( | 1104 RootWindowController* GetRootWindowController( |
1102 const aura::Window* root_window) { | 1105 const aura::Window* root_window) { |
1103 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1106 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
1104 } | 1107 } |
1105 | 1108 |
1106 } // namespace ash | 1109 } // namespace ash |
OLD | NEW |