Chromium Code Reviews| 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 #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 | |
| 19 : 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.
| |
| 20 protected: | |
| 21 PepperIOStreamHost(RendererPpapiHost* host, | |
| 22 PP_Instance instance, | |
| 23 PP_Resource resource, | |
| 24 bool input); | |
| 25 | |
| 26 virtual ~PepperIOStreamHost(); | |
| 27 | |
| 28 virtual int32_t OnResourceMessageReceived( | |
| 29 const IPC::Message& msg, | |
| 30 ppapi::host::HostMessageContext* context) OVERRIDE; | |
| 31 | |
| 32 bool InitSharedBufferAndInfoPlugin(uint32_t size); | |
|
bbudge
2013/12/31 00:51:53
InitSharedBufferAndNotifyPlugin would be clearer.
Peng
2013/12/31 23:33:54
Done.
| |
| 33 | |
| 34 private: | |
| 35 bool InitSharedBuffer(uint32_t size); | |
| 36 | |
| 37 int32_t OnHostMsgInit(ppapi::host::HostMessageContext* context, | |
| 38 uint32_t size); | |
| 39 | |
| 40 int32_t OnHostMsgMoveLimit(ppapi::host::HostMessageContext* context, | |
| 41 uint32_t offset); | |
| 42 | |
| 43 // Overridden from ppapi::IOStreamShared. | |
| 44 void MovePeerLimit(uint32_t offset) OVERRIDE; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(PepperIOStreamHost); | |
| 47 }; | |
| 48 | |
| 49 } // namespace content | |
| 50 | |
| 51 #endif // CONTENT_RENDERER_PEPPER_PEPPER_IO_STREAM_HOST_H_ | |
| OLD | NEW |