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

Side by Side Diff: ppapi/shared_impl/ppapi_globals.h

Issue 25328002: PPAPI: Remove instance param from GetFileTaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/plugin_globals.cc ('k') | ppapi/shared_impl/test_globals.h » ('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_SHARED_IMPL_PPAPI_GLOBALS_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_
6 #define PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ 6 #define PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void ResetMainThreadMessageLoopForTesting(); 108 void ResetMainThreadMessageLoopForTesting();
109 109
110 // Return the MessageLoopShared of the current thread, if any. This will 110 // Return the MessageLoopShared of the current thread, if any. This will
111 // always return NULL on the host side, where PPB_MessageLoop is not 111 // always return NULL on the host side, where PPB_MessageLoop is not
112 // supported. 112 // supported.
113 virtual MessageLoopShared* GetCurrentMessageLoop() = 0; 113 virtual MessageLoopShared* GetCurrentMessageLoop() = 0;
114 114
115 // Returns a task runner for file operations that may block. 115 // Returns a task runner for file operations that may block.
116 // TODO(bbudge) Move this to PluginGlobals when we no longer support 116 // TODO(bbudge) Move this to PluginGlobals when we no longer support
117 // in-process plugins. 117 // in-process plugins.
118 virtual base::TaskRunner* GetFileTaskRunner(PP_Instance instance) = 0; 118 virtual base::TaskRunner* GetFileTaskRunner() = 0;
119 119
120 // Returns the command line for the process. 120 // Returns the command line for the process.
121 virtual std::string GetCmdLine() = 0; 121 virtual std::string GetCmdLine() = 0;
122 122
123 // Preloads the font on Windows, does nothing on other platforms. 123 // Preloads the font on Windows, does nothing on other platforms.
124 // TODO(brettw) remove this by passing the instance into the API so we don't 124 // TODO(brettw) remove this by passing the instance into the API so we don't
125 // have to have it on the globals. 125 // have to have it on the globals.
126 virtual void PreCacheFontForFlash(const void* logfontw) = 0; 126 virtual void PreCacheFontForFlash(const void* logfontw) = 0;
127 127
128 virtual bool IsHostGlobals() const; 128 virtual bool IsHostGlobals() const;
129 virtual bool IsPluginGlobals() const; 129 virtual bool IsPluginGlobals() const;
130 130
131 private: 131 private:
132 // Return the thread-local pointer which is used only for unit testing. It 132 // Return the thread-local pointer which is used only for unit testing. It
133 // should always be NULL when running in production. It allows separate 133 // should always be NULL when running in production. It allows separate
134 // threads to have distinct "globals". 134 // threads to have distinct "globals".
135 static PpapiGlobals* GetThreadLocalPointer(); 135 static PpapiGlobals* GetThreadLocalPointer();
136 136
137 scoped_refptr<base::MessageLoopProxy> main_loop_proxy_; 137 scoped_refptr<base::MessageLoopProxy> main_loop_proxy_;
138 138
139 DISALLOW_COPY_AND_ASSIGN(PpapiGlobals); 139 DISALLOW_COPY_AND_ASSIGN(PpapiGlobals);
140 }; 140 };
141 141
142 } // namespace ppapi 142 } // namespace ppapi
143 143
144 #endif // PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ 144 #endif // PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_globals.cc ('k') | ppapi/shared_impl/test_globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698