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

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

Issue 2690323002: Make Interaction Media Features MQ dynamic on Windows. (Closed)
Patch Set: Nit fix Created 3 years, 8 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 (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 "ui/base/touch/touch_device.h" 5 #include "ui/base/touch/touch_device.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/win/win_util.h" 8 #include "base/win/win_util.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return POINTER_TYPE_NONE; 90 return POINTER_TYPE_NONE;
91 } 91 }
92 92
93 HoverType GetPrimaryHoverType(int available_hover_types) { 93 HoverType GetPrimaryHoverType(int available_hover_types) {
94 if (available_hover_types & HOVER_TYPE_HOVER) 94 if (available_hover_types & HOVER_TYPE_HOVER)
95 return HOVER_TYPE_HOVER; 95 return HOVER_TYPE_HOVER;
96 DCHECK_EQ(available_hover_types, HOVER_TYPE_NONE); 96 DCHECK_EQ(available_hover_types, HOVER_TYPE_NONE);
97 return HOVER_TYPE_NONE; 97 return HOVER_TYPE_NONE;
98 } 98 }
99 99
100 bool return_available_pointer_and_hover_types_for_testing = false;
101 int available_pointer_types_for_testing = POINTER_TYPE_NONE;
102 int available_hover_types_for_testing = HOVER_TYPE_NONE;
103
104 void SetAvailablePointerAndHoverTypesForTesting(int available_pointer_types,
105 int available_hover_types) {
106 return_available_pointer_and_hover_types_for_testing = true;
107 available_pointer_types_for_testing = available_pointer_types;
108 available_hover_types_for_testing = available_hover_types;
109 }
110
100 std::pair<int, int> GetAvailablePointerAndHoverTypes() { 111 std::pair<int, int> GetAvailablePointerAndHoverTypes() {
112 if (return_available_pointer_and_hover_types_for_testing)
113 return std::make_pair(available_pointer_types_for_testing,
114 available_hover_types_for_testing);
101 return std::make_pair(GetAvailablePointerTypes(), GetAvailableHoverTypes()); 115 return std::make_pair(GetAvailablePointerTypes(), GetAvailableHoverTypes());
102 } 116 }
103 117
104 } // namespace ui 118 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698