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

Side by Side Diff: ui/base/touch/touch_device_util.cc

Issue 2827803002: Make Interaction Media Features MQ dynamic on Linux. (Closed)
Patch Set: Patch for landing, added the mojo bits Created 3 years, 7 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
« no previous file with comments | « ui/base/touch/touch_device_linux.cc ('k') | ui/base/touch/touch_device_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « ui/base/touch/touch_device_linux.cc ('k') | ui/base/touch/touch_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698