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

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

Issue 519030: bsds: views/ and webkit/ support for FreeBSD/OpenBSD (Closed)
Patch Set: Created 10 years, 11 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "webkit/glue/plugins/plugin_host.h" 5 #include "webkit/glue/plugins/plugin_host.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 if (np_object) { 698 if (np_object) {
699 WebBindings::retainObject(np_object); 699 WebBindings::retainObject(np_object);
700 void** v = static_cast<void**>(value); 700 void** v = static_cast<void**>(value);
701 *v = np_object; 701 *v = np_object;
702 rv = NPERR_NO_ERROR; 702 rv = NPERR_NO_ERROR;
703 } else { 703 } else {
704 NOTREACHED(); 704 NOTREACHED();
705 } 705 }
706 break; 706 break;
707 } 707 }
708 #if !defined(OS_MACOSX) // OS X doesn't have windowed plugins.
708 case NPNVnetscapeWindow: { 709 case NPNVnetscapeWindow: {
709 #if defined(OS_WIN) || defined(OS_LINUX)
710 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); 710 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
711 gfx::PluginWindowHandle handle = plugin->window_handle(); 711 gfx::PluginWindowHandle handle = plugin->window_handle();
712 *((void**)value) = (void*)handle; 712 *((void**)value) = (void*)handle;
713 rv = NPERR_NO_ERROR; 713 rv = NPERR_NO_ERROR;
714 #else
715 NOTIMPLEMENTED();
716 #endif
717 break; 714 break;
718 } 715 }
716 #endif
719 case NPNVjavascriptEnabledBool: { 717 case NPNVjavascriptEnabledBool: {
720 // yes, JS is enabled. 718 // yes, JS is enabled.
721 *((void**)value) = (void*)1; 719 *((void**)value) = (void*)1;
722 rv = NPERR_NO_ERROR; 720 rv = NPERR_NO_ERROR;
723 break; 721 break;
724 } 722 }
725 #if defined(OS_LINUX) 723 #if defined(TOOLKIT_USES_GTK)
726 case NPNVToolkit: 724 case NPNVToolkit:
727 // Tell them we are GTK2. (The alternative is GTK 1.2.) 725 // Tell them we are GTK2. (The alternative is GTK 1.2.)
728 *reinterpret_cast<int*>(value) = NPNVGtk2; 726 *reinterpret_cast<int*>(value) = NPNVGtk2;
729 rv = NPERR_NO_ERROR; 727 rv = NPERR_NO_ERROR;
730 break; 728 break;
731 729
732 case NPNVSupportsXEmbedBool: 730 case NPNVSupportsXEmbedBool:
733 // Yes, we support XEmbed.
734 *reinterpret_cast<NPBool*>(value) = TRUE; 731 *reinterpret_cast<NPBool*>(value) = TRUE;
735 rv = NPERR_NO_ERROR; 732 rv = NPERR_NO_ERROR;
736 break; 733 break;
737 #endif 734 #endif
738 case NPNVSupportsWindowless: { 735 case NPNVSupportsWindowless: {
739 NPBool* supports_windowless = reinterpret_cast<NPBool*>(value); 736 NPBool* supports_windowless = reinterpret_cast<NPBool*>(value);
740 *supports_windowless = TRUE; 737 *supports_windowless = TRUE;
741 rv = NPERR_NO_ERROR; 738 rv = NPERR_NO_ERROR;
742 break; 739 break;
743 } 740 }
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 NPCoordinateSpace destSpace) { 1049 NPCoordinateSpace destSpace) {
1053 NOTIMPLEMENTED(); 1050 NOTIMPLEMENTED();
1054 if (destX) 1051 if (destX)
1055 *destX = sourceX; 1052 *destX = sourceX;
1056 if (destY) 1053 if (destY)
1057 *destY = sourceY; 1054 *destY = sourceY;
1058 return FALSE; 1055 return FALSE;
1059 } 1056 }
1060 1057
1061 } // extern "C" 1058 } // extern "C"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698