OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/events/event_utils.h" | 5 #include "ui/events/event_utils.h" |
6 | 6 |
7 #include <Cocoa/Cocoa.h> | 7 #include <Cocoa/Cocoa.h> |
8 | 8 |
9 #import "base/mac/mac_util.h" | 9 #import "base/mac/mac_util.h" |
10 #import "base/mac/sdk_forward_declarations.h" | 10 #import "base/mac/sdk_forward_declarations.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // values when scrolling up or to the left. Scrolling quickly results in a | 145 // values when scrolling up or to the left. Scrolling quickly results in a |
146 // higher delta per click, up to about 15.0. (Quartz documentation suggests | 146 // higher delta per click, up to about 15.0. (Quartz documentation suggests |
147 // +/-10). | 147 // +/-10). |
148 // Multiply by 1000 to vaguely approximate WHEEL_DELTA on Windows (120). | 148 // Multiply by 1000 to vaguely approximate WHEEL_DELTA on Windows (120). |
149 const CGFloat kWheelDeltaMultiplier = 1000; | 149 const CGFloat kWheelDeltaMultiplier = 1000; |
150 return gfx::Vector2d(kWheelDeltaMultiplier * [event deltaX], | 150 return gfx::Vector2d(kWheelDeltaMultiplier * [event deltaX], |
151 kWheelDeltaMultiplier * [event deltaY]); | 151 kWheelDeltaMultiplier * [event deltaY]); |
152 } | 152 } |
153 } | 153 } |
154 | 154 |
155 base::NativeEvent CopyNativeEvent(const base::NativeEvent& event) { | |
156 return [event copy]; | |
157 } | |
158 | |
159 void ReleaseCopiedNativeEvent(const base::NativeEvent& event) { | |
160 [event release]; | |
161 } | |
162 | |
163 void IncrementTouchIdRefCount(const base::NativeEvent& native_event) { | 155 void IncrementTouchIdRefCount(const base::NativeEvent& native_event) { |
164 NOTIMPLEMENTED(); | 156 NOTIMPLEMENTED(); |
165 } | 157 } |
166 | 158 |
167 void ClearTouchIdIfReleased(const base::NativeEvent& native_event) { | 159 void ClearTouchIdIfReleased(const base::NativeEvent& native_event) { |
168 NOTIMPLEMENTED(); | 160 NOTIMPLEMENTED(); |
169 } | 161 } |
170 | 162 |
171 int GetTouchId(const base::NativeEvent& native_event) { | 163 int GetTouchId(const base::NativeEvent& native_event) { |
172 NOTIMPLEMENTED(); | 164 NOTIMPLEMENTED(); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 uint16 return_value; | 257 uint16 return_value; |
266 [text getCharacters:&return_value]; | 258 [text getCharacters:&return_value]; |
267 return return_value; | 259 return return_value; |
268 } | 260 } |
269 | 261 |
270 bool IsCharFromNative(const base::NativeEvent& native_event) { | 262 bool IsCharFromNative(const base::NativeEvent& native_event) { |
271 return false; | 263 return false; |
272 } | 264 } |
273 | 265 |
274 } // namespace ui | 266 } // namespace ui |
OLD | NEW |