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

Side by Side Diff: ash/shell.cc

Issue 1782793002: Ash: Implement Toasts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment Created 4 years, 9 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "ash/shelf/shelf_layout_manager.h" 46 #include "ash/shelf/shelf_layout_manager.h"
47 #include "ash/shelf/shelf_model.h" 47 #include "ash/shelf/shelf_model.h"
48 #include "ash/shelf/shelf_widget.h" 48 #include "ash/shelf/shelf_widget.h"
49 #include "ash/shelf/shelf_window_watcher.h" 49 #include "ash/shelf/shelf_window_watcher.h"
50 #include "ash/shell_delegate.h" 50 #include "ash/shell_delegate.h"
51 #include "ash/shell_factory.h" 51 #include "ash/shell_factory.h"
52 #include "ash/shell_init_params.h" 52 #include "ash/shell_init_params.h"
53 #include "ash/shell_window_ids.h" 53 #include "ash/shell_window_ids.h"
54 #include "ash/system/locale/locale_notification_controller.h" 54 #include "ash/system/locale/locale_notification_controller.h"
55 #include "ash/system/status_area_widget.h" 55 #include "ash/system/status_area_widget.h"
56 #include "ash/system/toast/toast_manager.h"
56 #include "ash/system/tray/system_tray_delegate.h" 57 #include "ash/system/tray/system_tray_delegate.h"
57 #include "ash/system/tray/system_tray_notifier.h" 58 #include "ash/system/tray/system_tray_notifier.h"
58 #include "ash/utility/partial_screenshot_controller.h" 59 #include "ash/utility/partial_screenshot_controller.h"
59 #include "ash/wm/app_list_controller.h" 60 #include "ash/wm/app_list_controller.h"
60 #include "ash/wm/ash_focus_rules.h" 61 #include "ash/wm/ash_focus_rules.h"
61 #include "ash/wm/ash_native_cursor_manager.h" 62 #include "ash/wm/ash_native_cursor_manager.h"
62 #include "ash/wm/coordinate_conversion.h" 63 #include "ash/wm/coordinate_conversion.h"
63 #include "ash/wm/event_client_impl.h" 64 #include "ash/wm/event_client_impl.h"
64 #include "ash/wm/lock_state_controller.h" 65 #include "ash/wm/lock_state_controller.h"
65 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 66 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 #endif // defined(OS_CHROMEOS) 755 #endif // defined(OS_CHROMEOS)
755 video_detector_.reset(); 756 video_detector_.reset();
756 high_contrast_controller_.reset(); 757 high_contrast_controller_.reset();
757 758
758 shadow_controller_.reset(); 759 shadow_controller_.reset();
759 resize_shadow_controller_.reset(); 760 resize_shadow_controller_.reset();
760 761
761 window_cycle_controller_.reset(); 762 window_cycle_controller_.reset();
762 window_selector_controller_.reset(); 763 window_selector_controller_.reset();
763 764
765 toast_manager_.reset();
oshima 2016/03/15 09:07:32 can you move this to the reverse order of the crea
yoshiki 2016/03/15 15:04:22 Done.
766
764 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| 767 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_|
765 // and has window observers. 768 // and has window observers.
766 shelf_window_watcher_.reset(); 769 shelf_window_watcher_.reset();
767 770
768 // Destroy all child windows including widgets. 771 // Destroy all child windows including widgets.
769 window_tree_host_manager_->CloseChildWindows(); 772 window_tree_host_manager_->CloseChildWindows();
770 // MruWindowTracker must be destroyed after all windows have been deleted to 773 // MruWindowTracker must be destroyed after all windows have been deleted to
771 // avoid a possible crash when Shell is destroyed from a non-normal shutdown 774 // avoid a possible crash when Shell is destroyed from a non-normal shutdown
772 // path. (crbug.com/485438). 775 // path. (crbug.com/485438).
773 mru_window_tracker_.reset(); 776 mru_window_tracker_.reset();
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 system_gesture_filter_.reset(new SystemGestureEventFilter); 976 system_gesture_filter_.reset(new SystemGestureEventFilter);
974 AddPreTargetHandler(system_gesture_filter_.get()); 977 AddPreTargetHandler(system_gesture_filter_.get());
975 978
976 keyboard_metrics_filter_.reset(new KeyboardUMAEventFilter); 979 keyboard_metrics_filter_.reset(new KeyboardUMAEventFilter);
977 AddPreTargetHandler(keyboard_metrics_filter_.get()); 980 AddPreTargetHandler(keyboard_metrics_filter_.get());
978 981
979 #if defined(OS_CHROMEOS) 982 #if defined(OS_CHROMEOS)
980 sticky_keys_controller_.reset(new StickyKeysController); 983 sticky_keys_controller_.reset(new StickyKeysController);
981 #endif 984 #endif
982 985
986 toast_manager_.reset(new ToastManager);
987
983 lock_state_controller_.reset(new LockStateController); 988 lock_state_controller_.reset(new LockStateController);
984 power_button_controller_.reset(new PowerButtonController( 989 power_button_controller_.reset(new PowerButtonController(
985 lock_state_controller_.get())); 990 lock_state_controller_.get()));
986 #if defined(OS_CHROMEOS) 991 #if defined(OS_CHROMEOS)
987 // Pass the initial display state to PowerButtonController. 992 // Pass the initial display state to PowerButtonController.
988 power_button_controller_->OnDisplayModeChanged( 993 power_button_controller_->OnDisplayModeChanged(
989 display_configurator_->cached_displays()); 994 display_configurator_->cached_displays());
990 #endif 995 #endif
991 AddShellObserver(lock_state_controller_.get()); 996 AddShellObserver(lock_state_controller_.get());
992 997
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 1203
1199 void Shell::OnWindowActivated( 1204 void Shell::OnWindowActivated(
1200 aura::client::ActivationChangeObserver::ActivationReason reason, 1205 aura::client::ActivationChangeObserver::ActivationReason reason,
1201 aura::Window* gained_active, 1206 aura::Window* gained_active,
1202 aura::Window* lost_active) { 1207 aura::Window* lost_active) {
1203 if (gained_active) 1208 if (gained_active)
1204 target_root_window_ = gained_active->GetRootWindow(); 1209 target_root_window_ = gained_active->GetRootWindow();
1205 } 1210 }
1206 1211
1207 } // namespace ash 1212 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/system/toast/OWNER » ('j') | ash/system/toast/toast_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698