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 #include "content/common/input/ipc_input_event_payload.h" |
| 6 |
| 7 namespace content { |
| 8 |
| 9 scoped_ptr<IPCInputEventPayload> IPCInputEventPayload::Create() { |
| 10 return make_scoped_ptr(new IPCInputEventPayload()); |
| 11 } |
| 12 |
| 13 scoped_ptr<IPCInputEventPayload> IPCInputEventPayload::Create( |
| 14 scoped_ptr<IPC::Message> message) { |
| 15 DCHECK(message); |
| 16 scoped_ptr<IPCInputEventPayload> payload = Create(); |
| 17 payload->message = message.Pass(); |
| 18 return payload.Pass(); |
| 19 } |
| 20 |
| 21 const IPCInputEventPayload* IPCInputEventPayload::Cast(const Payload* payload) { |
| 22 DCHECK(payload); |
| 23 DCHECK_EQ(IPC_MESSAGE, payload->GetType()); |
| 24 return static_cast<const IPCInputEventPayload*>(payload); |
| 25 } |
| 26 |
| 27 IPCInputEventPayload::IPCInputEventPayload() {} |
| 28 |
| 29 IPCInputEventPayload::~IPCInputEventPayload() {} |
| 30 |
| 31 InputEvent::Payload::Type IPCInputEventPayload::GetType() const { |
| 32 return IPC_MESSAGE; |
| 33 } |
| 34 |
| 35 } // namespace content |
OLD | NEW |