Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: ash/wm/window_modality_controller_unittest.cc

Issue 10964051: events: Clean up dispatching code for touch-events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/wm/toplevel_window_event_handler.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698