| 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/test/test_window_delegate.h" | 5 #include "ui/aura/test/test_window_delegate.h" |
| 6 | 6 |
| 7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
| 8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
| 9 #include "ui/base/events/event.h" | 9 #include "ui/base/events/event.h" |
| 10 #include "ui/base/hit_test.h" | 10 #include "ui/base/hit_test.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 break; | 175 break; |
| 176 case ui::ET_MOUSE_RELEASED: | 176 case ui::ET_MOUSE_RELEASED: |
| 177 mouse_release_count_++; | 177 mouse_release_count_++; |
| 178 break; | 178 break; |
| 179 default: | 179 default: |
| 180 break; | 180 break; |
| 181 } | 181 } |
| 182 } | 182 } |
| 183 | 183 |
| 184 std::string EventCountDelegate::GetMouseMotionCountsAndReset() { | 184 std::string EventCountDelegate::GetMouseMotionCountsAndReset() { |
| 185 std::string result = StringPrintf("%d %d %d", | 185 std::string result = base::StringPrintf("%d %d %d", |
| 186 mouse_enter_count_, | 186 mouse_enter_count_, |
| 187 mouse_move_count_, | 187 mouse_move_count_, |
| 188 mouse_leave_count_); | 188 mouse_leave_count_); |
| 189 mouse_enter_count_ = 0; | 189 mouse_enter_count_ = 0; |
| 190 mouse_move_count_ = 0; | 190 mouse_move_count_ = 0; |
| 191 mouse_leave_count_ = 0; | 191 mouse_leave_count_ = 0; |
| 192 return result; | 192 return result; |
| 193 } | 193 } |
| 194 | 194 |
| 195 std::string EventCountDelegate::GetMouseButtonCountsAndReset() { | 195 std::string EventCountDelegate::GetMouseButtonCountsAndReset() { |
| 196 std::string result = StringPrintf("%d %d", | 196 std::string result = base::StringPrintf("%d %d", |
| 197 mouse_press_count_, | 197 mouse_press_count_, |
| 198 mouse_release_count_); | 198 mouse_release_count_); |
| 199 mouse_press_count_ = 0; | 199 mouse_press_count_ = 0; |
| 200 mouse_release_count_ = 0; | 200 mouse_release_count_ = 0; |
| 201 return result; | 201 return result; |
| 202 } | 202 } |
| 203 | 203 |
| 204 | 204 |
| 205 std::string EventCountDelegate::GetKeyCountsAndReset() { | 205 std::string EventCountDelegate::GetKeyCountsAndReset() { |
| 206 std::string result = StringPrintf("%d %d", | 206 std::string result = base::StringPrintf("%d %d", |
| 207 key_press_count_, | 207 key_press_count_, |
| 208 key_release_count_); | 208 key_release_count_); |
| 209 key_press_count_ = 0; | 209 key_press_count_ = 0; |
| 210 key_release_count_ = 0; | 210 key_release_count_ = 0; |
| 211 return result; | 211 return result; |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace test | 214 } // namespace test |
| 215 } // namespace aura | 215 } // namespace aura |
| OLD | NEW |