| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 PPAPI_PPB_SURFACE_3D_PROXY_H_ | 5 #ifndef PPAPI_PPB_SURFACE_3D_PROXY_H_ |
| 6 #define PPAPI_PPB_SURFACE_3D_PROXY_H_ | 6 #define PPAPI_PPB_SURFACE_3D_PROXY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ppapi/c/dev/pp_graphics_3d_dev.h" | 10 #include "ppapi/c/dev/pp_graphics_3d_dev.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 PP_CompletionCallback current_flush_callback_; | 61 PP_CompletionCallback current_flush_callback_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(Surface3D); | 63 DISALLOW_COPY_AND_ASSIGN(Surface3D); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 class PPB_Surface3D_Proxy : public InterfaceProxy { | 66 class PPB_Surface3D_Proxy : public InterfaceProxy { |
| 67 public: | 67 public: |
| 68 PPB_Surface3D_Proxy(Dispatcher* dispatcher, const void* target_interface); | 68 PPB_Surface3D_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 69 virtual ~PPB_Surface3D_Proxy(); | 69 virtual ~PPB_Surface3D_Proxy(); |
| 70 | 70 |
| 71 static const Info* GetInfo(); |
| 72 |
| 71 const PPB_Surface3D_Dev* ppb_surface_3d_target() const { | 73 const PPB_Surface3D_Dev* ppb_surface_3d_target() const { |
| 72 return reinterpret_cast<const PPB_Surface3D_Dev*>(target_interface()); | 74 return reinterpret_cast<const PPB_Surface3D_Dev*>(target_interface()); |
| 73 } | 75 } |
| 74 | 76 |
| 75 // InterfaceProxy implementation. | 77 // InterfaceProxy implementation. |
| 76 virtual const void* GetSourceInterface() const; | |
| 77 virtual InterfaceID GetInterfaceId() const; | |
| 78 virtual bool OnMessageReceived(const IPC::Message& msg); | 78 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 // Message handlers. | 81 // Message handlers. |
| 82 void OnMsgCreate(PP_Instance instance, | 82 void OnMsgCreate(PP_Instance instance, |
| 83 PP_Config3D_Dev config, | 83 PP_Config3D_Dev config, |
| 84 std::vector<int32_t> attribs, | 84 std::vector<int32_t> attribs, |
| 85 HostResource* result); | 85 HostResource* result); |
| 86 void OnMsgSwapBuffers(const HostResource& surface); | 86 void OnMsgSwapBuffers(const HostResource& surface); |
| 87 // Renderer->plugin message handlers. | 87 // Renderer->plugin message handlers. |
| 88 void OnMsgSwapBuffersACK(const HostResource& surface, int32_t pp_error); | 88 void OnMsgSwapBuffersACK(const HostResource& surface, int32_t pp_error); |
| 89 | 89 |
| 90 void SendSwapBuffersACKToPlugin(int32_t result, | 90 void SendSwapBuffersACKToPlugin(int32_t result, |
| 91 const HostResource& surface_3d); | 91 const HostResource& surface_3d); |
| 92 | 92 |
| 93 CompletionCallbackFactory<PPB_Surface3D_Proxy, | 93 CompletionCallbackFactory<PPB_Surface3D_Proxy, |
| 94 ProxyNonThreadSafeRefCount> callback_factory_; | 94 ProxyNonThreadSafeRefCount> callback_factory_; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace proxy | 97 } // namespace proxy |
| 98 } // namespace pp | 98 } // namespace pp |
| 99 | 99 |
| 100 #endif // PPAPI_PPB_SURFACE_3D_PROXY_H_ | 100 #endif // PPAPI_PPB_SURFACE_3D_PROXY_H_ |
| OLD | NEW |