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

Unified Diff: ash/wm/overlay_event_filter.cc

Issue 461093003: Fix the bug of multiple overlays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix Created 6 years, 4 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/wm/overlay_event_filter.h ('k') | ash/wm/overlay_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overlay_event_filter.cc
diff --git a/ash/wm/overlay_event_filter.cc b/ash/wm/overlay_event_filter.cc
index cd5a487650aa9f5ab6a2d0b95162626f0a99cb00..2e1c998370e3aa0e818bd3f7f2ebedbcdc7e1e27 100644
--- a/ash/wm/overlay_event_filter.cc
+++ b/ash/wm/overlay_event_filter.cc
@@ -56,11 +56,14 @@ void OverlayEventFilter::OnLockStateChanged(bool locked) {
}
void OverlayEventFilter::Activate(Delegate* delegate) {
+ if (delegate_)
+ delegate_->Cancel();
delegate_ = delegate;
}
-void OverlayEventFilter::Deactivate() {
- delegate_ = NULL;
+void OverlayEventFilter::Deactivate(Delegate* delegate) {
+ if (delegate_ == delegate)
+ delegate_ = NULL;
}
void OverlayEventFilter::Cancel() {
@@ -68,4 +71,8 @@ void OverlayEventFilter::Cancel() {
delegate_->Cancel();
}
+bool OverlayEventFilter::IsActive() {
+ return delegate_ != NULL;
+}
+
} // namespace ash
« no previous file with comments | « ash/wm/overlay_event_filter.h ('k') | ash/wm/overlay_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698