| Index: content/common/input/generic_input_event.cc
|
| diff --git a/content/common/input/generic_input_event.cc b/content/common/input/generic_input_event.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..68c7ddce5003e103a3087b5ecc6b48996215ebf1
|
| --- /dev/null
|
| +++ b/content/common/input/generic_input_event.cc
|
| @@ -0,0 +1,35 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/common/input/generic_input_event.h"
|
| +
|
| +#include "content/common/input_messages.h"
|
| +#include "ipc/ipc_message.h"
|
| +
|
| +namespace content {
|
| +
|
| +GenericInputEvent::GenericInputEvent(int64 id)
|
| + : InputEvent(GENERIC, ACK_NOT_REQUIRED, id) {}
|
| +
|
| +GenericInputEvent::~GenericInputEvent() {}
|
| +
|
| +scoped_ptr<GenericInputEvent> GenericInputEvent::Create() {
|
| + return make_scoped_ptr(new GenericInputEvent(0));
|
| +}
|
| +
|
| +scoped_ptr<GenericInputEvent> GenericInputEvent::Create(
|
| + int64 id, scoped_ptr<IPC::Message> message) {
|
| + DCHECK(message);
|
| + DCHECK_EQ(InputMsgStart, IPC_MESSAGE_ID_CLASS(message->type()));
|
| + scoped_ptr<GenericInputEvent> event(new GenericInputEvent(id));
|
| + event->message = message.Pass();
|
| + return event.Pass();
|
| +}
|
| +
|
| +const GenericInputEvent* GenericInputEvent::EventCast(const InputEvent* event) {
|
| + DCHECK_EQ(InputEvent::GENERIC, event->type);
|
| + return static_cast<const GenericInputEvent*>(event);
|
| +}
|
| +
|
| +} // namespace content
|
|
|