| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // HACK: we need this #define in place before npapi.h is included for | 5 // HACK: we need this #define in place before npapi.h is included for |
| 6 // plugins to work. However, all sorts of headers include npapi.h, so | 6 // plugins to work. However, all sorts of headers include npapi.h, so |
| 7 // the only way to be certain the define is in place is to put it | 7 // the only way to be certain the define is in place is to put it |
| 8 // here. You might ask, "Why not set it in npapi.h directly, or in | 8 // here. You might ask, "Why not set it in npapi.h directly, or in |
| 9 // this directory's SConscript, then?" but it turns out this define | 9 // this directory's SConscript, then?" but it turns out this define |
| 10 // makes npapi.h include Xlib.h, which in turn defines a ton of symbols | 10 // makes npapi.h include Xlib.h, which in turn defines a ton of symbols |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 | 770 |
| 771 case NPNVSupportsXEmbedBool: | 771 case NPNVSupportsXEmbedBool: |
| 772 // Yes, we support XEmbed. | 772 // Yes, we support XEmbed. |
| 773 *reinterpret_cast<NPBool*>(value) = TRUE; | 773 *reinterpret_cast<NPBool*>(value) = TRUE; |
| 774 rv = NPERR_NO_ERROR; | 774 rv = NPERR_NO_ERROR; |
| 775 break; | 775 break; |
| 776 #endif | 776 #endif |
| 777 case NPNVSupportsWindowless: | 777 case NPNVSupportsWindowless: |
| 778 { | 778 { |
| 779 NPBool* supports_windowless = reinterpret_cast<NPBool*>(value); | 779 NPBool* supports_windowless = reinterpret_cast<NPBool*>(value); |
| 780 #if defined(OS_LINUX) | |
| 781 // TODO(deanm): Remove me once windowless plugins work on Linux. Right now | |
| 782 // it's better to tell the plugin we don't support windowless, then have it | |
| 783 // try and fail. | |
| 784 *supports_windowless = FALSE; | |
| 785 #else | |
| 786 *supports_windowless = TRUE; | 780 *supports_windowless = TRUE; |
| 787 #endif | |
| 788 rv = NPERR_NO_ERROR; | 781 rv = NPERR_NO_ERROR; |
| 789 break; | 782 break; |
| 790 } | 783 } |
| 791 case default_plugin::kMissingPluginStatusStart + | 784 case default_plugin::kMissingPluginStatusStart + |
| 792 default_plugin::MISSING_PLUGIN_AVAILABLE: | 785 default_plugin::MISSING_PLUGIN_AVAILABLE: |
| 793 // fall through | 786 // fall through |
| 794 case default_plugin::kMissingPluginStatusStart + | 787 case default_plugin::kMissingPluginStatusStart + |
| 795 default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD: | 788 default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD: |
| 796 { | 789 { |
| 797 // This is a hack for the default plugin to send notification to renderer. | 790 // This is a hack for the default plugin to send notification to renderer. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 void (*func)(void *), | 913 void (*func)(void *), |
| 921 void *userData) { | 914 void *userData) { |
| 922 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); | 915 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); |
| 923 if (plugin) { | 916 if (plugin) { |
| 924 plugin->PluginThreadAsyncCall(func, userData); | 917 plugin->PluginThreadAsyncCall(func, userData); |
| 925 } | 918 } |
| 926 } | 919 } |
| 927 | 920 |
| 928 } // extern "C" | 921 } // extern "C" |
| 929 | 922 |
| OLD | NEW |