Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: ash/root_window_controller.cc

Issue 308683002: Move MaximizeModeWindowManager to the controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/frame/custom_frame_view_ash_unittest.cc ('k') | ash/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 else 1103 else
1101 DisableTouchHudProjection(); 1104 DisableTouchHudProjection();
1102 } 1105 }
1103 1106
1104 RootWindowController* GetRootWindowController( 1107 RootWindowController* GetRootWindowController(
1105 const aura::Window* root_window) { 1108 const aura::Window* root_window) {
1106 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; 1109 return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
1107 } 1110 }
1108 1111
1109 } // namespace ash 1112 } // namespace ash
OLDNEW
« no previous file with comments | « ash/frame/custom_frame_view_ash_unittest.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698