| 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..9f4f25667dc146795d4d3dc91098af55d7af9763 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_;
|
| +}
|
| +
|
| } // namespace ash
|
|
|