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

Unified Diff: webkit/glue/plugins/npapi_extension_thunk.cc

Issue 1075011: Chrome side of adding search support to Pepper. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/npapi/bindings/npapi_extensions.h ('k') | webkit/glue/webplugin_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/npapi_extension_thunk.cc
===================================================================
--- webkit/glue/plugins/npapi_extension_thunk.cc (revision 42528)
+++ webkit/glue/plugins/npapi_extension_thunk.cc (working copy)
@@ -414,17 +414,33 @@
scw.WriteText(UTF8ToUTF16(content));
}
+static void NumberOfFindResultsChanged(NPP id, int total, bool final_result) {
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ if (plugin) {
+ plugin->webplugin()->delegate()->NumberOfFindResultsChanged(
+ total, final_result);
+ }
+}
+
+static void SelectedFindResultChanged(NPP id, int index) {
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ if (plugin)
+ plugin->webplugin()->delegate()->SelectedFindResultChanged(index);
+}
+
namespace NPAPI {
NPError GetPepperExtensionsFunctions(void* value) {
- static const NPExtensions kExtensions = {
+ static const NPNExtensions kExtensions = {
&AcquireDevice,
&CopyTextToClipboard,
+ &NumberOfFindResultsChanged,
+ &SelectedFindResultChanged,
};
// Return a pointer to the canonical function table.
- NPExtensions* extensions = const_cast<NPExtensions*>(&kExtensions);
- NPExtensions** exts = reinterpret_cast<NPExtensions**>(value);
+ NPNExtensions* extensions = const_cast<NPNExtensions*>(&kExtensions);
+ NPNExtensions** exts = reinterpret_cast<NPNExtensions**>(value);
*exts = extensions;
return NPERR_NO_ERROR;
}
« no previous file with comments | « third_party/npapi/bindings/npapi_extensions.h ('k') | webkit/glue/webplugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698