OLD | NEW |
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/wm/core/compound_event_filter.h" | 5 #include "ui/wm/core/compound_event_filter.h" |
6 | 6 |
7 #include "base/containers/hash_tables.h" | 7 #include "base/containers/hash_tables.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ui/aura/client/activation_client.h" | 9 #include "ui/aura/client/activation_client.h" |
10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } | 284 } |
285 } | 285 } |
286 | 286 |
287 void CompoundEventFilter::OnGestureEvent(ui::GestureEvent* event) { | 287 void CompoundEventFilter::OnGestureEvent(ui::GestureEvent* event) { |
288 if (handlers_.might_have_observers()) { | 288 if (handlers_.might_have_observers()) { |
289 ObserverListBase<ui::EventHandler>::Iterator it(handlers_); | 289 ObserverListBase<ui::EventHandler>::Iterator it(handlers_); |
290 ui::EventHandler* handler; | 290 ui::EventHandler* handler; |
291 while (!event->stopped_propagation() && (handler = it.GetNext()) != NULL) | 291 while (!event->stopped_propagation() && (handler = it.GetNext()) != NULL) |
292 handler->OnGestureEvent(event); | 292 handler->OnGestureEvent(event); |
293 } | 293 } |
| 294 |
| 295 #if defined(OS_WIN) |
| 296 // A Win8 edge swipe event is a special event that does not have location |
| 297 // information associated with it, and is not preceeded by an ET_TOUCH_PRESSED |
| 298 // event. So we treat it specially here. |
| 299 if (!event->handled() && event->type() == ui::ET_GESTURE_WIN8_EDGE_SWIPE && |
| 300 !aura::Env::GetInstance()->IsMouseButtonDown()) { |
| 301 SetMouseEventsEnableStateOnEvent( |
| 302 static_cast<aura::Window*>(event->target()), event, false); |
| 303 } |
| 304 #endif |
294 } | 305 } |
295 | 306 |
296 } // namespace wm | 307 } // namespace wm |
OLD | NEW |