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 "ash/wm/window_modality_controller.h" | 5 #include "ash/wm/window_modality_controller.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "ash/test/capture_tracking_view.h" | 9 #include "ash/test/capture_tracking_view.h" |
10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 virtual ~TouchTrackerWindowDelegate() {} | 287 virtual ~TouchTrackerWindowDelegate() {} |
288 | 288 |
289 void reset() { | 289 void reset() { |
290 received_touch_ = false; | 290 received_touch_ = false; |
291 } | 291 } |
292 | 292 |
293 bool received_touch() const { return received_touch_; } | 293 bool received_touch() const { return received_touch_; } |
294 | 294 |
295 private: | 295 private: |
296 // Overridden from aura::test::TestWindowDelegate. | 296 // Overridden from aura::test::TestWindowDelegate. |
297 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE { | 297 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE { |
298 received_touch_ = true; | 298 received_touch_ = true; |
299 return aura::test::TestWindowDelegate::OnTouchEvent(event); | 299 return aura::test::TestWindowDelegate::OnTouchEvent(event); |
300 } | 300 } |
301 | 301 |
302 bool received_touch_; | 302 bool received_touch_; |
303 | 303 |
304 DISALLOW_COPY_AND_ASSIGN(TouchTrackerWindowDelegate); | 304 DISALLOW_COPY_AND_ASSIGN(TouchTrackerWindowDelegate); |
305 }; | 305 }; |
306 | 306 |
307 // Modality should prevent events from being passed to the transient parent. | 307 // Modality should prevent events from being passed to the transient parent. |
(...skipping 29 matching lines...) Expand all Loading... |
337 gfx::Point(10, 10)); | 337 gfx::Point(10, 10)); |
338 generator.PressMoveAndReleaseTouchTo(gfx::Point(10, 10)); | 338 generator.PressMoveAndReleaseTouchTo(gfx::Point(10, 10)); |
339 EXPECT_TRUE(wm::IsActiveWindow(w11.get())); | 339 EXPECT_TRUE(wm::IsActiveWindow(w11.get())); |
340 EXPECT_FALSE(d1.received_touch()); | 340 EXPECT_FALSE(d1.received_touch()); |
341 EXPECT_FALSE(d11.received_touch()); | 341 EXPECT_FALSE(d11.received_touch()); |
342 } | 342 } |
343 } | 343 } |
344 | 344 |
345 } // namespace internal | 345 } // namespace internal |
346 } // namespace ash | 346 } // namespace ash |
OLD | NEW |