| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 int mouse_event_count() const { return mouse_event_count_; } | 170 int mouse_event_count() const { return mouse_event_count_; } |
| 171 int touch_event_count() const { return touch_event_count_; } | 171 int touch_event_count() const { return touch_event_count_; } |
| 172 int gesture_event_count() const { return gesture_event_count_; } | 172 int gesture_event_count() const { return gesture_event_count_; } |
| 173 | 173 |
| 174 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE { | 174 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE { |
| 175 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED) | 175 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED) |
| 176 capture_changed_event_count_++; | 176 capture_changed_event_count_++; |
| 177 mouse_event_count_++; | 177 mouse_event_count_++; |
| 178 return ui::ER_UNHANDLED; | 178 return ui::ER_UNHANDLED; |
| 179 } | 179 } |
| 180 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE { | 180 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE { |
| 181 touch_event_count_++; | 181 touch_event_count_++; |
| 182 return ui::ER_UNHANDLED; | |
| 183 } | 182 } |
| 184 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { | 183 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { |
| 185 gesture_event_count_++; | 184 gesture_event_count_++; |
| 186 } | 185 } |
| 187 virtual void OnCaptureLost() OVERRIDE { | 186 virtual void OnCaptureLost() OVERRIDE { |
| 188 capture_lost_count_++; | 187 capture_lost_count_++; |
| 189 } | 188 } |
| 190 | 189 |
| 191 private: | 190 private: |
| 192 int capture_changed_event_count_; | 191 int capture_changed_event_count_; |
| (...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2593 // Move |w2| to be a child of |w1|. | 2592 // Move |w2| to be a child of |w1|. |
| 2594 w1->AddChild(w2.get()); | 2593 w1->AddChild(w2.get()); |
| 2595 // Sine we moved in the same root, observer shouldn't be notified. | 2594 // Sine we moved in the same root, observer shouldn't be notified. |
| 2596 EXPECT_EQ("0 0", observer.CountStringAndReset()); | 2595 EXPECT_EQ("0 0", observer.CountStringAndReset()); |
| 2597 // |w2| should still have focus after moving. | 2596 // |w2| should still have focus after moving. |
| 2598 EXPECT_TRUE(w2->HasFocus()); | 2597 EXPECT_TRUE(w2->HasFocus()); |
| 2599 } | 2598 } |
| 2600 | 2599 |
| 2601 } // namespace test | 2600 } // namespace test |
| 2602 } // namespace aura | 2601 } // namespace aura |
| OLD | NEW |