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

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

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 | « ui/events/event_target.h ('k') | ui/views/corewm/window_modality_controller.h » ('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 "ui/events/event_target.h" 5 #include "ui/events/event_target.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 30 matching lines...) Expand all
41 41
42 void EventTarget::RemovePostTargetHandler(EventHandler* handler) { 42 void EventTarget::RemovePostTargetHandler(EventHandler* handler) {
43 EventHandlerList::iterator find = 43 EventHandlerList::iterator find =
44 std::find(post_target_list_.begin(), 44 std::find(post_target_list_.begin(),
45 post_target_list_.end(), 45 post_target_list_.end(),
46 handler); 46 handler);
47 if (find != post_target_list_.end()) 47 if (find != post_target_list_.end())
48 post_target_list_.erase(find); 48 post_target_list_.erase(find);
49 } 49 }
50 50
51 bool EventTarget::IsPreTargetListEmpty() const {
52 return pre_target_list_.empty();
53 }
54
51 void EventTarget::OnEvent(Event* event) { 55 void EventTarget::OnEvent(Event* event) {
52 CHECK_EQ(this, event->target()); 56 CHECK_EQ(this, event->target());
53 if (target_handler_) 57 if (target_handler_)
54 target_handler_->OnEvent(event); 58 target_handler_->OnEvent(event);
55 else 59 else
56 EventHandler::OnEvent(event); 60 EventHandler::OnEvent(event);
57 } 61 }
58 62
59 void EventTarget::OnKeyEvent(KeyEvent* event) { 63 void EventTarget::OnKeyEvent(KeyEvent* event) {
60 CHECK_EQ(this, event->target()); 64 CHECK_EQ(this, event->target());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 while (target) { 109 while (target) {
106 for (EventHandlerList::iterator it = target->post_target_list_.begin(), 110 for (EventHandlerList::iterator it = target->post_target_list_.begin(),
107 end = target->post_target_list_.end(); it != end; ++it) { 111 end = target->post_target_list_.end(); it != end; ++it) {
108 list->push_back(*it); 112 list->push_back(*it);
109 } 113 }
110 target = target->GetParentTarget(); 114 target = target->GetParentTarget();
111 } 115 }
112 } 116 }
113 117
114 } // namespace ui 118 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/event_target.h ('k') | ui/views/corewm/window_modality_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698