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

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

Issue 25445002: Ensure that in Desktop AURA the WindowModalityController class is at the head of the event pre targ… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ash/shell.cc ('k') | ui/events/event_target.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_TARGET_H_ 5 #ifndef UI_EVENTS_EVENT_TARGET_H_
6 #define UI_EVENTS_EVENT_TARGET_H_ 6 #define UI_EVENTS_EVENT_TARGET_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 "ui/events/event_handler.h" 10 #include "ui/events/event_handler.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // of the list so it is the first one to receive events. 63 // of the list so it is the first one to receive events.
64 void PrependPreTargetHandler(EventHandler* handler); 64 void PrependPreTargetHandler(EventHandler* handler);
65 void RemovePreTargetHandler(EventHandler* handler); 65 void RemovePreTargetHandler(EventHandler* handler);
66 66
67 // Adds a handler to receive events after the target. The handler must be 67 // Adds a handler to receive events after the target. The handler must be
68 // explicitly removed from the target before the handler is destroyed. The 68 // explicitly removed from the target before the handler is destroyed. The
69 // EventTarget does not take ownership of the handler. 69 // EventTarget does not take ownership of the handler.
70 void AddPostTargetHandler(EventHandler* handler); 70 void AddPostTargetHandler(EventHandler* handler);
71 void RemovePostTargetHandler(EventHandler* handler); 71 void RemovePostTargetHandler(EventHandler* handler);
72 72
73 // Returns true if the event pre target list is empty.
74 bool IsPreTargetListEmpty() const;
75
73 protected: 76 protected:
74 void set_target_handler(EventHandler* handler) { 77 void set_target_handler(EventHandler* handler) {
75 target_handler_ = handler; 78 target_handler_ = handler;
76 } 79 }
77 80
78 // Overridden from EventHandler: 81 // Overridden from EventHandler:
79 virtual void OnEvent(Event* event) OVERRIDE; 82 virtual void OnEvent(Event* event) OVERRIDE;
80 virtual void OnKeyEvent(KeyEvent* event) OVERRIDE; 83 virtual void OnKeyEvent(KeyEvent* event) OVERRIDE;
81 virtual void OnMouseEvent(MouseEvent* event) OVERRIDE; 84 virtual void OnMouseEvent(MouseEvent* event) OVERRIDE;
82 virtual void OnScrollEvent(ScrollEvent* event) OVERRIDE; 85 virtual void OnScrollEvent(ScrollEvent* event) OVERRIDE;
(...skipping 16 matching lines...) Expand all
99 EventHandlerList pre_target_list_; 102 EventHandlerList pre_target_list_;
100 EventHandlerList post_target_list_; 103 EventHandlerList post_target_list_;
101 EventHandler* target_handler_; 104 EventHandler* target_handler_;
102 105
103 DISALLOW_COPY_AND_ASSIGN(EventTarget); 106 DISALLOW_COPY_AND_ASSIGN(EventTarget);
104 }; 107 };
105 108
106 } // namespace ui 109 } // namespace ui
107 110
108 #endif // UI_EVENTS_EVENT_TARGET_H_ 111 #endif // UI_EVENTS_EVENT_TARGET_H_
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ui/events/event_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698