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

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

Issue 12302005: views: Start sending mouse events using the EventDispatch interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/widget/root_view.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/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 last_mouse_event_was_move_ = true; 1185 last_mouse_event_was_move_ = true;
1186 GetRootView()->OnMouseMoved(*event); 1186 GetRootView()->OnMouseMoved(*event);
1187 } 1187 }
1188 return; 1188 return;
1189 case ui::ET_MOUSE_EXITED: 1189 case ui::ET_MOUSE_EXITED:
1190 last_mouse_event_was_move_ = false; 1190 last_mouse_event_was_move_ = false;
1191 GetRootView()->OnMouseExited(*event); 1191 GetRootView()->OnMouseExited(*event);
1192 return; 1192 return;
1193 case ui::ET_MOUSEWHEEL: 1193 case ui::ET_MOUSEWHEEL:
1194 if (GetRootView()->OnMouseWheel( 1194 if (GetRootView()->OnMouseWheel(
1195 reinterpret_cast<const ui::MouseWheelEvent&>(*event))) 1195 static_cast<const ui::MouseWheelEvent&>(*event)))
1196 event->SetHandled(); 1196 event->SetHandled();
1197 return; 1197 return;
1198 default: 1198 default:
1199 return; 1199 return;
1200 } 1200 }
1201 event->SetHandled(); 1201 event->SetHandled();
1202 } 1202 }
1203 1203
1204 void Widget::OnMouseCaptureLost() { 1204 void Widget::OnMouseCaptureLost() {
1205 if (is_mouse_button_pressed_ || is_touch_down_) 1205 if (is_mouse_button_pressed_ || is_touch_down_)
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 1421
1422 //////////////////////////////////////////////////////////////////////////////// 1422 ////////////////////////////////////////////////////////////////////////////////
1423 // internal::NativeWidgetPrivate, NativeWidget implementation: 1423 // internal::NativeWidgetPrivate, NativeWidget implementation:
1424 1424
1425 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1425 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1426 return this; 1426 return this;
1427 } 1427 }
1428 1428
1429 } // namespace internal 1429 } // namespace internal
1430 } // namespace views 1430 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/root_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698