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

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: Addressed comments 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 #include "ash/display/resolution_notification_controller.h" 127 #include "ash/display/resolution_notification_controller.h"
128 #include "ash/display/screen_orientation_controller_chromeos.h" 128 #include "ash/display/screen_orientation_controller_chromeos.h"
129 #include "ash/sticky_keys/sticky_keys_controller.h" 129 #include "ash/sticky_keys/sticky_keys_controller.h"
130 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h" 130 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h"
131 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" 131 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h"
132 #include "ash/system/chromeos/power/power_event_observer.h" 132 #include "ash/system/chromeos/power/power_event_observer.h"
133 #include "ash/system/chromeos/power/power_status.h" 133 #include "ash/system/chromeos/power/power_status.h"
134 #include "ash/system/chromeos/power/video_activity_notifier.h" 134 #include "ash/system/chromeos/power/video_activity_notifier.h"
135 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" 135 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h"
136 #include "ash/system/chromeos/session/logout_confirmation_controller.h" 136 #include "ash/system/chromeos/session/logout_confirmation_controller.h"
137 #include "ash/system/toast/toast_manager.h"
137 #include "ash/touch/touch_transformer_controller.h" 138 #include "ash/touch/touch_transformer_controller.h"
138 #include "ash/virtual_keyboard_controller.h" 139 #include "ash/virtual_keyboard_controller.h"
139 #include "base/bind_helpers.h" 140 #include "base/bind_helpers.h"
140 #include "base/sys_info.h" 141 #include "base/sys_info.h"
141 #include "chromeos/dbus/dbus_thread_manager.h" 142 #include "chromeos/dbus/dbus_thread_manager.h"
142 #include "ui/chromeos/user_activity_power_manager_notifier.h" 143 #include "ui/chromeos/user_activity_power_manager_notifier.h"
143 #include "ui/display/chromeos/display_configurator.h" 144 #include "ui/display/chromeos/display_configurator.h"
144 #endif // defined(OS_CHROMEOS) 145 #endif // defined(OS_CHROMEOS)
145 146
146 namespace ash { 147 namespace ash {
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 toplevel_window_event_handler_.reset(new ToplevelWindowEventHandler); 972 toplevel_window_event_handler_.reset(new ToplevelWindowEventHandler);
972 973
973 system_gesture_filter_.reset(new SystemGestureEventFilter); 974 system_gesture_filter_.reset(new SystemGestureEventFilter);
974 AddPreTargetHandler(system_gesture_filter_.get()); 975 AddPreTargetHandler(system_gesture_filter_.get());
975 976
976 keyboard_metrics_filter_.reset(new KeyboardUMAEventFilter); 977 keyboard_metrics_filter_.reset(new KeyboardUMAEventFilter);
977 AddPreTargetHandler(keyboard_metrics_filter_.get()); 978 AddPreTargetHandler(keyboard_metrics_filter_.get());
978 979
979 #if defined(OS_CHROMEOS) 980 #if defined(OS_CHROMEOS)
980 sticky_keys_controller_.reset(new StickyKeysController); 981 sticky_keys_controller_.reset(new StickyKeysController);
982 toast_manager_.reset(new ToastManager);
981 #endif 983 #endif
982 984
983 lock_state_controller_.reset(new LockStateController); 985 lock_state_controller_.reset(new LockStateController);
984 power_button_controller_.reset(new PowerButtonController( 986 power_button_controller_.reset(new PowerButtonController(
985 lock_state_controller_.get())); 987 lock_state_controller_.get()));
986 #if defined(OS_CHROMEOS) 988 #if defined(OS_CHROMEOS)
987 // Pass the initial display state to PowerButtonController. 989 // Pass the initial display state to PowerButtonController.
988 power_button_controller_->OnDisplayModeChanged( 990 power_button_controller_->OnDisplayModeChanged(
989 display_configurator_->cached_displays()); 991 display_configurator_->cached_displays());
990 #endif 992 #endif
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 1200
1199 void Shell::OnWindowActivated( 1201 void Shell::OnWindowActivated(
1200 aura::client::ActivationChangeObserver::ActivationReason reason, 1202 aura::client::ActivationChangeObserver::ActivationReason reason,
1201 aura::Window* gained_active, 1203 aura::Window* gained_active,
1202 aura::Window* lost_active) { 1204 aura::Window* lost_active) {
1203 if (gained_active) 1205 if (gained_active)
1204 target_root_window_ = gained_active->GetRootWindow(); 1206 target_root_window_ = gained_active->GetRootWindow();
1205 } 1207 }
1206 1208
1207 } // namespace ash 1209 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698