| 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/aura/root_window.h" | 5 #include "ui/aura/root_window.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 target = ConsumerToWindow( | 823 target = ConsumerToWindow( |
| 824 gesture_recognizer_->GetTargetForLocation(event->location())); | 824 gesture_recognizer_->GetTargetForLocation(event->location())); |
| 825 } | 825 } |
| 826 } | 826 } |
| 827 | 827 |
| 828 ui::EventResult result = ui::ER_UNHANDLED; | 828 ui::EventResult result = ui::ER_UNHANDLED; |
| 829 if (!target && !bounds().Contains(event->location())) { | 829 if (!target && !bounds().Contains(event->location())) { |
| 830 // If the initial touch is outside the root window, target the root. | 830 // If the initial touch is outside the root window, target the root. |
| 831 target = this; | 831 target = this; |
| 832 ProcessEvent(target ? target : NULL, event); | 832 ProcessEvent(target ? target : NULL, event); |
| 833 CHECK_EQ(ui::ER_UNHANDLED, event->result()); | |
| 834 result = event->result(); | 833 result = event->result(); |
| 835 } else { | 834 } else { |
| 836 // We only come here when the first contact was within the root window. | 835 // We only come here when the first contact was within the root window. |
| 837 if (!target) { | 836 if (!target) { |
| 838 target = GetEventHandlerForPoint(event->location()); | 837 target = GetEventHandlerForPoint(event->location()); |
| 839 if (!target) | 838 if (!target) |
| 840 return false; | 839 return false; |
| 841 } | 840 } |
| 842 | 841 |
| 843 ui::TouchEvent translated_event( | 842 ui::TouchEvent translated_event( |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 ui::MouseEvent event(ui::ET_MOUSE_MOVED, | 996 ui::MouseEvent event(ui::ET_MOUSE_MOVED, |
| 998 orig_mouse_location, | 997 orig_mouse_location, |
| 999 orig_mouse_location, | 998 orig_mouse_location, |
| 1000 ui::EF_IS_SYNTHESIZED); | 999 ui::EF_IS_SYNTHESIZED); |
| 1001 event.set_system_location(Env::GetInstance()->last_mouse_location()); | 1000 event.set_system_location(Env::GetInstance()->last_mouse_location()); |
| 1002 OnHostMouseEvent(&event); | 1001 OnHostMouseEvent(&event); |
| 1003 #endif | 1002 #endif |
| 1004 } | 1003 } |
| 1005 | 1004 |
| 1006 } // namespace aura | 1005 } // namespace aura |
| OLD | NEW |