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 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "webkit/glue/plugins/plugin_host.h" | 7 #include "webkit/glue/plugins/plugin_host.h" |
8 | 8 |
9 #if defined(OS_LINUX) | |
10 #include <gdk/gdk.h> | |
11 #include <gdk/gdkx.h> | |
12 #endif | |
13 | |
9 #include "base/file_util.h" | 14 #include "base/file_util.h" |
10 #include "base/logging.h" | 15 #include "base/logging.h" |
11 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" |
12 #include "base/string_piece.h" | 17 #include "base/string_piece.h" |
13 #include "base/string_util.h" | 18 #include "base/string_util.h" |
14 #include "base/sys_string_conversions.h" | 19 #include "base/sys_string_conversions.h" |
15 #include "net/base/net_util.h" | 20 #include "net/base/net_util.h" |
16 #include "webkit/default_plugin/default_plugin_shared.h" | 21 #include "webkit/default_plugin/default_plugin_shared.h" |
17 #include "webkit/glue/glue_util.h" | 22 #include "webkit/glue/glue_util.h" |
18 #include "webkit/glue/webplugininfo.h" | 23 #include "webkit/glue/webplugininfo.h" |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
744 // Tell them we are GTK2. (The alternative is GTK 1.2.) | 749 // Tell them we are GTK2. (The alternative is GTK 1.2.) |
745 *reinterpret_cast<int*>(value) = NPNVGtk2; | 750 *reinterpret_cast<int*>(value) = NPNVGtk2; |
746 rv = NPERR_NO_ERROR; | 751 rv = NPERR_NO_ERROR; |
747 break; | 752 break; |
748 | 753 |
749 case NPNVSupportsXEmbedBool: | 754 case NPNVSupportsXEmbedBool: |
750 // Yes, we support XEmbed. | 755 // Yes, we support XEmbed. |
751 *reinterpret_cast<NPBool*>(value) = TRUE; | 756 *reinterpret_cast<NPBool*>(value) = TRUE; |
752 rv = NPERR_NO_ERROR; | 757 rv = NPERR_NO_ERROR; |
753 break; | 758 break; |
759 case NPNVxDisplay: | |
760 *static_cast<Display **>(value) = GDK_DISPLAY(); | |
Evan Martin
2009/07/15 16:49:53
Does this help the NULL-display case?
| |
761 break; | |
754 #endif | 762 #endif |
755 case NPNVSupportsWindowless: | 763 case NPNVSupportsWindowless: |
756 { | 764 { |
757 NPBool* supports_windowless = reinterpret_cast<NPBool*>(value); | 765 NPBool* supports_windowless = reinterpret_cast<NPBool*>(value); |
758 *supports_windowless = TRUE; | 766 *supports_windowless = TRUE; |
759 rv = NPERR_NO_ERROR; | 767 rv = NPERR_NO_ERROR; |
760 break; | 768 break; |
761 } | 769 } |
762 case NPNVprivateModeBool: | 770 case NPNVprivateModeBool: |
763 { | 771 { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
898 void NPN_PluginThreadAsyncCall(NPP id, | 906 void NPN_PluginThreadAsyncCall(NPP id, |
899 void (*func)(void *), | 907 void (*func)(void *), |
900 void *userData) { | 908 void *userData) { |
901 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); | 909 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); |
902 if (plugin) { | 910 if (plugin) { |
903 plugin->PluginThreadAsyncCall(func, userData); | 911 plugin->PluginThreadAsyncCall(func, userData); |
904 } | 912 } |
905 } | 913 } |
906 | 914 |
907 } // extern "C" | 915 } // extern "C" |
OLD | NEW |