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

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

Issue 12378050: PPAPI: Remove threading options; it's always on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PDFResource unit test Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/pdf_resource_unittest.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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // long as the plugin. 107 // long as the plugin.
108 MessageLoopResource* loop_for_main_thread(); 108 MessageLoopResource* loop_for_main_thread();
109 109
110 // The embedder should call this function when the name of the plugin module 110 // The embedder should call this function when the name of the plugin module
111 // is known. This will be used for error logging. 111 // is known. This will be used for error logging.
112 void set_plugin_name(const std::string& name) { plugin_name_ = name; } 112 void set_plugin_name(const std::string& name) { plugin_name_ = name; }
113 113
114 // The embedder should call this function when the command line is known. 114 // The embedder should call this function when the command line is known.
115 void set_command_line(const std::string& c) { command_line_ = c; } 115 void set_command_line(const std::string& c) { command_line_ = c; }
116 116
117 // Sets whether threadsafety is supported. Defaults to whether the
118 // ENABLE_PEPPER_THREADING build flag is set.
119 void set_enable_threading(bool enable) { enable_threading_ = enable; }
120
121 private: 117 private:
122 class BrowserSender; 118 class BrowserSender;
123 119
124 // PpapiGlobals overrides. 120 // PpapiGlobals overrides.
125 virtual bool IsPluginGlobals() const OVERRIDE; 121 virtual bool IsPluginGlobals() const OVERRIDE;
126 122
127 static PluginGlobals* plugin_globals_; 123 static PluginGlobals* plugin_globals_;
128 124
129 PluginProxyDelegate* plugin_proxy_delegate_; 125 PluginProxyDelegate* plugin_proxy_delegate_;
130 PluginResourceTracker plugin_resource_tracker_; 126 PluginResourceTracker plugin_resource_tracker_;
131 PluginVarTracker plugin_var_tracker_; 127 PluginVarTracker plugin_var_tracker_;
132 scoped_refptr<CallbackTracker> callback_tracker_; 128 scoped_refptr<CallbackTracker> callback_tracker_;
133 129
134 bool enable_threading_; // Indicates whether we'll use the lock.
135 base::Lock proxy_lock_; 130 base::Lock proxy_lock_;
136 131
137 scoped_ptr<base::ThreadLocalStorage::Slot> msg_loop_slot_; 132 scoped_ptr<base::ThreadLocalStorage::Slot> msg_loop_slot_;
138 // Note that loop_for_main_thread's constructor sets msg_loop_slot_, so it 133 // Note that loop_for_main_thread's constructor sets msg_loop_slot_, so it
139 // must be initialized after msg_loop_slot_ (hence the order here). 134 // must be initialized after msg_loop_slot_ (hence the order here).
140 scoped_refptr<MessageLoopResource> loop_for_main_thread_; 135 scoped_refptr<MessageLoopResource> loop_for_main_thread_;
141 136
142 // Name of the plugin used for error logging. This will be empty until 137 // Name of the plugin used for error logging. This will be empty until
143 // set_plugin_name is called. 138 // set_plugin_name is called.
144 std::string plugin_name_; 139 std::string plugin_name_;
145 140
146 // Command line for the plugin. This will be empty until set_command_line is 141 // Command line for the plugin. This will be empty until set_command_line is
147 // called. 142 // called.
148 std::string command_line_; 143 std::string command_line_;
149 144
150 scoped_ptr<BrowserSender> browser_sender_; 145 scoped_ptr<BrowserSender> browser_sender_;
151 146
152 DISALLOW_COPY_AND_ASSIGN(PluginGlobals); 147 DISALLOW_COPY_AND_ASSIGN(PluginGlobals);
153 }; 148 };
154 149
155 } // namespace proxy 150 } // namespace proxy
156 } // namespace ppapi 151 } // namespace ppapi
157 152
158 #endif // PPAPI_PROXY_PLUGIN_GLOBALS_H_ 153 #endif // PPAPI_PROXY_PLUGIN_GLOBALS_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/pdf_resource_unittest.cc ('k') | ppapi/proxy/plugin_globals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698