Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014 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_RENDERER_PEPPER_PEPPER_IO_STREAM_HOST_H_ | |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_IO_STREAM_HOST_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "content/common/content_export.h" | |
| 10 #include "ppapi/host/host_message_context.h" | |
| 11 #include "ppapi/host/resource_host.h" | |
| 12 #include "ppapi/shared_impl/io_stream_shared.h" | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 class RendererPpapiHost; | |
| 17 | |
| 18 class PepperIOStreamHost | |
|
yzshen1
2014/01/03 21:51:41
Please consider naming it ...Base.
| |
| 19 : public ppapi::host::ResourceHost, | |
| 20 public ppapi::IOStreamShared { | |
| 21 protected: | |
| 22 PepperIOStreamHost(RendererPpapiHost* host, | |
| 23 PP_Instance instance, | |
| 24 PP_Resource resource, | |
| 25 bool is_input); | |
| 26 | |
| 27 virtual ~PepperIOStreamHost(); | |
| 28 | |
| 29 virtual int32_t OnResourceMessageReceived( | |
| 30 const IPC::Message& msg, | |
| 31 ppapi::host::HostMessageContext* context) OVERRIDE; | |
| 32 | |
| 33 bool InitSharedBufferAndNotifyPlugin(uint32_t size); | |
| 34 | |
| 35 private: | |
| 36 bool InitSharedBuffer(uint32_t size); | |
| 37 | |
| 38 int32_t OnHostMsgInit(ppapi::host::HostMessageContext* context, | |
| 39 uint32_t size); | |
| 40 | |
| 41 int32_t OnHostMsgMoveLimit(ppapi::host::HostMessageContext* context, | |
| 42 uint32_t offset); | |
| 43 | |
| 44 // Overridden from ppapi::IOStreamShared. | |
| 45 void MovePeerLimit(uint32_t offset) OVERRIDE; | |
| 46 | |
| 47 DISALLOW_COPY_AND_ASSIGN(PepperIOStreamHost); | |
| 48 }; | |
| 49 | |
| 50 } // namespace content | |
| 51 | |
| 52 #endif // CONTENT_RENDERER_PEPPER_PEPPER_IO_STREAM_HOST_H_ | |
| OLD | NEW |