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

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

Issue 6591120: Update MouseEvent (initial pass). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update MouseEvent (initial pass). Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/widget/root_view.h" 5 #include "views/widget/root_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 gfx::NativeView native_view) { 78 gfx::NativeView native_view) {
79 PropagateNativeViewHierarchyChanged(attached, native_view, this); 79 PropagateNativeViewHierarchyChanged(attached, native_view, this);
80 } 80 }
81 81
82 // Input ----------------------------------------------------------------------- 82 // Input -----------------------------------------------------------------------
83 83
84 void RootView::ProcessMouseDragCanceled() { 84 void RootView::ProcessMouseDragCanceled() {
85 if (mouse_pressed_handler_) { 85 if (mouse_pressed_handler_) {
86 // Synthesize a release event. 86 // Synthesize a release event.
87 MouseEvent release_event(ui::ET_MOUSE_RELEASED, last_mouse_event_x_, 87 MouseEvent release_event(ui::ET_MOUSE_RELEASED, last_mouse_event_x_,
88 last_mouse_event_y_, last_mouse_event_flags_); 88 last_mouse_event_y_, last_mouse_event_flags_);
89 OnMouseReleased(release_event, true); 89 OnMouseReleased(release_event, true);
90 } 90 }
91 } 91 }
92 92
93 void RootView::ProcessOnMouseExited() { 93 void RootView::ProcessOnMouseExited() {
94 if (mouse_move_handler_ != NULL) { 94 if (mouse_move_handler_ != NULL) {
95 MouseEvent exited_event(ui::ET_MOUSE_EXITED, 0, 0, 0); 95 MouseEvent exited_event(ui::ET_MOUSE_EXITED, 0, 0, 0);
96 mouse_move_handler_->OnMouseExited(exited_event); 96 mouse_move_handler_->OnMouseExited(exited_event);
97 mouse_move_handler_ = NULL; 97 mouse_move_handler_ = NULL;
98 } 98 }
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 widget_->SetCursor(cursor); 486 widget_->SetCursor(cursor);
487 } 487 }
488 488
489 void RootView::SetMouseLocationAndFlags(const MouseEvent& e) { 489 void RootView::SetMouseLocationAndFlags(const MouseEvent& e) {
490 last_mouse_event_flags_ = e.flags(); 490 last_mouse_event_flags_ = e.flags();
491 last_mouse_event_x_ = e.x(); 491 last_mouse_event_x_ = e.x();
492 last_mouse_event_y_ = e.y(); 492 last_mouse_event_y_ = e.y();
493 } 493 }
494 494
495 } // namespace views 495 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698