| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef WebCoalescedInputEvent_h | 5 #ifndef WebCoalescedInputEvent_h |
| 6 #define WebCoalescedInputEvent_h | 6 #define WebCoalescedInputEvent_h |
| 7 | 7 |
| 8 #include "WebCommon.h" | 8 #include "WebCommon.h" |
| 9 #include "WebInputEvent.h" | 9 #include "WebInputEvent.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 const std::vector<const WebInputEvent*>&); | 22 const std::vector<const WebInputEvent*>&); |
| 23 | 23 |
| 24 WebInputEvent* eventPointer(); | 24 WebInputEvent* eventPointer(); |
| 25 void addCoalescedEvent(const blink::WebInputEvent&); | 25 void addCoalescedEvent(const blink::WebInputEvent&); |
| 26 const WebInputEvent& event() const; | 26 const WebInputEvent& event() const; |
| 27 size_t coalescedEventSize() const; | 27 size_t coalescedEventSize() const; |
| 28 const WebInputEvent& coalescedEvent(size_t index) const; | 28 const WebInputEvent& coalescedEvent(size_t index) const; |
| 29 std::vector<const WebInputEvent*> getCoalescedEventsPointers() const; | 29 std::vector<const WebInputEvent*> getCoalescedEventsPointers() const; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 struct WebInputEventDeleter { | 32 // TODO(hans): Remove this once clang-cl knows to not inline dtors that |
| 33 // call operator(), https://crbug.com/691714 |
| 34 struct BLINK_PLATFORM_EXPORT WebInputEventDeleter { |
| 33 void operator()(blink::WebInputEvent*) const; | 35 void operator()(blink::WebInputEvent*) const; |
| 34 }; | 36 }; |
| 35 | 37 |
| 36 using WebScopedInputEvent = | 38 using WebScopedInputEvent = |
| 37 std::unique_ptr<WebInputEvent, WebInputEventDeleter>; | 39 std::unique_ptr<WebInputEvent, WebInputEventDeleter>; |
| 38 | 40 |
| 39 WebScopedInputEvent makeWebScopedInputEvent(const blink::WebInputEvent&); | 41 WebScopedInputEvent makeWebScopedInputEvent(const blink::WebInputEvent&); |
| 40 | 42 |
| 41 WebScopedInputEvent m_event; | 43 WebScopedInputEvent m_event; |
| 42 std::vector<WebScopedInputEvent> m_coalescedEvents; | 44 std::vector<WebScopedInputEvent> m_coalescedEvents; |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 using WebScopedCoalescedInputEvent = std::unique_ptr<WebCoalescedInputEvent>; | 47 using WebScopedCoalescedInputEvent = std::unique_ptr<WebCoalescedInputEvent>; |
| 46 | 48 |
| 47 } // namespace blink | 49 } // namespace blink |
| 48 | 50 |
| 49 #endif | 51 #endif |
| OLD | NEW |