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

Side by Side Diff: ui/aura/test/aura_test_utils.cc

Issue 503883004: Don't pass touches to gesture recognizer for async acks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bug, add test. Created 6 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/aura_test_utils.h" 5 #include "ui/aura/test/aura_test_utils.h"
6 6
7 #include "ui/aura/window_tree_host.h" 7 #include "ui/aura/window_tree_host.h"
8 8
9 namespace aura { 9 namespace aura {
10 namespace test { 10 namespace test {
11 11
12 class WindowTreeHostTestApi { 12 WindowTreeHostTestApi::WindowTreeHostTestApi(WindowTreeHost* host)
13 public: 13 : host_(host) {
14 explicit WindowTreeHostTestApi(WindowTreeHost* host) : host_(host) {} 14 }
15 15
16 const gfx::Point& last_cursor_request_position_in_host() { 16 const gfx::Point&
17 return host_->last_cursor_request_position_in_host_; 17 WindowTreeHostTestApi::last_cursor_request_position_in_host() {
18 } 18 return host_->last_cursor_request_position_in_host_;
19 }
19 20
20 private: 21 void WindowTreeHostTestApi::set_dispatcher(WindowEventDispatcher* dispatcher) {
21 WindowTreeHost* host_; 22 host_->dispatcher_.reset(dispatcher);
22 23 }
23 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostTestApi);
24 };
25 24
26 const gfx::Point& QueryLatestMousePositionRequestInHost(WindowTreeHost* host) { 25 const gfx::Point& QueryLatestMousePositionRequestInHost(WindowTreeHost* host) {
27 WindowTreeHostTestApi host_test_api(host); 26 WindowTreeHostTestApi host_test_api(host);
28 return host_test_api.last_cursor_request_position_in_host(); 27 return host_test_api.last_cursor_request_position_in_host();
29 } 28 }
30 29
31 } // namespace test 30 } // namespace test
32 } // namespace aura 31 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698