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

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

Issue 2927004: Hookup Pepper v2 GetSelectedText. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_plugin_instance.cc
===================================================================
--- webkit/glue/plugins/pepper_plugin_instance.cc (revision 51935)
+++ webkit/glue/plugins/pepper_plugin_instance.cc (working copy)
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/scoped_ptr.h"
+#include "base/utf_string_conversions.h"
#include "gfx/rect.h"
#include "third_party/ppapi/c/pp_instance.h"
#include "third_party/ppapi/c/pp_event.h"
@@ -26,6 +27,7 @@
#include "webkit/glue/plugins/pepper_image_data.h"
#include "webkit/glue/plugins/pepper_plugin_delegate.h"
#include "webkit/glue/plugins/pepper_plugin_module.h"
+#include "webkit/glue/plugins/pepper_string.h"
#include "webkit/glue/plugins/pepper_url_loader.h"
#include "webkit/glue/plugins/pepper_var.h"
@@ -335,8 +337,11 @@
}
string16 PluginInstance::GetSelectedText(bool html) {
- // TODO: implement me
- return string16();
+ PP_Var rv = instance_interface_->GetSelectedText(GetPPInstance(), html);
+ String* string = GetString(rv);
+ if (!string)
+ return string16();
+ return string16(UTF8ToUTF16(string->value()));
darin (slow to review) 2010/07/09 07:24:52 UTF8ToUTF16 already returns string16, so it should
}
void PluginInstance::Zoom(float factor, bool text_only) {
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698