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

Side by Side Diff: ash/wm/overlay_event_filter.cc

Issue 2041233005: Moves ash::user::LoginStatus to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « ash/wm/overlay_event_filter.h ('k') | ash/wm/overview/window_selector_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/overlay_event_filter.h" 5 #include "ash/wm/overlay_event_filter.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 #include "ui/aura/window_delegate.h" 8 #include "ui/aura/window_delegate.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
(...skipping 16 matching lines...) Expand all
27 Cancel(); 27 Cancel();
28 28
29 // Pass key events only when they are sent to a child of the delegate's 29 // Pass key events only when they are sent to a child of the delegate's
30 // window. 30 // window.
31 aura::Window* target = static_cast<aura::Window*>(event->target()); 31 aura::Window* target = static_cast<aura::Window*>(event->target());
32 if (!delegate_ || !delegate_->GetWindow() || 32 if (!delegate_ || !delegate_->GetWindow() ||
33 !delegate_->GetWindow()->Contains(target)) 33 !delegate_->GetWindow()->Contains(target))
34 event->StopPropagation(); 34 event->StopPropagation();
35 } 35 }
36 36
37 void OverlayEventFilter::OnLoginStateChanged( 37 void OverlayEventFilter::OnLoginStateChanged(LoginStatus status) {
38 user::LoginStatus status) {
39 Cancel(); 38 Cancel();
40 } 39 }
41 40
42 void OverlayEventFilter::OnAppTerminating() { 41 void OverlayEventFilter::OnAppTerminating() {
43 Cancel(); 42 Cancel();
44 } 43 }
45 44
46 void OverlayEventFilter::OnLockStateChanged(bool locked) { 45 void OverlayEventFilter::OnLockStateChanged(bool locked) {
47 Cancel(); 46 Cancel();
48 } 47 }
(...skipping 14 matching lines...) Expand all
63 delegate_->Cancel(); 62 delegate_->Cancel();
64 delegate_ = nullptr; 63 delegate_ = nullptr;
65 } 64 }
66 } 65 }
67 66
68 bool OverlayEventFilter::IsActive() { 67 bool OverlayEventFilter::IsActive() {
69 return delegate_ != nullptr; 68 return delegate_ != nullptr;
70 } 69 }
71 70
72 } // namespace ash 71 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overlay_event_filter.h ('k') | ash/wm/overview/window_selector_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698