| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED) | 168 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED) |
| 169 capture_changed_event_count_++; | 169 capture_changed_event_count_++; |
| 170 mouse_event_count_++; | 170 mouse_event_count_++; |
| 171 return false; | 171 return false; |
| 172 } | 172 } |
| 173 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE { | 173 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE { |
| 174 touch_event_count_++; | 174 touch_event_count_++; |
| 175 return ui::TOUCH_STATUS_UNKNOWN; | 175 return ui::TOUCH_STATUS_UNKNOWN; |
| 176 } | 176 } |
| 177 virtual ui::GestureStatus OnGestureEvent( | 177 virtual ui::GestureStatus OnGestureEvent( |
| 178 ui::GestureEventImpl* event) OVERRIDE { | 178 ui::GestureEvent* event) OVERRIDE { |
| 179 gesture_event_count_++; | 179 gesture_event_count_++; |
| 180 return ui::GESTURE_STATUS_UNKNOWN; | 180 return ui::GESTURE_STATUS_UNKNOWN; |
| 181 } | 181 } |
| 182 virtual void OnCaptureLost() OVERRIDE { | 182 virtual void OnCaptureLost() OVERRIDE { |
| 183 capture_lost_count_++; | 183 capture_lost_count_++; |
| 184 } | 184 } |
| 185 | 185 |
| 186 private: | 186 private: |
| 187 int capture_changed_event_count_; | 187 int capture_changed_event_count_; |
| 188 int capture_lost_count_; | 188 int capture_lost_count_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 211 private: | 211 private: |
| 212 aura::Window* previous_focused_window_; | 212 aura::Window* previous_focused_window_; |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 // Keeps track of the location of the gesture. | 215 // Keeps track of the location of the gesture. |
| 216 class GestureTrackPositionDelegate : public TestWindowDelegate { | 216 class GestureTrackPositionDelegate : public TestWindowDelegate { |
| 217 public: | 217 public: |
| 218 GestureTrackPositionDelegate() {} | 218 GestureTrackPositionDelegate() {} |
| 219 | 219 |
| 220 virtual ui::GestureStatus OnGestureEvent( | 220 virtual ui::GestureStatus OnGestureEvent( |
| 221 ui::GestureEventImpl* event) OVERRIDE { | 221 ui::GestureEvent* event) OVERRIDE { |
| 222 position_ = event->location(); | 222 position_ = event->location(); |
| 223 return ui::GESTURE_STATUS_CONSUMED; | 223 return ui::GESTURE_STATUS_CONSUMED; |
| 224 } | 224 } |
| 225 | 225 |
| 226 const gfx::Point& position() const { return position_; } | 226 const gfx::Point& position() const { return position_; } |
| 227 | 227 |
| 228 private: | 228 private: |
| 229 gfx::Point position_; | 229 gfx::Point position_; |
| 230 | 230 |
| 231 DISALLOW_COPY_AND_ASSIGN(GestureTrackPositionDelegate); | 231 DISALLOW_COPY_AND_ASSIGN(GestureTrackPositionDelegate); |
| (...skipping 2224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2456 element->Step(start_time + base::TimeDelta::FromMilliseconds(1000)); | 2456 element->Step(start_time + base::TimeDelta::FromMilliseconds(1000)); |
| 2457 | 2457 |
| 2458 // No bounds changed notification at the end of animation since layer | 2458 // No bounds changed notification at the end of animation since layer |
| 2459 // delegate is NULL. | 2459 // delegate is NULL. |
| 2460 EXPECT_FALSE(delegate.bounds_changed()); | 2460 EXPECT_FALSE(delegate.bounds_changed()); |
| 2461 EXPECT_NE("0,0 100x100", window->bounds().ToString()); | 2461 EXPECT_NE("0,0 100x100", window->bounds().ToString()); |
| 2462 } | 2462 } |
| 2463 | 2463 |
| 2464 } // namespace test | 2464 } // namespace test |
| 2465 } // namespace aura | 2465 } // namespace aura |
| OLD | NEW |