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

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

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/views/view_unittest.cc ('k') | ui/views/widget/native_widget_delegate.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 (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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 } 797 }
798 if (event->type() == ui::ET_SCROLL) { 798 if (event->type() == ui::ET_SCROLL) {
799 ScrollEvent scroll_event(static_cast<ui::ScrollEvent*>(event)); 799 ScrollEvent scroll_event(static_cast<ui::ScrollEvent*>(event));
800 if (delegate_->OnMouseEvent(scroll_event)) 800 if (delegate_->OnMouseEvent(scroll_event))
801 return true; 801 return true;
802 802
803 // Convert unprocessed scroll events into wheel events. 803 // Convert unprocessed scroll events into wheel events.
804 MouseWheelEvent wheel_event(scroll_event); 804 MouseWheelEvent wheel_event(scroll_event);
805 return delegate_->OnMouseEvent(wheel_event); 805 return delegate_->OnMouseEvent(wheel_event);
806 } 806 }
807 MouseEvent mouse_event(event);
808 if (tooltip_manager_.get()) 807 if (tooltip_manager_.get())
809 tooltip_manager_->UpdateTooltip(); 808 tooltip_manager_->UpdateTooltip();
810 return delegate_->OnMouseEvent(mouse_event); 809 return delegate_->OnMouseEvent(*event);
811 } 810 }
812 811
813 ui::TouchStatus NativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) { 812 ui::TouchStatus NativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) {
814 DCHECK(window_->IsVisible()); 813 DCHECK(window_->IsVisible());
815 TouchEvent touch_event(event); 814 TouchEvent touch_event(event);
816 return delegate_->OnTouchEvent(touch_event); 815 return delegate_->OnTouchEvent(touch_event);
817 } 816 }
818 817
819 ui::GestureStatus NativeWidgetAura::OnGestureEvent( 818 ui::GestureStatus NativeWidgetAura::OnGestureEvent(
820 ui::GestureEvent* event) { 819 ui::GestureEvent* event) {
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 return aura::Env::GetInstance()->is_mouse_button_down(); 1046 return aura::Env::GetInstance()->is_mouse_button_down();
1048 } 1047 }
1049 1048
1050 // static 1049 // static
1051 bool NativeWidgetPrivate::IsTouchDown() { 1050 bool NativeWidgetPrivate::IsTouchDown() {
1052 return aura::Env::GetInstance()->is_touch_down(); 1051 return aura::Env::GetInstance()->is_touch_down();
1053 } 1052 }
1054 1053
1055 } // namespace internal 1054 } // namespace internal
1056 } // namespace views 1055 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/view_unittest.cc ('k') | ui/views/widget/native_widget_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698