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/aura/root_window.h" | 5 #include "ui/aura/root_window.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
819 return DispatchGestureEvent(static_cast<GestureEvent*>(event)); | 819 return DispatchGestureEvent(static_cast<GestureEvent*>(event)); |
820 } | 820 } |
821 | 821 |
822 bool RootWindow::DispatchCancelTouchEvent(ui::TouchEvent* event) { | 822 bool RootWindow::DispatchCancelTouchEvent(ui::TouchEvent* event) { |
823 return DispatchTouchEvent(static_cast<TouchEvent*>(event)); | 823 return DispatchTouchEvent(static_cast<TouchEvent*>(event)); |
824 } | 824 } |
825 | 825 |
826 ui::GestureEvent* RootWindow::CreateGestureEvent(ui::EventType type, | 826 ui::GestureEvent* RootWindow::CreateGestureEvent(ui::EventType type, |
827 const gfx::Point& location, | 827 const gfx::Point& location, |
828 int flags, | 828 int flags, |
829 const base::Time time, | 829 base::Time time, |
830 float param_first, | 830 float param_first, |
831 float param_second, | 831 float param_second, |
832 unsigned int touch_id_bitfield) { | 832 unsigned int touch_id_bitfield) { |
833 return new GestureEvent(type, location.x(), location.y(), flags, time, | 833 return new GestureEvent(type, location.x(), location.y(), flags, time, |
834 param_first, param_second, touch_id_bitfield); | 834 param_first, param_second, touch_id_bitfield); |
835 } | 835 } |
836 | 836 |
837 ui::TouchEvent* RootWindow::CreateTouchEvent(ui::EventType type, | 837 ui::TouchEvent* RootWindow::CreateTouchEvent( |
rjkroege
2012/05/09 16:48:15
white space only?
girard
2012/05/09 22:49:19
Done.
| |
838 const gfx::Point& location, | 838 ui::EventType type, |
839 int touch_id, | 839 const gfx::Point& location, |
840 base::TimeDelta time_stamp) { | 840 int touch_id, |
841 base::TimeDelta time_stamp) { | |
841 return new TouchEvent(type, location, touch_id, time_stamp); | 842 return new TouchEvent(type, location, touch_id, time_stamp); |
842 } | 843 } |
843 | 844 |
844 void RootWindow::OnLayerAnimationEnded( | 845 void RootWindow::OnLayerAnimationEnded( |
845 ui::LayerAnimationSequence* animation) { | 846 ui::LayerAnimationSequence* animation) { |
846 OnHostResized(host_->GetBounds().size()); | 847 OnHostResized(host_->GetBounds().size()); |
847 } | 848 } |
848 | 849 |
849 void RootWindow::OnLayerAnimationScheduled( | 850 void RootWindow::OnLayerAnimationScheduled( |
850 ui::LayerAnimationSequence* animation) { | 851 ui::LayerAnimationSequence* animation) { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
986 void RootWindow::UnlockCompositor() { | 987 void RootWindow::UnlockCompositor() { |
987 DCHECK(compositor_lock_); | 988 DCHECK(compositor_lock_); |
988 compositor_lock_ = NULL; | 989 compositor_lock_ = NULL; |
989 if (draw_on_compositor_unlock_) { | 990 if (draw_on_compositor_unlock_) { |
990 draw_on_compositor_unlock_ = false; | 991 draw_on_compositor_unlock_ = false; |
991 ScheduleDraw(); | 992 ScheduleDraw(); |
992 } | 993 } |
993 } | 994 } |
994 | 995 |
995 } // namespace aura | 996 } // namespace aura |
OLD | NEW |