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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/trusted/plugin/plugin.cc » ('j') | src/trusted/plugin/plugin.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Native Client Authors. All rights reserved. 2 * Copyright 2008 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 */ 5 */
6 6
7 7
8 #include "native_client/src/trusted/plugin/npapi/plugin_npapi.h" 8 #include "native_client/src/trusted/plugin/npapi/plugin_npapi.h"
9 9
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 // SetWindow is called by the browser as part of the NPAPI interface for 165 // SetWindow is called by the browser as part of the NPAPI interface for
166 // setting up a plugin that has the ability to draw into a window. It is 166 // setting up a plugin that has the ability to draw into a window. It is
167 // passed a semi-custom window descriptor (some is platform-neutral, some not) 167 // passed a semi-custom window descriptor (some is platform-neutral, some not)
168 // as documented in the NPAPI documentation. 168 // as documented in the NPAPI documentation.
169 NPError PluginNpapi::SetWindow(NPWindow* window) { 169 NPError PluginNpapi::SetWindow(NPWindow* window) {
170 NPError ret = NPERR_GENERIC_ERROR; 170 NPError ret = NPERR_GENERIC_ERROR;
171 PLUGIN_PRINTF(("PluginNpapi::SetWindow(%p, %p)\n", static_cast<void* >(this), 171 PLUGIN_PRINTF(("PluginNpapi::SetWindow(%p, %p)\n", static_cast<void* >(this),
172 static_cast<void*>(window))); 172 static_cast<void*>(window)));
173
174 // NOTE(gregoryd): Chrome does not allow us to call NPN_GetUrl during
175 // initialization, but does call SetWindows afterwards, so we use this call
176 // 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
177 #if !defined(NACL_STANDALONE)
178 // If the <embed src='...'> attr was defined, the browser would have
179 // implicitly called GET on it, which calls Load() and set_logical_url().
180 // In the absence of this attr, we use the "nexes" attribute if present.
181 if (logical_url() == NULL) {
182 const char* nexes_attr = LookupArgument("nexes");
183 if (nexes_attr != NULL) {
184 SetNexesPropertyImpl(nexes_attr);
185 }
186 }
187 #endif
173 if (NULL == module_) { 188 if (NULL == module_) {
174 if (video() && video()->SetWindow(window)) { 189 if (video() && video()->SetWindow(window)) {
175 ret = NPERR_NO_ERROR; 190 ret = NPERR_NO_ERROR;
176 } 191 }
177 return ret; 192 return ret;
178 } else { 193 } else {
179 // Send NPP_SetWindow to NPModule. 194 // Send NPP_SetWindow to NPModule.
180 NPP npp = InstanceIdentifierToNPP(instance_id()); 195 NPP npp = InstanceIdentifierToNPP(instance_id());
181 return module_->SetWindow(npp, window); 196 return module_->SetWindow(npp, window);
182 } 197 }
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 // It would be nice if the thread interface did not require us to 553 // It would be nice if the thread interface did not require us to
539 // specify a stack size. This is fairly arbitrary. 554 // specify a stack size. This is fairly arbitrary.
540 size_t stack_size = 128 << 10; 555 size_t stack_size = 128 << 10;
541 NaClThreadCreateJoinable(&plugin->receive_thread_, AsyncReceiveThread, args, 556 NaClThreadCreateJoinable(&plugin->receive_thread_, AsyncReceiveThread, args,
542 stack_size); 557 stack_size);
543 plugin->receive_thread_running_ = true; 558 plugin->receive_thread_running_ = true;
544 return true; 559 return true;
545 } 560 }
546 561
547 } // namespace plugin 562 } // namespace plugin
OLDNEW
« 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