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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 8907005: Add support for new scroll valuators coming from CMT (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review nits Created 9 years 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
« no previous file with comments | « ui/views/events/event_aura.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "ui/aura/client/activation_client.h" 9 #include "ui/aura/client/activation_client.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const { 647 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const {
648 return delegate_->GetNonClientComponent(point); 648 return delegate_->GetNonClientComponent(point);
649 } 649 }
650 650
651 bool NativeWidgetAura::OnMouseEvent(aura::MouseEvent* event) { 651 bool NativeWidgetAura::OnMouseEvent(aura::MouseEvent* event) {
652 DCHECK(window_->IsVisible()); 652 DCHECK(window_->IsVisible());
653 if (event->type() == ui::ET_MOUSEWHEEL) { 653 if (event->type() == ui::ET_MOUSEWHEEL) {
654 MouseWheelEvent wheel_event(event); 654 MouseWheelEvent wheel_event(event);
655 return delegate_->OnMouseEvent(wheel_event); 655 return delegate_->OnMouseEvent(wheel_event);
656 } 656 }
657 if (event->type() == ui::ET_SCROLL) {
658 ScrollEvent scroll_event(static_cast<aura::ScrollEvent*>(event));
659 return delegate_->OnMouseEvent(scroll_event);
660 }
657 MouseEvent mouse_event(event); 661 MouseEvent mouse_event(event);
658 if (tooltip_manager_.get()) 662 if (tooltip_manager_.get())
659 tooltip_manager_->UpdateTooltip(); 663 tooltip_manager_->UpdateTooltip();
660 return delegate_->OnMouseEvent(mouse_event); 664 return delegate_->OnMouseEvent(mouse_event);
661 } 665 }
662 666
663 ui::TouchStatus NativeWidgetAura::OnTouchEvent(aura::TouchEvent* event) { 667 ui::TouchStatus NativeWidgetAura::OnTouchEvent(aura::TouchEvent* event) {
664 DCHECK(window_->IsVisible()); 668 DCHECK(window_->IsVisible());
665 TouchEvent touch_event(event); 669 TouchEvent touch_event(event);
666 return delegate_->OnTouchEvent(touch_event); 670 return delegate_->OnTouchEvent(touch_event);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 } 855 }
852 } 856 }
853 857
854 // static 858 // static
855 bool NativeWidgetPrivate::IsMouseButtonDown() { 859 bool NativeWidgetPrivate::IsMouseButtonDown() {
856 return aura::RootWindow::GetInstance()->IsMouseButtonDown(); 860 return aura::RootWindow::GetInstance()->IsMouseButtonDown();
857 } 861 }
858 862
859 } // namespace internal 863 } // namespace internal
860 } // namespace views 864 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/events/event_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698