diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-09 23:14:13 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-09 23:14:13 +0000 |
commit | 2bbd2c670008e30aaaef6c3c25ae37e0c17f8c3f (patch) | |
tree | 79595eeb026dd29841a7380fd7753f992c2e466b /ppapi/shared_impl/url_util_impl.h | |
parent | 32131b9030d8313f7adc9b765f706ffbee7ca709 (diff) | |
download | chromium_src-2bbd2c670008e30aaaef6c3c25ae37e0c17f8c3f.zip chromium_src-2bbd2c670008e30aaaef6c3c25ae37e0c17f8c3f.tar.gz chromium_src-2bbd2c670008e30aaaef6c3c25ae37e0c17f8c3f.tar.bz2 |
Unify var tracking between webkit and the proxy.
This replaces the var tracking in the proxy with the var tracking in the
shared_impl that's used by the implementation. It adds a new ProxyObjectVar
to be the proxied plugin analog of NPObjectVar in the impl. This new object
just keeps track of the host data.
The tricky part is to make the var tracker able to do all the crazy messaging.
This adds some virtual functions to the shared var tracker that we override
in the plugin in PluginVarTracker.
This removes the calls to the GetLiveObjectsForInstance in the var deprecated
test. It turns out this function really can't be implemented properly in the
proxy, and I don't know why it even worked before. A Release() call posts a
non-nestable task so the object isn't released until later. So to implement
the proxy for GetLiveObjectsForInstance we would also need to post a
non-nestable task. But when the test runs we're getting called from within
the plugin, so blocking on a non-nestable task deadlocks. So I just gave up
and deleted the parts of the test that uses it.
TEST=included
BUG=none
Review URL: http://codereview.chromium.org/7578001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96094 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl/url_util_impl.h')
-rw-r--r-- | ppapi/shared_impl/url_util_impl.h | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/ppapi/shared_impl/url_util_impl.h b/ppapi/shared_impl/url_util_impl.h index 008f317..55d6c63 100644 --- a/ppapi/shared_impl/url_util_impl.h +++ b/ppapi/shared_impl/url_util_impl.h @@ -21,41 +21,19 @@ namespace ppapi { // and the renderer. class URLUtilImpl { public: - // The functions here would normally take the var interface for constructing - // return strings. However, at the current time there's some mixup between - // using Var and VarDeprecated. To resolve this, we instead pass the pointer - // to the string creation function so can be used independently of this. - typedef PP_Var (*VarFromUtf8)(PP_Module, const char*, uint32_t); - - // Function that converts the given var to a std::string or NULL if the - // var is not a string or is invalid. - // - // We could use PPB_Var for this, but that interface requires an additional - // string conversion. Both the proxy and the host side maintain the strings - // in a std::string, and the form we want for passing to GURL is also a - // std::string. Parameterizing this separately saves this, and also solves - // the same problem that VarFromUtf8 does. - typedef const std::string* (*StringFromVar)(PP_Var var); - // PPB_URLUtil shared functions. - static PP_Var Canonicalize(StringFromVar string_from_var, - VarFromUtf8 var_from_utf8, - PP_Module pp_module, + static PP_Var Canonicalize(PP_Module pp_module, PP_Var url, PP_URLComponents_Dev* components); - static PP_Var ResolveRelativeToURL(StringFromVar string_from_var, - VarFromUtf8 var_from_utf8, - PP_Module pp_module, + static PP_Var ResolveRelativeToURL(PP_Module pp_module, PP_Var base_url, PP_Var relative, PP_URLComponents_Dev* components); - static PP_Bool IsSameSecurityOrigin(StringFromVar string_from_var, - PP_Var url_a, PP_Var url_b); + static PP_Bool IsSameSecurityOrigin(PP_Var url_a, PP_Var url_b); // Used for returning the given GURL from a PPAPI function, with an optional // out param indicating the components. - static PP_Var GenerateURLReturn(VarFromUtf8 var_from_utf8, - PP_Module pp_module, + static PP_Var GenerateURLReturn(PP_Module pp_module, const GURL& url, PP_URLComponents_Dev* components); }; |