Index: ash/wm/partial_screenshot_event_filter.cc |
diff --git a/ash/wm/partial_screenshot_event_filter.cc b/ash/wm/partial_screenshot_event_filter.cc |
index ce21e0070de487809367dd104161ca63cd6bcfa9..da0ff29899d4cb3d8ef9751ea8542be7859043b8 100644 |
--- a/ash/wm/partial_screenshot_event_filter.cc |
+++ b/ash/wm/partial_screenshot_event_filter.cc |
@@ -32,7 +32,7 @@ bool PartialScreenshotEventFilter::PreHandleKeyEvent( |
} |
if (event->key_code() == ui::VKEY_ESCAPE) |
- view_->Cancel(); |
+ Cancel(); |
// Always handled: other windows shouldn't receive input while we're |
// taking a screenshot. |
@@ -54,6 +54,19 @@ ui::GestureStatus PartialScreenshotEventFilter::PreHandleGestureEvent( |
return ui::GESTURE_STATUS_UNKNOWN; // Not handled. |
} |
+void PartialScreenshotEventFilter::OnLoginStateChange(bool logged_in, |
+ bool is_guest) { |
+ Cancel(); |
+} |
+ |
+void PartialScreenshotEventFilter::OnExit() { |
+ Cancel(); |
+} |
+ |
+void PartialScreenshotEventFilter::OnLockStateChange(bool locked) { |
+ Cancel(); |
+} |
+ |
void PartialScreenshotEventFilter::Activate(PartialScreenshotView* view) { |
view_ = view; |
} |
@@ -62,5 +75,9 @@ void PartialScreenshotEventFilter::Deactivate() { |
view_ = NULL; |
} |
+void PartialScreenshotEventFilter::Cancel() { |
+ if (view_) |
+ view_->Cancel(); |
+} |
} // namespace internal |
} // namespace ash |