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

Side by Side Diff: plugin/npapi_host_control/win/np_plugin_proxy.cc

Issue 210005: Rewrote full-screen support on Windows. O3D now always creates its own... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 3 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 | « plugin/npapi_host_control/win/np_plugin_proxy.h ('k') | plugin/win/main_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 279 }
280 ATLASSERT(np_object); 280 ATLASSERT(np_object);
281 281
282 scriptable_object_ = browser_proxy_->GetDispatchObject(np_object); 282 scriptable_object_ = browser_proxy_->GetDispatchObject(np_object);
283 283
284 NPBrowserProxy::GetBrowserFunctions()->releaseobject(np_object); 284 NPBrowserProxy::GetBrowserFunctions()->releaseobject(np_object);
285 285
286 return true; 286 return true;
287 } 287 }
288 288
289 bool NPPluginProxy::SetWindow(const NPWindow& window) {
290 if (plugin_funcs_.setwindow != NULL &&
291 NPERR_NO_ERROR != plugin_funcs_.setwindow(
292 GetNPP(),
293 const_cast<NPWindow*>(&window))) {
294 plugin_funcs_.destroy(GetNPP(), NULL);
295 NP_Shutdown_();
296 ATLASSERT(false && "Unknown failure re-setting plugin window.");
297 return false;
298 }
299 return true;
300 }
301
289 void NPPluginProxy::TearDown() { 302 void NPPluginProxy::TearDown() {
290 // Block until all stream operations requested by this plug-in have 303 // Block until all stream operations requested by this plug-in have
291 // completed. 304 // completed.
292 HRESULT hr; 305 HRESULT hr;
293 std::vector<HANDLE> stream_handles; 306 std::vector<HANDLE> stream_handles;
294 for (StreamOpArray::size_type x = 0; x < active_stream_ops_.size(); ++x) { 307 for (StreamOpArray::size_type x = 0; x < active_stream_ops_.size(); ++x) {
295 // Request that the stream finish early - so that large file transfers do 308 // Request that the stream finish early - so that large file transfers do
296 // not block leaving the page. 309 // not block leaving the page.
297 hr = active_stream_ops_[x]->RequestCancellation(); 310 hr = active_stream_ops_[x]->RequestCancellation();
298 ATLASSERT(SUCCEEDED(hr) && 311 ATLASSERT(SUCCEEDED(hr) &&
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 // Load and initialize the plug-in with the current window settings. 436 // Load and initialize the plug-in with the current window settings.
424 scoped_ptr<NPPluginProxy> plugin_proxy(new NPPluginProxy); 437 scoped_ptr<NPPluginProxy> plugin_proxy(new NPPluginProxy);
425 if (!plugin_proxy->MapEntryPoints(np_plugin)) { 438 if (!plugin_proxy->MapEntryPoints(np_plugin)) {
426 FreeLibrary(np_plugin); 439 FreeLibrary(np_plugin);
427 return E_FAIL; 440 return E_FAIL;
428 } 441 }
429 442
430 *proxy_instance = plugin_proxy.release(); 443 *proxy_instance = plugin_proxy.release();
431 return S_OK; 444 return S_OK;
432 } 445 }
OLDNEW
« no previous file with comments | « plugin/npapi_host_control/win/np_plugin_proxy.h ('k') | plugin/win/main_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698