OLD | NEW |
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 <Cocoa/Cocoa.h> | 5 #include <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "ui/base/events.h" | 7 #include "ui/base/events.h" |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // Touch is currently unsupported. | 172 // Touch is currently unsupported. |
173 return 0.0; | 173 return 0.0; |
174 } | 174 } |
175 | 175 |
176 bool GetScrollOffsets(const base::NativeEvent& native_event, | 176 bool GetScrollOffsets(const base::NativeEvent& native_event, |
177 float* x_offset, | 177 float* x_offset, |
178 float* y_offset) { | 178 float* y_offset) { |
179 return false; | 179 return false; |
180 } | 180 } |
181 | 181 |
182 bool IsNoopEvent(base::NativeEvent event) { | 182 bool IsNoopEvent(const base::NativeEvent& event) { |
183 return ([event type] == NSApplicationDefined && [event subtype] == 0); | 183 return ([event type] == NSApplicationDefined && [event subtype] == 0); |
184 } | 184 } |
185 | 185 |
186 base::NativeEvent CreateNoopEvent() { | 186 base::NativeEvent CreateNoopEvent() { |
187 return [NSEvent otherEventWithType:NSApplicationDefined | 187 return [NSEvent otherEventWithType:NSApplicationDefined |
188 location:NSZeroPoint | 188 location:NSZeroPoint |
189 modifierFlags:0 | 189 modifierFlags:0 |
190 timestamp:[NSDate timeIntervalSinceReferenceDate] | 190 timestamp:[NSDate timeIntervalSinceReferenceDate] |
191 windowNumber:0 | 191 windowNumber:0 |
192 context:nil | 192 context:nil |
193 subtype:0 | 193 subtype:0 |
194 data1:0 | 194 data1:0 |
195 data2:0]; | 195 data2:0]; |
196 } | 196 } |
197 | 197 |
198 } // namespace ui | 198 } // namespace ui |
OLD | NEW |