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

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

Issue 2673963002: Drop hover:on-demand support & let touch-screens report "none" instead. (Closed)
Patch Set: Fixed a "yikes!" Created 3 years, 9 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.h ('k') | ui/base/touch/touch_device_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/android/context_utils.h" 7 #include "base/android/context_utils.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "jni/TouchDevice_jni.h" 10 #include "jni/TouchDevice_jni.h"
(...skipping 27 matching lines...) Expand all
38 PointerType GetPrimaryPointerType(int available_pointer_types) { 38 PointerType GetPrimaryPointerType(int available_pointer_types) {
39 if (available_pointer_types & POINTER_TYPE_COARSE) 39 if (available_pointer_types & POINTER_TYPE_COARSE)
40 return POINTER_TYPE_COARSE; 40 return POINTER_TYPE_COARSE;
41 if (available_pointer_types & POINTER_TYPE_FINE) 41 if (available_pointer_types & POINTER_TYPE_FINE)
42 return POINTER_TYPE_FINE; 42 return POINTER_TYPE_FINE;
43 DCHECK_EQ(available_pointer_types, POINTER_TYPE_NONE); 43 DCHECK_EQ(available_pointer_types, POINTER_TYPE_NONE);
44 return POINTER_TYPE_NONE; 44 return POINTER_TYPE_NONE;
45 } 45 }
46 46
47 HoverType GetPrimaryHoverType(int available_hover_types) { 47 HoverType GetPrimaryHoverType(int available_hover_types) {
48 if (available_hover_types & HOVER_TYPE_ON_DEMAND) 48 if (available_hover_types & HOVER_TYPE_NONE)
49 return HOVER_TYPE_ON_DEMAND; 49 return HOVER_TYPE_NONE;
50 if (available_hover_types & HOVER_TYPE_HOVER) 50 DCHECK_EQ(available_hover_types, HOVER_TYPE_HOVER);
51 return HOVER_TYPE_HOVER; 51 return HOVER_TYPE_HOVER;
52 DCHECK_EQ(available_hover_types, HOVER_TYPE_NONE);
53 return HOVER_TYPE_NONE;
54 } 52 }
55 53
56 } // namespace ui 54 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/touch/touch_device.h ('k') | ui/base/touch/touch_device_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698