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

Side by Side Diff: ui/events/event.h

Issue 519113002: Do not mutate ui::Event properties during nested event processing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments changed Created 6 years, 3 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/window_manager_unittest.cc ('k') | ui/events/event.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 #ifndef UI_EVENTS_EVENT_H_ 5 #ifndef UI_EVENTS_EVENT_H_
6 #define UI_EVENTS_EVENT_H_ 6 #define UI_EVENTS_EVENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/event_types.h" 10 #include "base/event_types.h"
(...skipping 11 matching lines...) Expand all
22 22
23 namespace gfx { 23 namespace gfx {
24 class Transform; 24 class Transform;
25 } 25 }
26 26
27 namespace ui { 27 namespace ui {
28 class EventTarget; 28 class EventTarget;
29 29
30 class EVENTS_EXPORT Event { 30 class EVENTS_EXPORT Event {
31 public: 31 public:
32 static scoped_ptr<Event> Clone(const Event& event);
33
32 virtual ~Event(); 34 virtual ~Event();
33 35
34 class DispatcherApi { 36 class DispatcherApi {
35 public: 37 public:
36 explicit DispatcherApi(Event* event) : event_(event) {} 38 explicit DispatcherApi(Event* event) : event_(event) {}
37 39
38 void set_target(EventTarget* target) { 40 void set_target(EventTarget* target) {
39 event_->target_ = target; 41 event_->target_ = target;
40 } 42 }
41 43
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 777
776 const GestureEventDetails& details() const { return details_; } 778 const GestureEventDetails& details() const { return details_; }
777 779
778 private: 780 private:
779 GestureEventDetails details_; 781 GestureEventDetails details_;
780 }; 782 };
781 783
782 } // namespace ui 784 } // namespace ui
783 785
784 #endif // UI_EVENTS_EVENT_H_ 786 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698