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

Side by Side Diff: webkit/glue/plugins/plugin_host.cc

Issue 115330: linux: Adding events to windowless plugins on Linux (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « webkit/glue/event_conversion.cc ('k') | webkit/glue/plugins/plugin_instance.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
10 // makes npapi.h include Xlib.h, which in turn defines a ton of symbols
11 // like None and Status, causing conflicts with the aforementioned
12 // many headers that include npapi.h. Ugh.
13 // See also webplugin_delegate_impl.cc.
14 #define MOZ_X11 1
15
16 #include "config.h" 5 #include "config.h"
17 6
18 #include "webkit/glue/plugins/plugin_host.h" 7 #include "webkit/glue/plugins/plugin_host.h"
19 8
20 #include "base/file_util.h" 9 #include "base/file_util.h"
21 #include "base/logging.h" 10 #include "base/logging.h"
22 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
23 #include "base/string_piece.h" 12 #include "base/string_piece.h"
24 #include "base/string_util.h" 13 #include "base/string_util.h"
25 #include "base/sys_string_conversions.h" 14 #include "base/sys_string_conversions.h"
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 void **v = (void **)value; 702 void **v = (void **)value;
714 *v = np_object; 703 *v = np_object;
715 rv = NPERR_NO_ERROR; 704 rv = NPERR_NO_ERROR;
716 } else { 705 } else {
717 NOTREACHED(); 706 NOTREACHED();
718 } 707 }
719 break; 708 break;
720 } 709 }
721 case NPNVnetscapeWindow: 710 case NPNVnetscapeWindow:
722 { 711 {
723 #if defined(OS_WIN) 712 #if defined(OS_WIN) || defined(OS_LINUX)
724 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); 713 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
725 HWND handle = plugin->window_handle(); 714 gfx::NativeView handle = plugin->window_handle();
726 *((void**)value) = (void*)handle; 715 *((void**)value) = (void*)handle;
727 rv = NPERR_NO_ERROR; 716 rv = NPERR_NO_ERROR;
728 #else 717 #else
729 NOTIMPLEMENTED(); 718 NOTIMPLEMENTED();
730 #endif 719 #endif
731 break; 720 break;
732 } 721 }
733 case NPNVjavascriptEnabledBool: 722 case NPNVjavascriptEnabledBool:
734 { 723 {
735 // yes, JS is enabled. 724 // yes, JS is enabled.
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 void NPN_PluginThreadAsyncCall(NPP id, 898 void NPN_PluginThreadAsyncCall(NPP id,
910 void (*func)(void *), 899 void (*func)(void *),
911 void *userData) { 900 void *userData) {
912 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); 901 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
913 if (plugin) { 902 if (plugin) {
914 plugin->PluginThreadAsyncCall(func, userData); 903 plugin->PluginThreadAsyncCall(func, userData);
915 } 904 }
916 } 905 }
917 906
918 } // extern "C" 907 } // extern "C"
OLDNEW
« no previous file with comments | « webkit/glue/event_conversion.cc ('k') | webkit/glue/plugins/plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698