Chromium Code Reviews| 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 gfx::NativeCursor NativeWidgetAura::GetCursor(const gfx::Point& point) { | 491 gfx::NativeCursor NativeWidgetAura::GetCursor(const gfx::Point& point) { |
| 492 return cursor_; | 492 return cursor_; |
| 493 } | 493 } |
| 494 | 494 |
| 495 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const { | 495 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const { |
| 496 return delegate_->GetNonClientComponent(point); | 496 return delegate_->GetNonClientComponent(point); |
| 497 } | 497 } |
| 498 | 498 |
| 499 bool NativeWidgetAura::OnMouseEvent(aura::MouseEvent* event) { | 499 bool NativeWidgetAura::OnMouseEvent(aura::MouseEvent* event) { |
| 500 DCHECK(window_->IsVisible()); | 500 DCHECK(window_->IsVisible()); |
| 501 TooltipManagerViews* tooltip_manager = | |
| 502 static_cast<TooltipManagerViews*>(tooltip_manager_.get()); | |
|
sky
2011/10/28 17:47:27
Change the field to be of type TooltipManagerViews
sadrul
2011/10/28 21:42:52
Done.
| |
| 501 if (event->type() == ui::ET_MOUSEWHEEL) { | 503 if (event->type() == ui::ET_MOUSEWHEEL) { |
| 502 MouseWheelEvent wheel_event(event); | 504 MouseWheelEvent wheel_event(event); |
| 505 if (tooltip_manager) | |
| 506 tooltip_manager->UpdateForMouseEvent(wheel_event); | |
| 503 return delegate_->OnMouseEvent(wheel_event); | 507 return delegate_->OnMouseEvent(wheel_event); |
| 504 } | 508 } |
| 505 MouseEvent mouse_event(event); | 509 MouseEvent mouse_event(event); |
| 510 if (tooltip_manager) | |
| 511 tooltip_manager->UpdateForMouseEvent(mouse_event); | |
| 506 return delegate_->OnMouseEvent(mouse_event); | 512 return delegate_->OnMouseEvent(mouse_event); |
| 507 } | 513 } |
| 508 | 514 |
| 509 ui::TouchStatus NativeWidgetAura::OnTouchEvent(aura::TouchEvent* event) { | 515 ui::TouchStatus NativeWidgetAura::OnTouchEvent(aura::TouchEvent* event) { |
| 510 DCHECK(window_->IsVisible()); | 516 DCHECK(window_->IsVisible()); |
| 511 TouchEvent touch_event(event); | 517 TouchEvent touch_event(event); |
| 512 return delegate_->OnTouchEvent(touch_event); | 518 return delegate_->OnTouchEvent(touch_event); |
| 513 } | 519 } |
| 514 | 520 |
| 515 bool NativeWidgetAura::ShouldActivate(aura::Event* event) { | 521 bool NativeWidgetAura::ShouldActivate(aura::Event* event) { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 637 } | 643 } |
| 638 | 644 |
| 639 // static | 645 // static |
| 640 bool NativeWidgetPrivate::IsMouseButtonDown() { | 646 bool NativeWidgetPrivate::IsMouseButtonDown() { |
| 641 NOTIMPLEMENTED(); | 647 NOTIMPLEMENTED(); |
| 642 return false; | 648 return false; |
| 643 } | 649 } |
| 644 | 650 |
| 645 } // namespace internal | 651 } // namespace internal |
| 646 } // namespace views | 652 } // namespace views |
| OLD | NEW |