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

Side by Side Diff: ui/base/events/event_dispatcher.cc

Issue 11415238: events: Allow retrieving the current event being dispatched from EventDispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nits Created 8 years 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 | Annotate | Revision Log
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 "ui/base/events/event_dispatcher.h" 5 #include "ui/base/events/event_dispatcher.h"
6 6
7 namespace ui { 7 namespace ui {
8 8
9 EventDispatcher::EventDispatcher() 9 EventDispatcher::EventDispatcher()
10 : set_on_destroy_(NULL) { 10 : set_on_destroy_(NULL),
11 current_event_(NULL) {
11 } 12 }
12 13
13 EventDispatcher::~EventDispatcher() { 14 EventDispatcher::~EventDispatcher() {
14 if (set_on_destroy_) 15 if (set_on_destroy_)
15 *set_on_destroy_ = true; 16 *set_on_destroy_ = true;
16 } 17 }
17 18
18 //////////////////////////////////////////////////////////////////////////////// 19 ////////////////////////////////////////////////////////////////////////////////
19 // EventDispatcher, private: 20 // EventDispatcher, private:
20 21
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 54
54 EventDispatcher::ScopedDispatchHelper::ScopedDispatchHelper(Event* event) 55 EventDispatcher::ScopedDispatchHelper::ScopedDispatchHelper(Event* event)
55 : Event::DispatcherApi(event) { 56 : Event::DispatcherApi(event) {
56 } 57 }
57 58
58 EventDispatcher::ScopedDispatchHelper::~ScopedDispatchHelper() { 59 EventDispatcher::ScopedDispatchHelper::~ScopedDispatchHelper() {
59 set_phase(EP_POSTDISPATCH); 60 set_phase(EP_POSTDISPATCH);
60 } 61 }
61 62
62 } // namespace ui 63 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698