| OLD | NEW |
| 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/root_view.h" | 5 #include "ui/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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 if (!(moved_event.flags() & ui::EF_IS_NON_CLIENT)) | 360 if (!(moved_event.flags() & ui::EF_IS_NON_CLIENT)) |
| 361 widget_->SetCursor(mouse_move_handler_->GetCursor(moved_event)); | 361 widget_->SetCursor(mouse_move_handler_->GetCursor(moved_event)); |
| 362 } else if (mouse_move_handler_ != NULL) { | 362 } else if (mouse_move_handler_ != NULL) { |
| 363 mouse_move_handler_->OnMouseExited(event); | 363 mouse_move_handler_->OnMouseExited(event); |
| 364 NotifyEnterExitOfDescendant(event, EVENT_EXIT, mouse_move_handler_, v); | 364 NotifyEnterExitOfDescendant(event, EVENT_EXIT, mouse_move_handler_, v); |
| 365 // On Aura the non-client area extends slightly outside the root view for | 365 // On Aura the non-client area extends slightly outside the root view for |
| 366 // some windows. Let the non-client cursor handling code set the cursor | 366 // some windows. Let the non-client cursor handling code set the cursor |
| 367 // as we do above. | 367 // as we do above. |
| 368 if (!(event.flags() & ui::EF_IS_NON_CLIENT)) | 368 if (!(event.flags() & ui::EF_IS_NON_CLIENT)) |
| 369 widget_->SetCursor(gfx::kNullCursor); | 369 widget_->SetCursor(gfx::kNullCursor); |
| 370 mouse_move_handler_ = NULL; |
| 370 } | 371 } |
| 371 } | 372 } |
| 372 | 373 |
| 373 void RootView::OnMouseExited(const ui::MouseEvent& event) { | 374 void RootView::OnMouseExited(const ui::MouseEvent& event) { |
| 374 if (mouse_move_handler_ != NULL) { | 375 if (mouse_move_handler_ != NULL) { |
| 375 mouse_move_handler_->OnMouseExited(event); | 376 mouse_move_handler_->OnMouseExited(event); |
| 376 NotifyEnterExitOfDescendant(event, EVENT_EXIT, mouse_move_handler_, NULL); | 377 NotifyEnterExitOfDescendant(event, EVENT_EXIT, mouse_move_handler_, NULL); |
| 377 mouse_move_handler_ = NULL; | 378 mouse_move_handler_ = NULL; |
| 378 } | 379 } |
| 379 } | 380 } |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 } | 603 } |
| 603 | 604 |
| 604 void RootView::SetMouseLocationAndFlags(const ui::MouseEvent& event) { | 605 void RootView::SetMouseLocationAndFlags(const ui::MouseEvent& event) { |
| 605 last_mouse_event_flags_ = event.flags(); | 606 last_mouse_event_flags_ = event.flags(); |
| 606 last_mouse_event_x_ = event.x(); | 607 last_mouse_event_x_ = event.x(); |
| 607 last_mouse_event_y_ = event.y(); | 608 last_mouse_event_y_ = event.y(); |
| 608 } | 609 } |
| 609 | 610 |
| 610 } // namespace internal | 611 } // namespace internal |
| 611 } // namespace views | 612 } // namespace views |
| OLD | NEW |