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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 10868096: aura: Fix propagating wheel events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more Created 8 years, 3 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/base/event.cc ('k') | no next file » | 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/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_change_observer.h" 10 #include "ui/aura/client/activation_change_observer.h"
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 window_->layer()->children().end(), layer)); 790 window_->layer()->children().end(), layer));
791 if (root_layer_iter > child_layer_iter) 791 if (root_layer_iter > child_layer_iter)
792 return false; 792 return false;
793 } 793 }
794 } 794 }
795 return true; 795 return true;
796 } 796 }
797 797
798 bool NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) { 798 bool NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) {
799 DCHECK(window_->IsVisible()); 799 DCHECK(window_->IsVisible());
800 if (event->type() == ui::ET_MOUSEWHEEL) { 800 if (event->type() == ui::ET_MOUSEWHEEL)
801 ui::MouseWheelEvent mwe(*event); 801 return delegate_->OnMouseEvent(*event);
802 return delegate_->OnMouseEvent(mwe);
803 }
804 802
805 if (event->type() == ui::ET_SCROLL) { 803 if (event->type() == ui::ET_SCROLL) {
806 if (delegate_->OnMouseEvent(*event)) 804 if (delegate_->OnMouseEvent(*event))
807 return true; 805 return true;
808 806
809 // Convert unprocessed scroll events into wheel events. 807 // Convert unprocessed scroll events into wheel events.
810 ui::MouseWheelEvent mwe(*static_cast<ui::ScrollEvent*>(event)); 808 ui::MouseWheelEvent mwe(*static_cast<ui::ScrollEvent*>(event));
811 return delegate_->OnMouseEvent(mwe); 809 return delegate_->OnMouseEvent(mwe);
812 } 810 }
813 if (tooltip_manager_.get()) 811 if (tooltip_manager_.get())
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 return aura::Env::GetInstance()->is_mouse_button_down(); 1048 return aura::Env::GetInstance()->is_mouse_button_down();
1051 } 1049 }
1052 1050
1053 // static 1051 // static
1054 bool NativeWidgetPrivate::IsTouchDown() { 1052 bool NativeWidgetPrivate::IsTouchDown() {
1055 return aura::Env::GetInstance()->is_touch_down(); 1053 return aura::Env::GetInstance()->is_touch_down();
1056 } 1054 }
1057 1055
1058 } // namespace internal 1056 } // namespace internal
1059 } // namespace views 1057 } // namespace views
OLDNEW
« no previous file with comments | « ui/base/event.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698