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

Side by Side Diff: ui/aura/window_event_dispatcher.cc

Issue 1017473002: [Merge] Make mouse buttons 8 - 11 navigate forward and back in history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2311
Patch Set: Created 5 years, 9 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/events/event.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/window_event_dispatcher.h" 5 #include "ui/aura/window_event_dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 } else { 771 } else {
772 // We may have a held event for a period between the time move_hold_count_ 772 // We may have a held event for a period between the time move_hold_count_
773 // fell to 0 and the DispatchHeldEvents executes. Since we're going to 773 // fell to 0 and the DispatchHeldEvents executes. Since we're going to
774 // dispatch the new event directly below, we can reset the old one. 774 // dispatch the new event directly below, we can reset the old one.
775 held_move_event_.reset(); 775 held_move_event_.reset();
776 } 776 }
777 } 777 }
778 778
779 const int kMouseButtonFlagMask = ui::EF_LEFT_MOUSE_BUTTON | 779 const int kMouseButtonFlagMask = ui::EF_LEFT_MOUSE_BUTTON |
780 ui::EF_MIDDLE_MOUSE_BUTTON | 780 ui::EF_MIDDLE_MOUSE_BUTTON |
781 ui::EF_RIGHT_MOUSE_BUTTON; 781 ui::EF_RIGHT_MOUSE_BUTTON |
782 ui::EF_BACK_MOUSE_BUTTON |
783 ui::EF_FORWARD_MOUSE_BUTTON;
782 switch (event->type()) { 784 switch (event->type()) {
783 case ui::ET_MOUSE_EXITED: 785 case ui::ET_MOUSE_EXITED:
784 if (!target || target == window()) { 786 if (!target || target == window()) {
785 DispatchDetails details = 787 DispatchDetails details =
786 DispatchMouseEnterOrExit(target, *event, ui::ET_MOUSE_EXITED); 788 DispatchMouseEnterOrExit(target, *event, ui::ET_MOUSE_EXITED);
787 if (details.dispatcher_destroyed) { 789 if (details.dispatcher_destroyed) {
788 event->SetHandled(); 790 event->SetHandled();
789 return; 791 return;
790 } 792 }
791 mouse_moved_handler_ = NULL; 793 mouse_moved_handler_ = NULL;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 } 893 }
892 894
893 // This flag is set depending on the gestures recognized in the call above, 895 // This flag is set depending on the gestures recognized in the call above,
894 // and needs to propagate with the forwarded event. 896 // and needs to propagate with the forwarded event.
895 event->set_may_cause_scrolling(orig_event.may_cause_scrolling()); 897 event->set_may_cause_scrolling(orig_event.may_cause_scrolling());
896 898
897 PreDispatchLocatedEvent(target, event); 899 PreDispatchLocatedEvent(target, event);
898 } 900 }
899 901
900 } // namespace aura 902 } // namespace aura
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698