diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-24 05:32:04 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-24 05:32:04 +0000 |
commit | a085aed793ce5577c7a0fca65e68447dd6d6f5ef (patch) | |
tree | a0799313b93fe269db084e68b229dddfcc9b5614 /ppapi/shared_impl | |
parent | f2202083f44fb378bc03e784c6a02e863e686b40 (diff) | |
download | chromium_src-a085aed793ce5577c7a0fca65e68447dd6d6f5ef.zip chromium_src-a085aed793ce5577c7a0fca65e68447dd6d6f5ef.tar.gz chromium_src-a085aed793ce5577c7a0fca65e68447dd6d6f5ef.tar.bz2 |
Convert the PPB_Flash interface to use the thunk system.
This was a bit tricky since some of the functions had no instance context, so I added global functions on the PpapiGlobals interface for them. It would be nice to add a PP_Instance argument and fix this in the future.
I did a new style of doing the thunking. The "function APIs" haven't really worked out since it's almost always easier to add the functions directly on the instance one. Since this is a larger and more separable chunk, I just added a getter on the instance API for the flash API and thunk through that. I'd like to convert the remaining ~3 function APIs to either call directly on the instance or use this method, but that's not addressed by this patch.
I moved the flash command line switch to plugin_switches so this could be hooked up properly. It allowed me to delete the delegate API for this.
I combined the flash fullscreen functions into the new Flash API which removed a bit of code.
Review URL: https://chromiumcodereview.appspot.com/10091003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133636 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r-- | ppapi/shared_impl/ppapi_globals.h | 8 | ||||
-rw-r--r-- | ppapi/shared_impl/test_globals.cc | 7 | ||||
-rw-r--r-- | ppapi/shared_impl/test_globals.h | 2 |
3 files changed, 17 insertions, 0 deletions
diff --git a/ppapi/shared_impl/ppapi_globals.h b/ppapi/shared_impl/ppapi_globals.h index d83e9c6..b1c3879 100644 --- a/ppapi/shared_impl/ppapi_globals.h +++ b/ppapi/shared_impl/ppapi_globals.h @@ -95,6 +95,14 @@ class PPAPI_SHARED_EXPORT PpapiGlobals { // failure. virtual PP_Module GetModuleForInstance(PP_Instance instance) = 0; + // Returns the command line for the process. + virtual std::string GetCmdLine() = 0; + + // Preloads the font on Windows, does nothing on other platforms. + // TODO(brettw) remove this by passing the instance into the API so we don't + // have to have it on the globals. + virtual void PreCacheFontForFlash(const void* logfontw) = 0; + virtual bool IsHostGlobals() const; virtual bool IsPluginGlobals() const; diff --git a/ppapi/shared_impl/test_globals.cc b/ppapi/shared_impl/test_globals.cc index 102dc11..9972d22 100644 --- a/ppapi/shared_impl/test_globals.cc +++ b/ppapi/shared_impl/test_globals.cc @@ -40,6 +40,13 @@ PP_Module TestGlobals::GetModuleForInstance(PP_Instance instance) { return 0; } +std::string TestGlobals::GetCmdLine() { + return std::string(); +} + +void TestGlobals::PreCacheFontForFlash(const void* /* logfontw */) { +} + base::Lock* TestGlobals::GetProxyLock() { return NULL; } diff --git a/ppapi/shared_impl/test_globals.h b/ppapi/shared_impl/test_globals.h index ae6f4b2..cf1be89 100644 --- a/ppapi/shared_impl/test_globals.h +++ b/ppapi/shared_impl/test_globals.h @@ -38,6 +38,8 @@ class TestGlobals : public PpapiGlobals { virtual FunctionGroupBase* GetFunctionAPI(PP_Instance inst, ApiID id) OVERRIDE; virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE; + virtual std::string GetCmdLine() OVERRIDE; + virtual void PreCacheFontForFlash(const void* logfontw) OVERRIDE; virtual base::Lock* GetProxyLock() OVERRIDE; virtual void LogWithSource(PP_Instance instance, PP_LogLevel_Dev level, |