OLD | NEW |
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 // Pepper API support should be turned on for this module. | |
6 #define PEPPER_APIS_ENABLED | |
7 | |
8 #include "webkit/glue/plugins/plugin_host.h" | 5 #include "webkit/glue/plugins/plugin_host.h" |
9 | 6 |
10 #include "base/file_util.h" | 7 #include "base/file_util.h" |
11 #include "base/logging.h" | 8 #include "base/logging.h" |
12 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
13 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
14 #include "base/string_util.h" | 11 #include "base/string_util.h" |
15 #include "base/sys_string_conversions.h" | 12 #include "base/sys_string_conversions.h" |
16 #include "net/base/net_util.h" | 13 #include "net/base/net_util.h" |
17 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" | 14 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 case NPNVsupportsOpenGLBool: | 793 case NPNVsupportsOpenGLBool: |
797 case NPNVsupportsCoreAnimationBool: { | 794 case NPNVsupportsCoreAnimationBool: { |
798 // we do not support these drawing and event models. | 795 // we do not support these drawing and event models. |
799 NPBool* supports_model = reinterpret_cast<NPBool*>(value); | 796 NPBool* supports_model = reinterpret_cast<NPBool*>(value); |
800 *supports_model = FALSE; | 797 *supports_model = FALSE; |
801 rv = NPERR_NO_ERROR; | 798 rv = NPERR_NO_ERROR; |
802 break; | 799 break; |
803 } | 800 } |
804 #endif // OS_MACOSX | 801 #endif // OS_MACOSX |
805 case NPNVPepperExtensions: | 802 case NPNVPepperExtensions: |
| 803 // Available for any plugin that attempts to get it. |
| 804 // If the plugin is not started in a Pepper implementation, it |
| 805 // will likely fail when it tries to use any of the functions |
| 806 // attached to the extension vector. |
806 rv = NPAPI::GetPepperExtensionsFunctions(value); | 807 rv = NPAPI::GetPepperExtensionsFunctions(value); |
807 break; | 808 break; |
808 default: | 809 default: |
809 DLOG(INFO) << "NPN_GetValue(" << variable << ") is not implemented yet."; | 810 DLOG(INFO) << "NPN_GetValue(" << variable << ") is not implemented yet."; |
810 break; | 811 break; |
811 } | 812 } |
812 return rv; | 813 return rv; |
813 } | 814 } |
814 | 815 |
815 NPError NPN_SetValue(NPP id, NPPVariable variable, void* value) { | 816 NPError NPN_SetValue(NPP id, NPPVariable variable, void* value) { |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 NPCoordinateSpace destSpace) { | 1052 NPCoordinateSpace destSpace) { |
1052 NOTIMPLEMENTED(); | 1053 NOTIMPLEMENTED(); |
1053 if (destX) | 1054 if (destX) |
1054 *destX = sourceX; | 1055 *destX = sourceX; |
1055 if (destY) | 1056 if (destY) |
1056 *destY = sourceY; | 1057 *destY = sourceY; |
1057 return FALSE; | 1058 return FALSE; |
1058 } | 1059 } |
1059 | 1060 |
1060 } // extern "C" | 1061 } // extern "C" |
OLD | NEW |