OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/base/touch/touch_device.h" |
| 6 |
| 7 namespace ui { |
| 8 |
| 9 namespace { |
| 10 |
| 11 int available_pointer_types_for_testing = POINTER_TYPE_NONE; |
| 12 int available_hover_types_for_testing = HOVER_TYPE_NONE; |
| 13 bool return_available_pointer_and_hover_types_for_testing = false; |
| 14 } |
| 15 |
| 16 void SetAvailablePointerAndHoverTypesForTesting(int available_pointer_types, |
| 17 int available_hover_types) { |
| 18 return_available_pointer_and_hover_types_for_testing = true; |
| 19 available_pointer_types_for_testing = available_pointer_types; |
| 20 available_hover_types_for_testing = available_hover_types; |
| 21 } |
| 22 |
| 23 std::pair<int, int> GetAvailablePointerAndHoverTypes() { |
| 24 if (return_available_pointer_and_hover_types_for_testing) |
| 25 return std::make_pair(available_pointer_types_for_testing, |
| 26 available_hover_types_for_testing); |
| 27 return std::make_pair(GetAvailablePointerTypes(), GetAvailableHoverTypes()); |
| 28 } |
| 29 |
| 30 } // namespace ui |
OLD | NEW |