| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |