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

Unified Diff: src/trusted/plugin/npapi/plugin_npapi.cc

Issue 3145013: Fix multi-arch support for Chrome: start downloading the nexe when SetWindow ... (Closed) Base URL: http://nativeclient.googlecode.com/svn/trunk/src/native_client/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/trusted/plugin/plugin.cc » ('j') | src/trusted/plugin/plugin.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/plugin/npapi/plugin_npapi.cc
===================================================================
--- src/trusted/plugin/npapi/plugin_npapi.cc (revision 2995)
+++ src/trusted/plugin/npapi/plugin_npapi.cc (working copy)
@@ -170,6 +170,21 @@
NPError ret = NPERR_GENERIC_ERROR;
PLUGIN_PRINTF(("PluginNpapi::SetWindow(%p, %p)\n", static_cast<void* >(this),
static_cast<void*>(window)));
+
+// NOTE(gregoryd): Chrome does not allow us to call NPN_GetUrl during
+// initialization, but does call SetWindows afterwards, so we use this call
+// to trigger the download if the src property hasn't been specified.
Mark Seaborn 2010/08/16 15:13:59 Can you link to the Chromium bug here?
gregoryd 2010/08/16 18:41:09 There is no Chromium bug. I spoke to Brett Wilson
+#if !defined(NACL_STANDALONE)
+ // If the <embed src='...'> attr was defined, the browser would have
+ // implicitly called GET on it, which calls Load() and set_logical_url().
+ // In the absence of this attr, we use the "nexes" attribute if present.
+ if (logical_url() == NULL) {
+ const char* nexes_attr = LookupArgument("nexes");
+ if (nexes_attr != NULL) {
+ SetNexesPropertyImpl(nexes_attr);
+ }
+ }
+#endif
if (NULL == module_) {
if (video() && video()->SetWindow(window)) {
ret = NPERR_NO_ERROR;
« no previous file with comments | « no previous file | src/trusted/plugin/plugin.cc » ('j') | src/trusted/plugin/plugin.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698