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

Side by Side Diff: ash/shell.cc

Issue 2113053003: Moves Shell::maximize_mode_controller() to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: order Created 4 years, 5 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/shell.h ('k') | ash/system/chromeos/brightness/tray_brightness.cc » ('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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 668
669 // Destroy the virtual keyboard controller before the maximize mode controller 669 // Destroy the virtual keyboard controller before the maximize mode controller
670 // since the latters destructor triggers events that the former is listening 670 // since the latters destructor triggers events that the former is listening
671 // to but no longer cares about. 671 // to but no longer cares about.
672 #if defined(OS_CHROMEOS) 672 #if defined(OS_CHROMEOS)
673 virtual_keyboard_controller_.reset(); 673 virtual_keyboard_controller_.reset();
674 #endif 674 #endif
675 675
676 // Destroy maximize mode controller early on since it has some observers which 676 // Destroy maximize mode controller early on since it has some observers which
677 // need to be removed. 677 // need to be removed.
678 maximize_mode_controller_.reset(); 678 wm_shell_->DeleteMaximizeModeController();
679 679
680 // Destroy the keyboard before closing the shelf, since it will invoke a shelf 680 // Destroy the keyboard before closing the shelf, since it will invoke a shelf
681 // layout. 681 // layout.
682 DeactivateKeyboard(); 682 DeactivateKeyboard();
683 683
684 // Destroy toasts 684 // Destroy toasts
685 toast_manager_.reset(); 685 toast_manager_.reset();
686 686
687 // Destroy SystemTrayDelegate before destroying the status area(s). Make sure 687 // Destroy SystemTrayDelegate before destroying the status area(s). Make sure
688 // to deinitialize the shelf first, as it is initialized after the delegate. 688 // to deinitialize the shelf first, as it is initialized after the delegate.
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 #if defined(OS_CHROMEOS) 915 #if defined(OS_CHROMEOS)
916 resolution_notification_controller_.reset( 916 resolution_notification_controller_.reset(
917 new ResolutionNotificationController); 917 new ResolutionNotificationController);
918 #endif 918 #endif
919 919
920 if (cursor_manager_) 920 if (cursor_manager_)
921 cursor_manager_->SetDisplay( 921 cursor_manager_->SetDisplay(
922 display::Screen::GetScreen()->GetPrimaryDisplay()); 922 display::Screen::GetScreen()->GetPrimaryDisplay());
923 923
924 accelerator_controller_.reset(new AcceleratorController); 924 accelerator_controller_.reset(new AcceleratorController);
925 maximize_mode_controller_.reset(new MaximizeModeController()); 925 wm_shell_->CreateMaximizeModeController();
926 926
927 AddPreTargetHandler(window_tree_host_manager_->input_method_event_handler()); 927 AddPreTargetHandler(window_tree_host_manager_->input_method_event_handler());
928 928
929 #if defined(OS_CHROMEOS) 929 #if defined(OS_CHROMEOS)
930 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler(); 930 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler();
931 AddPreTargetHandler(magnifier_key_scroll_handler_.get()); 931 AddPreTargetHandler(magnifier_key_scroll_handler_.get());
932 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler(); 932 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler();
933 AddPreTargetHandler(speech_feedback_handler_.get()); 933 AddPreTargetHandler(speech_feedback_handler_.get());
934 #endif 934 #endif
935 935
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 1169
1170 void Shell::OnWindowActivated( 1170 void Shell::OnWindowActivated(
1171 aura::client::ActivationChangeObserver::ActivationReason reason, 1171 aura::client::ActivationChangeObserver::ActivationReason reason,
1172 aura::Window* gained_active, 1172 aura::Window* gained_active,
1173 aura::Window* lost_active) { 1173 aura::Window* lost_active) {
1174 if (gained_active) 1174 if (gained_active)
1175 target_root_window_ = gained_active->GetRootWindow(); 1175 target_root_window_ = gained_active->GetRootWindow();
1176 } 1176 }
1177 1177
1178 } // namespace ash 1178 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/system/chromeos/brightness/tray_brightness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698