OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_INPUT_WEB_EVENT_H_ |
| 6 #define CONTENT_COMMON_INPUT_WEB_EVENT_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "content/common/content_export.h" |
| 10 #include "content/common/input/input_event.h" |
| 11 #include "ui/base/latency_info.h" |
| 12 |
| 13 namespace WebKit { |
| 14 class WebInputEvent; |
| 15 } |
| 16 |
| 17 namespace content { |
| 18 |
| 19 // Events based on WebKit::WebInputEvent-derivatives. |
| 20 class CONTENT_EXPORT WebEvent : public InputEvent { |
| 21 public: |
| 22 static scoped_ptr<WebEvent> Create(); |
| 23 static scoped_ptr<WebEvent> Create(int64 id, |
| 24 const WebKit::WebInputEvent& event, |
| 25 const ui::LatencyInfo& latency_info, |
| 26 bool is_keyboard_shortcut, |
| 27 bool creates_followup_events); |
| 28 |
| 29 void SetAll(const WebKit::WebInputEvent& event, |
| 30 const ui::LatencyInfo& latency_info, |
| 31 bool is_keyboard_shortcut, |
| 32 bool creates_followup_events); |
| 33 |
| 34 scoped_ptr<WebKit::WebInputEvent> event; |
| 35 ui::LatencyInfo latency_info; |
| 36 bool is_keyboard_shortcut; |
| 37 bool creates_followup_events; |
| 38 |
| 39 static const WebEvent* EventCast(const InputEvent* event); |
| 40 |
| 41 protected: |
| 42 WebEvent(int64 id); |
| 43 }; |
| 44 |
| 45 } // namespace content |
| 46 |
| 47 #endif // CONTENT_COMMON_INPUT_WEB_EVENT_H_ |
OLD | NEW |