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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 bool should_capture_; | 327 bool should_capture_; |
328 base::UnguessableToken source_id_for_copy_request_; | 328 base::UnguessableToken source_id_for_copy_request_; |
329 }; | 329 }; |
330 | 330 |
331 class FakeWindowEventDispatcher : public aura::WindowEventDispatcher { | 331 class FakeWindowEventDispatcher : public aura::WindowEventDispatcher { |
332 public: | 332 public: |
333 FakeWindowEventDispatcher(aura::WindowTreeHost* host) | 333 FakeWindowEventDispatcher(aura::WindowTreeHost* host) |
334 : WindowEventDispatcher(host), | 334 : WindowEventDispatcher(host), |
335 processed_touch_event_count_(0) {} | 335 processed_touch_event_count_(0) {} |
336 | 336 |
337 void ProcessedTouchEvent( | 337 void ProcessedTouchEvent(uint32_t unique_event_id, |
338 uint32_t unique_event_id, | 338 aura::Window* window, |
339 aura::Window* window, | 339 ui::EventResult result) override { |
340 ui::EventResult result, | 340 WindowEventDispatcher::ProcessedTouchEvent(unique_event_id, window, result); |
341 bool is_source_touch_event_set_non_blocking) override { | |
342 WindowEventDispatcher::ProcessedTouchEvent( | |
343 unique_event_id, window, result, | |
344 is_source_touch_event_set_non_blocking); | |
345 processed_touch_event_count_++; | 341 processed_touch_event_count_++; |
346 } | 342 } |
347 | 343 |
348 size_t GetAndResetProcessedTouchEventCount() { | 344 size_t GetAndResetProcessedTouchEventCount() { |
349 size_t count = processed_touch_event_count_; | 345 size_t count = processed_touch_event_count_; |
350 processed_touch_event_count_ = 0; | 346 processed_touch_event_count_ = 0; |
351 return count; | 347 return count; |
352 } | 348 } |
353 | 349 |
354 private: | 350 private: |
(...skipping 5481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5836 // There is no composition in the beginning. | 5832 // There is no composition in the beginning. |
5837 EXPECT_FALSE(has_composition_text()); | 5833 EXPECT_FALSE(has_composition_text()); |
5838 SetHasCompositionTextToTrue(); | 5834 SetHasCompositionTextToTrue(); |
5839 view->ImeCancelComposition(); | 5835 view->ImeCancelComposition(); |
5840 // The composition must have been canceled. | 5836 // The composition must have been canceled. |
5841 EXPECT_FALSE(has_composition_text()); | 5837 EXPECT_FALSE(has_composition_text()); |
5842 } | 5838 } |
5843 } | 5839 } |
5844 | 5840 |
5845 } // namespace content | 5841 } // namespace content |
OLD | NEW |