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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 int mouse_event_count() const { return mouse_event_count_; } | 164 int mouse_event_count() const { return mouse_event_count_; } |
165 int touch_event_count() const { return touch_event_count_; } | 165 int touch_event_count() const { return touch_event_count_; } |
166 int gesture_event_count() const { return gesture_event_count_; } | 166 int gesture_event_count() const { return gesture_event_count_; } |
167 | 167 |
168 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE { | 168 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE { |
169 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED) | 169 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED) |
170 capture_changed_event_count_++; | 170 capture_changed_event_count_++; |
171 mouse_event_count_++; | 171 mouse_event_count_++; |
172 return ui::ER_UNHANDLED; | 172 return ui::ER_UNHANDLED; |
173 } | 173 } |
174 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE { | 174 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE { |
175 touch_event_count_++; | 175 touch_event_count_++; |
176 return ui::TOUCH_STATUS_UNKNOWN; | 176 return ui::ER_UNHANDLED; |
177 } | 177 } |
178 virtual ui::EventResult OnGestureEvent( | 178 virtual ui::EventResult OnGestureEvent( |
179 ui::GestureEvent* event) OVERRIDE { | 179 ui::GestureEvent* event) OVERRIDE { |
180 gesture_event_count_++; | 180 gesture_event_count_++; |
181 return ui::ER_UNHANDLED; | 181 return ui::ER_UNHANDLED; |
182 } | 182 } |
183 virtual void OnCaptureLost() OVERRIDE { | 183 virtual void OnCaptureLost() OVERRIDE { |
184 capture_lost_count_++; | 184 capture_lost_count_++; |
185 } | 185 } |
186 | 186 |
(...skipping 2351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2538 // Move |w2| to be a child of |w1|. | 2538 // Move |w2| to be a child of |w1|. |
2539 w1->AddChild(w2.get()); | 2539 w1->AddChild(w2.get()); |
2540 // Sine we moved in the same root, observer shouldn't be notified. | 2540 // Sine we moved in the same root, observer shouldn't be notified. |
2541 EXPECT_EQ("0 0", observer.CountStringAndReset()); | 2541 EXPECT_EQ("0 0", observer.CountStringAndReset()); |
2542 // |w2| should still have focus after moving. | 2542 // |w2| should still have focus after moving. |
2543 EXPECT_TRUE(w2->HasFocus()); | 2543 EXPECT_TRUE(w2->HasFocus()); |
2544 } | 2544 } |
2545 | 2545 |
2546 } // namespace test | 2546 } // namespace test |
2547 } // namespace aura | 2547 } // namespace aura |
OLD | NEW |