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

Unified Diff: ui/views/widget/root_view.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/root_view.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/root_view.cc
diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
index 01d8b0209c8981735238ea1000c5e9ff8d21c94f..67c246fe75f535d0770d0a1ebdbb7b9a6ac133ec 100644
--- a/ui/views/widget/root_view.cc
+++ b/ui/views/widget/root_view.cc
@@ -408,8 +408,7 @@ bool RootView::OnMousePressed(const ui::MouseEvent& event) {
ui::MouseEvent mouse_pressed_event(event, static_cast<View*>(this),
mouse_pressed_handler_);
drag_info_.Reset();
- mouse_pressed_handler_->ProcessMousePressed(mouse_pressed_event,
- &drag_info_);
+ mouse_pressed_handler_->ProcessMousePressed(mouse_pressed_event);
return true;
}
DCHECK(!explicit_mouse_handler_);
@@ -438,7 +437,7 @@ bool RootView::OnMousePressed(const ui::MouseEvent& event) {
drag_info_.Reset();
bool handled = mouse_pressed_handler_->ProcessMousePressed(
- mouse_pressed_event, &drag_info_);
+ mouse_pressed_event);
// The view could have removed itself from the tree when handling
// OnMousePressed(). In this case, the removal notification will have
@@ -481,8 +480,7 @@ bool RootView::OnMouseDragged(const ui::MouseEvent& event) {
ui::MouseEvent mouse_event(event, static_cast<View*>(this),
mouse_pressed_handler_);
- return mouse_pressed_handler_->ProcessMouseDragged(mouse_event,
- &drag_info_);
+ return mouse_pressed_handler_->ProcessMouseDragged(mouse_event);
}
return false;
}
@@ -651,6 +649,10 @@ gfx::Vector2d RootView::CalculateOffsetToAncestorWithLayer(
return offset;
}
+View::DragInfo* RootView::GetDragInfo() {
+ return &drag_info_;
+}
+
////////////////////////////////////////////////////////////////////////////////
// RootView, private:
« no previous file with comments | « ui/views/widget/root_view.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698