Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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/events/base_event_utils.h" | |
| 6 | |
| 7 #include "base/atomic_sequence_num.h" | |
| 8 #include "base/logging.h" | |
| 9 | |
| 10 namespace ui { | |
| 11 | |
| 12 base::StaticAtomicSequenceNumber g_next_event_id; | |
| 13 | |
| 14 uint32 GetNextTouchEventId() { | |
| 15 // Set the first touch event ID to 1 because we set id to 0 for other types | |
| 16 // of events. | |
| 17 uint32 id = g_next_event_id.GetNext(); | |
| 18 if (id==0) | |
|
sadrul
2015/04/27 19:00:43
spaces around ==
lanwei
2015/04/28 16:24:35
Done.
| |
| 19 id = g_next_event_id.GetNext(); | |
| 20 DCHECK_NE(0U, id); | |
| 21 return id; | |
| 22 } | |
| 23 | |
| 24 } // namespace ui | |
| 25 | |
| OLD | NEW |