| 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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 784 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
| 785 if (cursor_client && | 785 if (cursor_client && |
| 786 !cursor_client->IsMouseEventsEnabled() && | 786 !cursor_client->IsMouseEventsEnabled() && |
| 787 (event->flags() & ui::EF_IS_SYNTHESIZED)) { | 787 (event->flags() & ui::EF_IS_SYNTHESIZED)) { |
| 788 event->SetHandled(); | 788 event->SetHandled(); |
| 789 return; | 789 return; |
| 790 } | 790 } |
| 791 | 791 |
| 792 if (IsEventCandidateForHold(*event) && !dispatching_held_event_) { | 792 if (IsEventCandidateForHold(*event) && !dispatching_held_event_) { |
| 793 if (move_hold_count_) { | 793 if (move_hold_count_) { |
| 794 if (!(event->flags() & ui::EF_IS_SYNTHESIZED) && |
| 795 event->type() != ui::ET_MOUSE_CAPTURE_CHANGED) { |
| 796 SetLastMouseLocation(window(), event->root_location()); |
| 797 } |
| 794 held_move_event_.reset(new ui::MouseEvent(*event, target, window())); | 798 held_move_event_.reset(new ui::MouseEvent(*event, target, window())); |
| 795 event->SetHandled(); | 799 event->SetHandled(); |
| 796 return; | 800 return; |
| 797 } else { | 801 } else { |
| 798 // We may have a held event for a period between the time move_hold_count_ | 802 // We may have a held event for a period between the time move_hold_count_ |
| 799 // fell to 0 and the DispatchHeldEvents executes. Since we're going to | 803 // fell to 0 and the DispatchHeldEvents executes. Since we're going to |
| 800 // dispatch the new event directly below, we can reset the old one. | 804 // dispatch the new event directly below, we can reset the old one. |
| 801 held_move_event_.reset(); | 805 held_move_event_.reset(); |
| 802 } | 806 } |
| 803 } | 807 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 break; | 906 break; |
| 903 | 907 |
| 904 default: | 908 default: |
| 905 NOTREACHED(); | 909 NOTREACHED(); |
| 906 break; | 910 break; |
| 907 } | 911 } |
| 908 PreDispatchLocatedEvent(target, event); | 912 PreDispatchLocatedEvent(target, event); |
| 909 } | 913 } |
| 910 | 914 |
| 911 } // namespace aura | 915 } // namespace aura |
| OLD | NEW |