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

Unified Diff: ash/shell.cc

Issue 10008074: Cancel partial screenshot UI when lock happens. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: coding style fix Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.h ('k') | ash/shell_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 3b0b0b8b3664673c117cede8f80b73b0e709c717..8f4b07281205d13a722bda3c3beddbec6bd6c132 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -657,6 +657,7 @@ void Shell::Init() {
DCHECK_EQ(1U, GetRootWindowEventFilterCount());
partial_screenshot_filter_.reset(new internal::PartialScreenshotEventFilter);
AddRootWindowEventFilter(partial_screenshot_filter_.get());
+ AddShellObserver(partial_screenshot_filter_.get());
// Then AcceleratorFilter and InputMethodEventFilter must be added (in this
// order) since they have the second highest priority.
@@ -772,6 +773,7 @@ void Shell::Init() {
drag_drop_controller_.reset(new internal::DragDropController);
power_button_controller_.reset(new PowerButtonController);
+ AddShellObserver(power_button_controller_.get());
video_detector_.reset(new VideoDetector);
window_cycle_controller_.reset(new WindowCycleController);
monitor_controller_.reset(new internal::MonitorController);
@@ -860,6 +862,18 @@ void Shell::SetMonitorWorkAreaInsets(Window* contains,
OnMonitorWorkAreaInsetsChanged());
}
+void Shell::OnLoginStateChanged(user::LoginStatus status) {
+ FOR_EACH_OBSERVER(ShellObserver, observers_, OnLoginStateChanged(status));
+}
+
+void Shell::OnAppTerminating() {
+ FOR_EACH_OBSERVER(ShellObserver, observers_, OnAppTerminating());
+}
+
+void Shell::OnLockStateChanged(bool locked) {
+ FOR_EACH_OBSERVER(ShellObserver, observers_, OnLockStateChanged(locked));
+}
+
void Shell::CreateLauncher() {
if (launcher_.get())
return;
« no previous file with comments | « ash/shell.h ('k') | ash/shell_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698