| 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/window.h" | 5 #include "ui/aura/window.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 DISALLOW_COPY_AND_ASSIGN(CaptureWindowDelegateImpl); | 199 DISALLOW_COPY_AND_ASSIGN(CaptureWindowDelegateImpl); |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 // Keeps track of the location of the gesture. | 202 // Keeps track of the location of the gesture. |
| 203 class GestureTrackPositionDelegate : public TestWindowDelegate { | 203 class GestureTrackPositionDelegate : public TestWindowDelegate { |
| 204 public: | 204 public: |
| 205 GestureTrackPositionDelegate() {} | 205 GestureTrackPositionDelegate() {} |
| 206 | 206 |
| 207 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { | 207 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { |
| 208 position_ = event->location(); | 208 position_ = gfx::ToFlooredPoint(event->location()); |
| 209 event->StopPropagation(); | 209 event->StopPropagation(); |
| 210 } | 210 } |
| 211 | 211 |
| 212 const gfx::Point& position() const { return position_; } | 212 const gfx::Point& position() const { return position_; } |
| 213 | 213 |
| 214 private: | 214 private: |
| 215 gfx::Point position_; | 215 gfx::Point position_; |
| 216 | 216 |
| 217 DISALLOW_COPY_AND_ASSIGN(GestureTrackPositionDelegate); | 217 DISALLOW_COPY_AND_ASSIGN(GestureTrackPositionDelegate); |
| 218 }; | 218 }; |
| (...skipping 3125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3344 BuildRootLayerTreeDescription(*root.layer())) | 3344 BuildRootLayerTreeDescription(*root.layer())) |
| 3345 << "layer tree doesn't match at " << i; | 3345 << "layer tree doesn't match at " << i; |
| 3346 EXPECT_EQ(data[i].expected_description, | 3346 EXPECT_EQ(data[i].expected_description, |
| 3347 BuildRootWindowTreeDescription(root)) | 3347 BuildRootWindowTreeDescription(root)) |
| 3348 << "window tree doesn't match at " << i; | 3348 << "window tree doesn't match at " << i; |
| 3349 } | 3349 } |
| 3350 } | 3350 } |
| 3351 | 3351 |
| 3352 } // namespace test | 3352 } // namespace test |
| 3353 } // namespace aura | 3353 } // namespace aura |
| OLD | NEW |