| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 PPAPI_CONTENT_RENDERER_PEPPER_HOST_RESOURCE_VAR_H_ | 5 #ifndef PPAPI_CONTENT_RENDERER_PEPPER_HOST_RESOURCE_VAR_H_ |
| 6 #define PPAPI_CONTENT_RENDERER_PEPPER_HOST_RESOURCE_VAR_H_ | 6 #define PPAPI_CONTENT_RENDERER_PEPPER_HOST_RESOURCE_VAR_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ipc/ipc_message.h" | 9 #include "ipc/ipc_message.h" |
| 10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 HostResourceVar(int pending_renderer_host_id, | 31 HostResourceVar(int pending_renderer_host_id, |
| 32 const IPC::Message& creation_message); | 32 const IPC::Message& creation_message); |
| 33 | 33 |
| 34 // ResourceVar override. | 34 // ResourceVar override. |
| 35 virtual PP_Resource GetPPResource() const OVERRIDE; | 35 virtual PP_Resource GetPPResource() const OVERRIDE; |
| 36 virtual int GetPendingRendererHostId() const OVERRIDE; | 36 virtual int GetPendingRendererHostId() const OVERRIDE; |
| 37 virtual int GetPendingBrowserHostId() const OVERRIDE; | 37 virtual int GetPendingBrowserHostId() const OVERRIDE; |
| 38 virtual const IPC::Message* GetCreationMessage() const OVERRIDE; | 38 virtual const IPC::Message* GetCreationMessage() const OVERRIDE; |
| 39 virtual bool IsPending() const OVERRIDE; | 39 virtual bool IsPending() const OVERRIDE; |
| 40 | 40 |
| 41 void set_pending_browser_host_id(int id) { | 41 void set_pending_browser_host_id(int id) { pending_browser_host_id_ = id; } |
| 42 pending_browser_host_id_ = id; | |
| 43 } | |
| 44 | 42 |
| 45 protected: | 43 protected: |
| 46 virtual ~HostResourceVar(); | 44 virtual ~HostResourceVar(); |
| 47 | 45 |
| 48 private: | 46 private: |
| 49 // Real resource ID in the plugin. 0 if one has not yet been created | 47 // Real resource ID in the plugin. 0 if one has not yet been created |
| 50 // (indicating that there is a pending resource host). | 48 // (indicating that there is a pending resource host). |
| 51 PP_Resource pp_resource_; | 49 PP_Resource pp_resource_; |
| 52 | 50 |
| 53 // Pending resource host ID in the renderer. | 51 // Pending resource host ID in the renderer. |
| 54 int pending_renderer_host_id_; | 52 int pending_renderer_host_id_; |
| 55 | 53 |
| 56 // Pending resource host ID in the browser. | 54 // Pending resource host ID in the browser. |
| 57 int pending_browser_host_id_; | 55 int pending_browser_host_id_; |
| 58 | 56 |
| 59 // If the plugin-side resource has not yet been created, carries a message to | 57 // If the plugin-side resource has not yet been created, carries a message to |
| 60 // create a resource of the specific type on the plugin side. Otherwise, NULL. | 58 // create a resource of the specific type on the plugin side. Otherwise, NULL. |
| 61 scoped_ptr<IPC::Message> creation_message_; | 59 scoped_ptr<IPC::Message> creation_message_; |
| 62 | 60 |
| 63 DISALLOW_COPY_AND_ASSIGN(HostResourceVar); | 61 DISALLOW_COPY_AND_ASSIGN(HostResourceVar); |
| 64 }; | 62 }; |
| 65 | 63 |
| 66 } // namespace content | 64 } // namespace content |
| 67 | 65 |
| 68 #endif | 66 #endif |
| OLD | NEW |