summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-09 07:04:19 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-09 07:04:19 +0000
commit3fc1249ff2b367a1303ce7d1faf249a4277f38f5 (patch)
tree621e196590cb7c3bab50c1881e65cf151559d58f /webkit
parent579f2a3ecfd6024a898a7606b6e66d88897d415e (diff)
downloadchromium_src-3fc1249ff2b367a1303ce7d1faf249a4277f38f5.zip
chromium_src-3fc1249ff2b367a1303ce7d1faf249a4277f38f5.tar.gz
chromium_src-3fc1249ff2b367a1303ce7d1faf249a4277f38f5.tar.bz2
Hookup Pepper v2 GetSelectedText.
Review URL: http://codereview.chromium.org/2927004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51936 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/pepper_plugin_instance.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/webkit/glue/plugins/pepper_plugin_instance.cc b/webkit/glue/plugins/pepper_plugin_instance.cc
index 197b386..7c77efb 100644
--- a/webkit/glue/plugins/pepper_plugin_instance.cc
+++ b/webkit/glue/plugins/pepper_plugin_instance.cc
@@ -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 @@ void PluginInstance::ViewFlushedPaint() {
}
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()));
}
void PluginInstance::Zoom(float factor, bool text_only) {