Chromium Code Reviews| Index: content/renderer/pepper/pepper_io_stream_host.h |
| diff --git a/content/renderer/pepper/pepper_io_stream_host.h b/content/renderer/pepper/pepper_io_stream_host.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..10dd5477640e7c7d1a5789aa455c6737338cd877 |
| --- /dev/null |
| +++ b/content/renderer/pepper/pepper_io_stream_host.h |
| @@ -0,0 +1,51 @@ |
| +// 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. |
| + |
| +#ifndef CONTENT_RENDERER_PEPPER_PEPPER_IO_STREAM_HOST_H_ |
| +#define CONTENT_RENDERER_PEPPER_PEPPER_IO_STREAM_HOST_H_ |
| + |
| +#include "base/compiler_specific.h" |
| +#include "content/common/content_export.h" |
| +#include "ppapi/host/host_message_context.h" |
| +#include "ppapi/host/resource_host.h" |
| +#include "ppapi/shared_impl/io_stream_shared.h" |
| + |
| +namespace content { |
| + |
| +class RendererPpapiHost; |
| + |
| +class PepperIOStreamHost |
| + : public ppapi::host::ResourceHost, public ppapi::IOStreamShared { |
|
bbudge
2013/12/31 00:51:53
One subclass per line. i.e.
class PepperIOStreamH
Peng
2013/12/31 23:33:54
Done.
|
| + protected: |
| + PepperIOStreamHost(RendererPpapiHost* host, |
| + PP_Instance instance, |
| + PP_Resource resource, |
| + bool input); |
| + |
| + virtual ~PepperIOStreamHost(); |
| + |
| + virtual int32_t OnResourceMessageReceived( |
| + const IPC::Message& msg, |
| + ppapi::host::HostMessageContext* context) OVERRIDE; |
| + |
| + bool InitSharedBufferAndInfoPlugin(uint32_t size); |
|
bbudge
2013/12/31 00:51:53
InitSharedBufferAndNotifyPlugin would be clearer.
Peng
2013/12/31 23:33:54
Done.
|
| + |
| + private: |
| + bool InitSharedBuffer(uint32_t size); |
| + |
| + int32_t OnHostMsgInit(ppapi::host::HostMessageContext* context, |
| + uint32_t size); |
| + |
| + int32_t OnHostMsgMoveLimit(ppapi::host::HostMessageContext* context, |
| + uint32_t offset); |
| + |
| + // Overridden from ppapi::IOStreamShared. |
| + void MovePeerLimit(uint32_t offset) OVERRIDE; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PepperIOStreamHost); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_PEPPER_PEPPER_IO_STREAM_HOST_H_ |