| 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..51bbf9f334af1daf1d603ed65bee48f769bb090c
|
| --- /dev/null
|
| +++ b/content/renderer/pepper/pepper_io_stream_host.h
|
| @@ -0,0 +1,52 @@
|
| +// Copyright (c) 2014 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 {
|
| + protected:
|
| + PepperIOStreamHost(RendererPpapiHost* host,
|
| + PP_Instance instance,
|
| + PP_Resource resource,
|
| + bool is_input);
|
| +
|
| + virtual ~PepperIOStreamHost();
|
| +
|
| + virtual int32_t OnResourceMessageReceived(
|
| + const IPC::Message& msg,
|
| + ppapi::host::HostMessageContext* context) OVERRIDE;
|
| +
|
| + bool InitSharedBufferAndNotifyPlugin(uint32_t size);
|
| +
|
| + 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_
|
|
|