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

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: 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') | ash/shell_observer.h » ('J')
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 d3b19197b4b57628c162577e6925f8346705f154..93d79796ecb8b085057b5dd9fd25d440812c2817 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -655,6 +655,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.
@@ -770,6 +771,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);
@@ -858,6 +860,19 @@ void Shell::SetMonitorWorkAreaInsets(Window* contains,
OnMonitorWorkAreaInsetsChanged());
}
+void Shell::OnLoginStateChanged(bool logged_in, bool is_guest) {
+ FOR_EACH_OBSERVER(ShellObserver, observers_,
+ OnLoginStateChanged(logged_in, is_guest));
+}
+
+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') | ash/shell_observer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698