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

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

Issue 10825353: Clean up some detritus that accumulated during the fixing of 125937. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months 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/base/x/events_x.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) 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/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 "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_change_observer.h" 10 #include "ui/aura/client/activation_change_observer.h"
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 if (root_layer_iter > child_layer_iter) 785 if (root_layer_iter > child_layer_iter)
786 return false; 786 return false;
787 } 787 }
788 } 788 }
789 return true; 789 return true;
790 } 790 }
791 791
792 bool NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) { 792 bool NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) {
793 DCHECK(window_->IsVisible()); 793 DCHECK(window_->IsVisible());
794 if (event->type() == ui::ET_MOUSEWHEEL) { 794 if (event->type() == ui::ET_MOUSEWHEEL) {
795 ui::MouseWheelEvent wheel_event(event); 795 ui::MouseWheelEvent mwe(*event);
796 return delegate_->OnMouseEvent(wheel_event); 796 return delegate_->OnMouseEvent(mwe);
797 } 797 }
798
798 if (event->type() == ui::ET_SCROLL) { 799 if (event->type() == ui::ET_SCROLL) {
799 if (delegate_->OnMouseEvent(*event)) 800 if (delegate_->OnMouseEvent(*event))
800 return true; 801 return true;
801 802
802 // Convert unprocessed scroll events into wheel events. 803 // Convert unprocessed scroll events into wheel events.
803 ui::MouseWheelEvent wheel_event(*static_cast<ui::ScrollEvent*>(event)); 804 ui::MouseWheelEvent mwe(*static_cast<ui::ScrollEvent*>(event));
804 return delegate_->OnMouseEvent(wheel_event); 805 return delegate_->OnMouseEvent(mwe);
805 } 806 }
806 if (tooltip_manager_.get()) 807 if (tooltip_manager_.get())
807 tooltip_manager_->UpdateTooltip(); 808 tooltip_manager_->UpdateTooltip();
808 return delegate_->OnMouseEvent(*event); 809 return delegate_->OnMouseEvent(*event);
809 } 810 }
810 811
811 ui::TouchStatus NativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) { 812 ui::TouchStatus NativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) {
812 DCHECK(window_->IsVisible()); 813 DCHECK(window_->IsVisible());
813 return delegate_->OnTouchEvent(*event); 814 return delegate_->OnTouchEvent(*event);
814 } 815 }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 return aura::Env::GetInstance()->is_mouse_button_down(); 1044 return aura::Env::GetInstance()->is_mouse_button_down();
1044 } 1045 }
1045 1046
1046 // static 1047 // static
1047 bool NativeWidgetPrivate::IsTouchDown() { 1048 bool NativeWidgetPrivate::IsTouchDown() {
1048 return aura::Env::GetInstance()->is_touch_down(); 1049 return aura::Env::GetInstance()->is_touch_down();
1049 } 1050 }
1050 1051
1051 } // namespace internal 1052 } // namespace internal
1052 } // namespace views 1053 } // namespace views
OLDNEW
« no previous file with comments | « ui/base/x/events_x.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698