OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PROXY_PLUGIN_GLOBALS_H_ | 5 #ifndef PPAPI_PROXY_PLUGIN_GLOBALS_H_ |
6 #define PPAPI_PROXY_PLUGIN_GLOBALS_H_ | 6 #define PPAPI_PROXY_PLUGIN_GLOBALS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 const Preferences& prefs); | 92 const Preferences& prefs); |
93 | 93 |
94 // Getters for the plugin-specific versions. | 94 // Getters for the plugin-specific versions. |
95 PluginResourceTracker* plugin_resource_tracker() { | 95 PluginResourceTracker* plugin_resource_tracker() { |
96 return &plugin_resource_tracker_; | 96 return &plugin_resource_tracker_; |
97 } | 97 } |
98 PluginVarTracker* plugin_var_tracker() { | 98 PluginVarTracker* plugin_var_tracker() { |
99 return &plugin_var_tracker_; | 99 return &plugin_var_tracker_; |
100 } | 100 } |
101 | 101 |
102 // The embedder should call SetPluginProxyDelegate during startup. | 102 // The embedder should call set_proxy_delegate during startup. |
103 void SetPluginProxyDelegate(PluginProxyDelegate* d); | 103 void set_plugin_proxy_delegate(PluginProxyDelegate* d) { |
| 104 plugin_proxy_delegate_ = d; |
| 105 } |
104 | 106 |
105 // Returns the TLS slot that holds the message loop TLS. | 107 // Returns the TLS slot that holds the message loop TLS. |
106 // | 108 // |
107 // If we end up needing more TLS storage for more stuff, we should probably | 109 // If we end up needing more TLS storage for more stuff, we should probably |
108 // have a struct in here for the different items. | 110 // have a struct in here for the different items. |
109 base::ThreadLocalStorage::Slot* msg_loop_slot() { | 111 base::ThreadLocalStorage::Slot* msg_loop_slot() { |
110 return msg_loop_slot_.get(); | 112 return msg_loop_slot_.get(); |
111 } | 113 } |
112 | 114 |
113 // Sets the message loop slot, takes ownership of the given heap-alloated | 115 // Sets the message loop slot, takes ownership of the given heap-alloated |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // Member variables should appear before the WeakPtrFactory, see weak_ptr.h. | 187 // Member variables should appear before the WeakPtrFactory, see weak_ptr.h. |
186 base::WeakPtrFactory<PluginGlobals> weak_factory_; | 188 base::WeakPtrFactory<PluginGlobals> weak_factory_; |
187 | 189 |
188 DISALLOW_COPY_AND_ASSIGN(PluginGlobals); | 190 DISALLOW_COPY_AND_ASSIGN(PluginGlobals); |
189 }; | 191 }; |
190 | 192 |
191 } // namespace proxy | 193 } // namespace proxy |
192 } // namespace ppapi | 194 } // namespace ppapi |
193 | 195 |
194 #endif // PPAPI_PROXY_PLUGIN_GLOBALS_H_ | 196 #endif // PPAPI_PROXY_PLUGIN_GLOBALS_H_ |
OLD | NEW |