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

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

Issue 4930001: Sync to r31 of npapi-headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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 | « third_party/npapi/bindings/npfunctions.h ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 host_funcs_.enumerate = WebBindings::enumerate; 127 host_funcs_.enumerate = WebBindings::enumerate;
128 host_funcs_.pluginthreadasynccall = NPN_PluginThreadAsyncCall; 128 host_funcs_.pluginthreadasynccall = NPN_PluginThreadAsyncCall;
129 host_funcs_.construct = WebBindings::construct; 129 host_funcs_.construct = WebBindings::construct;
130 host_funcs_.getvalueforurl = NPN_GetValueForURL; 130 host_funcs_.getvalueforurl = NPN_GetValueForURL;
131 host_funcs_.setvalueforurl = NPN_SetValueForURL; 131 host_funcs_.setvalueforurl = NPN_SetValueForURL;
132 host_funcs_.getauthenticationinfo = NPN_GetAuthenticationInfo; 132 host_funcs_.getauthenticationinfo = NPN_GetAuthenticationInfo;
133 host_funcs_.scheduletimer = NPN_ScheduleTimer; 133 host_funcs_.scheduletimer = NPN_ScheduleTimer;
134 host_funcs_.unscheduletimer = NPN_UnscheduleTimer; 134 host_funcs_.unscheduletimer = NPN_UnscheduleTimer;
135 host_funcs_.popupcontextmenu = NPN_PopUpContextMenu; 135 host_funcs_.popupcontextmenu = NPN_PopUpContextMenu;
136 host_funcs_.convertpoint = NPN_ConvertPoint; 136 host_funcs_.convertpoint = NPN_ConvertPoint;
137 host_funcs_.handleevent = NPN_HandleEvent;
138 host_funcs_.unfocusinstance = NPN_UnfocusInstance;
139 // TODO: Implement redirect handling: http://crbug.com/63030
140 host_funcs_.urlredirectresponse = NULL;
137 } 141 }
138 142
139 void PluginHost::PatchNPNetscapeFuncs(NPNetscapeFuncs* overrides) { 143 void PluginHost::PatchNPNetscapeFuncs(NPNetscapeFuncs* overrides) {
140 // When running in the plugin process, we need to patch the NPN functions 144 // When running in the plugin process, we need to patch the NPN functions
141 // that the plugin calls to interact with NPObjects that we give. Otherwise 145 // that the plugin calls to interact with NPObjects that we give. Otherwise
142 // the plugin will call the v8 NPN functions, which won't work since we have 146 // the plugin will call the v8 NPN functions, which won't work since we have
143 // an NPObjectProxy and not a real v8 implementation. 147 // an NPObjectProxy and not a real v8 implementation.
144 if (overrides->invoke) 148 if (overrides->invoke)
145 host_funcs_.invoke = overrides->invoke; 149 host_funcs_.invoke = overrides->invoke;
146 150
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 NPCoordinateSpace destSpace) { 1083 NPCoordinateSpace destSpace) {
1080 scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id)); 1084 scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
1081 if (plugin.get()) { 1085 if (plugin.get()) {
1082 return plugin->ConvertPoint(sourceX, sourceY, sourceSpace, 1086 return plugin->ConvertPoint(sourceX, sourceY, sourceSpace,
1083 destX, destY, destSpace); 1087 destX, destY, destSpace);
1084 } 1088 }
1085 NOTREACHED(); 1089 NOTREACHED();
1086 return false; 1090 return false;
1087 } 1091 }
1088 1092
1093 NPBool NPN_HandleEvent(NPP id, void *event, NPBool handled) {
1094 // TODO: Implement advanced key handling: http://crbug.com/46578
1095 NOTIMPLEMENTED();
1096 return false;
1097 }
1098
1099 NPBool NPN_UnfocusInstance(NPP id, NPFocusDirection direction) {
1100 // TODO: Implement advanced key handling: http://crbug.com/46578
1101 NOTIMPLEMENTED();
1102 return false;
1103 }
1104
1105
1089 } // extern "C" 1106 } // extern "C"
OLDNEW
« no previous file with comments | « third_party/npapi/bindings/npfunctions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698