| 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/native_widget_aura.h" | 5 #include "views/widget/native_widget_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "ui/aura/desktop.h" | 8 #include "ui/aura/desktop.h" |
| 9 #include "ui/aura/event.h" | 9 #include "ui/aura/event.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 } | 495 } |
| 496 | 496 |
| 497 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const { | 497 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const { |
| 498 return delegate_->GetNonClientComponent(point); | 498 return delegate_->GetNonClientComponent(point); |
| 499 } | 499 } |
| 500 | 500 |
| 501 bool NativeWidgetAura::OnMouseEvent(aura::MouseEvent* event) { | 501 bool NativeWidgetAura::OnMouseEvent(aura::MouseEvent* event) { |
| 502 DCHECK(window_->IsVisible()); | 502 DCHECK(window_->IsVisible()); |
| 503 if (event->type() == ui::ET_MOUSEWHEEL) { | 503 if (event->type() == ui::ET_MOUSEWHEEL) { |
| 504 MouseWheelEvent wheel_event(event); | 504 MouseWheelEvent wheel_event(event); |
| 505 if (tooltip_manager_.get()) |
| 506 tooltip_manager_->UpdateForMouseEvent(wheel_event); |
| 505 return delegate_->OnMouseEvent(wheel_event); | 507 return delegate_->OnMouseEvent(wheel_event); |
| 506 } | 508 } |
| 507 MouseEvent mouse_event(event); | 509 MouseEvent mouse_event(event); |
| 510 if (tooltip_manager_.get()) |
| 511 tooltip_manager_->UpdateForMouseEvent(mouse_event); |
| 508 return delegate_->OnMouseEvent(mouse_event); | 512 return delegate_->OnMouseEvent(mouse_event); |
| 509 } | 513 } |
| 510 | 514 |
| 511 ui::TouchStatus NativeWidgetAura::OnTouchEvent(aura::TouchEvent* event) { | 515 ui::TouchStatus NativeWidgetAura::OnTouchEvent(aura::TouchEvent* event) { |
| 512 DCHECK(window_->IsVisible()); | 516 DCHECK(window_->IsVisible()); |
| 513 TouchEvent touch_event(event); | 517 TouchEvent touch_event(event); |
| 514 return delegate_->OnTouchEvent(touch_event); | 518 return delegate_->OnTouchEvent(touch_event); |
| 515 } | 519 } |
| 516 | 520 |
| 517 bool NativeWidgetAura::ShouldActivate(aura::Event* event) { | 521 bool NativeWidgetAura::ShouldActivate(aura::Event* event) { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 } | 646 } |
| 643 | 647 |
| 644 // static | 648 // static |
| 645 bool NativeWidgetPrivate::IsMouseButtonDown() { | 649 bool NativeWidgetPrivate::IsMouseButtonDown() { |
| 646 NOTIMPLEMENTED(); | 650 NOTIMPLEMENTED(); |
| 647 return false; | 651 return false; |
| 648 } | 652 } |
| 649 | 653 |
| 650 } // namespace internal | 654 } // namespace internal |
| 651 } // namespace views | 655 } // namespace views |
| OLD | NEW |