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

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

Issue 2827803002: Make Interaction Media Features MQ dynamic on Linux. (Closed)
Patch Set: Rebase and fix test failures 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
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
17 void SetAvailablePointerAndHoverTypesForTesting(int available_pointer_types,
18 int available_hover_types) {
19 return_available_pointer_and_hover_types_for_testing = true;
20 available_pointer_types_for_testing = available_pointer_types;
21 available_hover_types_for_testing = available_hover_types;
22 }
23
24 std::pair<int, int> GetAvailablePointerAndHoverTypes() {
25 if (return_available_pointer_and_hover_types_for_testing)
sadrul 2017/05/10 01:47:54 Indenting is off here
26 return std::make_pair(available_pointer_types_for_testing,
27 available_hover_types_for_testing);
28 return std::make_pair(GetAvailablePointerTypes(), GetAvailableHoverTypes());
29 }
30
31 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698