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 set_proxy_delegate during startup. | 102 // The embedder should call SetPluginProxyDelegate during startup. |
103 void set_plugin_proxy_delegate(PluginProxyDelegate* d) { | 103 void SetPluginProxyDelegate(PluginProxyDelegate* d); |
104 plugin_proxy_delegate_ = d; | |
105 } | |
106 | 104 |
107 // Returns the TLS slot that holds the message loop TLS. | 105 // Returns the TLS slot that holds the message loop TLS. |
108 // | 106 // |
109 // If we end up needing more TLS storage for more stuff, we should probably | 107 // If we end up needing more TLS storage for more stuff, we should probably |
110 // have a struct in here for the different items. | 108 // have a struct in here for the different items. |
111 base::ThreadLocalStorage::Slot* msg_loop_slot() { | 109 base::ThreadLocalStorage::Slot* msg_loop_slot() { |
112 return msg_loop_slot_.get(); | 110 return msg_loop_slot_.get(); |
113 } | 111 } |
114 | 112 |
115 // Sets the message loop slot, takes ownership of the given heap-alloated | 113 // 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... |
187 // Member variables should appear before the WeakPtrFactory, see weak_ptr.h. | 185 // Member variables should appear before the WeakPtrFactory, see weak_ptr.h. |
188 base::WeakPtrFactory<PluginGlobals> weak_factory_; | 186 base::WeakPtrFactory<PluginGlobals> weak_factory_; |
189 | 187 |
190 DISALLOW_COPY_AND_ASSIGN(PluginGlobals); | 188 DISALLOW_COPY_AND_ASSIGN(PluginGlobals); |
191 }; | 189 }; |
192 | 190 |
193 } // namespace proxy | 191 } // namespace proxy |
194 } // namespace ppapi | 192 } // namespace ppapi |
195 | 193 |
196 #endif // PPAPI_PROXY_PLUGIN_GLOBALS_H_ | 194 #endif // PPAPI_PROXY_PLUGIN_GLOBALS_H_ |
OLD | NEW |