Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: ppapi/proxy/plugin_globals.h

Issue 568793002: PPAPI: Fix GetBrowserInterface race conditions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/proxy/plugin_dispatcher.cc ('k') | ppapi/proxy/plugin_globals.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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; 104 // The embedder may choose to call ResetPluginProxyDelegate during shutdown.
105 } 105 // After that point, it's unsafe to call most members of PluginGlobals,
106 // and GetBrowserSender will return NULL.
107 void ResetPluginProxyDelegate();
106 108
107 // Returns the TLS slot that holds the message loop TLS. 109 // Returns the TLS slot that holds the message loop TLS.
108 // 110 //
109 // If we end up needing more TLS storage for more stuff, we should probably 111 // If we end up needing more TLS storage for more stuff, we should probably
110 // have a struct in here for the different items. 112 // have a struct in here for the different items.
111 base::ThreadLocalStorage::Slot* msg_loop_slot() { 113 base::ThreadLocalStorage::Slot* msg_loop_slot() {
112 return msg_loop_slot_.get(); 114 return msg_loop_slot_.get();
113 } 115 }
114 116
115 // Sets the message loop slot, takes ownership of the given heap-alloated 117 // Sets the message loop slot, takes ownership of the given heap-alloated
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // Member variables should appear before the WeakPtrFactory, see weak_ptr.h. 189 // Member variables should appear before the WeakPtrFactory, see weak_ptr.h.
188 base::WeakPtrFactory<PluginGlobals> weak_factory_; 190 base::WeakPtrFactory<PluginGlobals> weak_factory_;
189 191
190 DISALLOW_COPY_AND_ASSIGN(PluginGlobals); 192 DISALLOW_COPY_AND_ASSIGN(PluginGlobals);
191 }; 193 };
192 194
193 } // namespace proxy 195 } // namespace proxy
194 } // namespace ppapi 196 } // namespace ppapi
195 197
196 #endif // PPAPI_PROXY_PLUGIN_GLOBALS_H_ 198 #endif // PPAPI_PROXY_PLUGIN_GLOBALS_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_dispatcher.cc ('k') | ppapi/proxy/plugin_globals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698