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

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

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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"
11 11
12 namespace ash { 12 namespace ash {
13 13
14 OverlayEventFilter::OverlayEventFilter() 14 OverlayEventFilter::OverlayEventFilter() : delegate_(NULL) {}
15 : delegate_(NULL) {
16 }
17 15
18 OverlayEventFilter::~OverlayEventFilter() { 16 OverlayEventFilter::~OverlayEventFilter() {
19 delegate_ = NULL; 17 delegate_ = NULL;
20 } 18 }
21 19
22 void OverlayEventFilter::OnKeyEvent(ui::KeyEvent* event) { 20 void OverlayEventFilter::OnKeyEvent(ui::KeyEvent* event) {
23 if (!delegate_) 21 if (!delegate_)
24 return; 22 return;
25 23
26 if (delegate_ && delegate_->IsCancelingKeyEvent(event)) 24 if (delegate_ && delegate_->IsCancelingKeyEvent(event))
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 delegate_->Cancel(); 60 delegate_->Cancel();
63 delegate_ = nullptr; 61 delegate_ = nullptr;
64 } 62 }
65 } 63 }
66 64
67 bool OverlayEventFilter::IsActive() { 65 bool OverlayEventFilter::IsActive() {
68 return delegate_ != nullptr; 66 return delegate_ != nullptr;
69 } 67 }
70 68
71 } // namespace ash 69 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/workspace_backdrop_delegate.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698