| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_ | 5 #ifndef CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_ |
| 6 #define CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_ | 6 #define CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 | 22 |
| 23 // Implements the backend for shared memory messages from a plugin process. | 23 // Implements the backend for shared memory messages from a plugin process. |
| 24 class PepperSharedMemoryMessageFilter | 24 class PepperSharedMemoryMessageFilter |
| 25 : public ppapi::host::InstanceMessageFilter { | 25 : public ppapi::host::InstanceMessageFilter { |
| 26 public: | 26 public: |
| 27 explicit PepperSharedMemoryMessageFilter(content::RendererPpapiHost* host); | 27 explicit PepperSharedMemoryMessageFilter(content::RendererPpapiHost* host); |
| 28 virtual ~PepperSharedMemoryMessageFilter(); | 28 virtual ~PepperSharedMemoryMessageFilter(); |
| 29 | 29 |
| 30 // InstanceMessageFilter: | 30 // InstanceMessageFilter: |
| 31 virtual bool OnInstanceMessageReceived(const IPC::Message& msg) OVERRIDE; | 31 virtual bool OnInstanceMessageReceived(const IPC::Message& msg) override; |
| 32 | 32 |
| 33 bool Send(IPC::Message* msg); | 33 bool Send(IPC::Message* msg); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 // Message handlers. | 36 // Message handlers. |
| 37 void OnHostMsgCreateSharedMemory( | 37 void OnHostMsgCreateSharedMemory( |
| 38 PP_Instance instance, | 38 PP_Instance instance, |
| 39 uint32_t size, | 39 uint32_t size, |
| 40 int* host_shm_handle_id, | 40 int* host_shm_handle_id, |
| 41 ppapi::proxy::SerializedHandle* plugin_shm_handle); | 41 ppapi::proxy::SerializedHandle* plugin_shm_handle); |
| 42 | 42 |
| 43 content::RendererPpapiHost* host_; | 43 content::RendererPpapiHost* host_; |
| 44 | 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(PepperSharedMemoryMessageFilter); | 45 DISALLOW_COPY_AND_ASSIGN(PepperSharedMemoryMessageFilter); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 #endif // CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_ | 48 #endif // CHROME_RENDERER_PEPPER_PEPPER_SHARED_MEMORY_MESSAGE_FILTER_H_ |
| OLD | NEW |