OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 5 #ifndef CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
6 #define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 6 #define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 void SavePluginName(const FilePath& path); | 68 void SavePluginName(const FilePath& path); |
69 | 69 |
70 // True if running in a broker process rather than a normal plugin process. | 70 // True if running in a broker process rather than a normal plugin process. |
71 bool is_broker_; | 71 bool is_broker_; |
72 | 72 |
73 base::ScopedNativeLibrary library_; | 73 base::ScopedNativeLibrary library_; |
74 | 74 |
75 // Global state tracking for the proxy. | 75 // Global state tracking for the proxy. |
76 ppapi::proxy::PluginGlobals plugin_globals_; | 76 ppapi::proxy::PluginGlobals plugin_globals_; |
77 | 77 |
78 ppapi::proxy::Dispatcher::GetInterfaceFunc get_plugin_interface_; | 78 PP_GetInterface_Func get_plugin_interface_; |
79 | 79 |
80 // Callback to call when a new instance connects to the broker. | 80 // Callback to call when a new instance connects to the broker. |
81 // Used only when is_broker_. | 81 // Used only when is_broker_. |
82 PP_ConnectInstance_Func connect_instance_func_; | 82 PP_ConnectInstance_Func connect_instance_func_; |
83 | 83 |
84 // Local concept of the module ID. Some functions take this. It's necessary | 84 // Local concept of the module ID. Some functions take this. It's necessary |
85 // for the in-process PPAPI to handle this properly, but for proxied it's | 85 // for the in-process PPAPI to handle this properly, but for proxied it's |
86 // unnecessary. The proxy talking to multiple renderers means that each | 86 // unnecessary. The proxy talking to multiple renderers means that each |
87 // renderer has a different idea of what the module ID is for this plugin. | 87 // renderer has a different idea of what the module ID is for this plugin. |
88 // To force people to "do the right thing" we generate a random module ID | 88 // To force people to "do the right thing" we generate a random module ID |
89 // and pass it around as necessary. | 89 // and pass it around as necessary. |
90 PP_Module local_pp_module_; | 90 PP_Module local_pp_module_; |
91 | 91 |
92 // See Dispatcher::Delegate::GetGloballySeenInstanceIDSet. | 92 // See Dispatcher::Delegate::GetGloballySeenInstanceIDSet. |
93 std::set<PP_Instance> globally_seen_instance_ids_; | 93 std::set<PP_Instance> globally_seen_instance_ids_; |
94 | 94 |
95 // The PluginDispatcher instances contained in the map are not owned by it. | 95 // The PluginDispatcher instances contained in the map are not owned by it. |
96 std::map<uint32, ppapi::proxy::PluginDispatcher*> plugin_dispatchers_; | 96 std::map<uint32, ppapi::proxy::PluginDispatcher*> plugin_dispatchers_; |
97 uint32 next_plugin_dispatcher_id_; | 97 uint32 next_plugin_dispatcher_id_; |
98 | 98 |
99 // The WebKitPlatformSupport implementation. | 99 // The WebKitPlatformSupport implementation. |
100 scoped_ptr<PpapiWebKitPlatformSupportImpl> webkit_platform_support_; | 100 scoped_ptr<PpapiWebKitPlatformSupportImpl> webkit_platform_support_; |
101 | 101 |
102 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); | 102 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); |
103 }; | 103 }; |
104 | 104 |
105 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 105 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
OLD | NEW |