Chromium Code Reviews| Index: ppapi/proxy/plugin_dispatcher.h |
| diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h |
| index a6cc72048fa62992407a4720aa26ad5f97e65c20..9d514c47363d095bb325c950ccb02d406ee44734 100644 |
| --- a/ppapi/proxy/plugin_dispatcher.h |
| +++ b/ppapi/proxy/plugin_dispatcher.h |
| @@ -10,6 +10,7 @@ |
| #include "base/basictypes.h" |
| #include "base/hash_tables.h" |
| +#include "base/memory/linked_ptr.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/process.h" |
| @@ -51,11 +52,10 @@ struct InstanceData { |
| // When non-NULL, indicates the callback to execute when mouse lock is lost. |
| scoped_refptr<TrackedCallback> mouse_lock_callback; |
| - // The following are lazily created the first time the plugin requests them. |
| - // (These are singleton-style resources). |
| - scoped_refptr<GamepadResource> gamepad_resource; |
| - scoped_refptr<FlashResource> flash_resource; |
| - scoped_refptr<FlashClipboardResource> flash_clipboard_resource; |
| + // A map of singleton resources which are lazily created. |
| + typedef std::map<SingletonResourceID, linked_ptr<Resource> > |
|
yzshen1
2012/11/20 21:47:25
Resource itself is a ref-counted object. You shoul
raymes
2012/11/20 23:30:23
Done.
|
| + SingletonResourceMap; |
|
yzshen1
2012/11/20 21:47:25
4 space indent.
raymes
2012/11/20 23:30:23
Done.
|
| + SingletonResourceMap singleton_resources; |
| // Calls to |RequestSurroundingText()| are done by posted tasks. Track whether |
| // a) a task is pending, to avoid redundant calls, and b) whether we should |