summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe.h
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-01 21:03:08 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-01 21:03:08 +0000
commit8bbe7efe110336916c819fdc7f5566afa3a97495 (patch)
tree6d473efd35ca0f48584dd3254e8b4e5ebd708fbb /webkit/glue/webframe.h
parentd294668d4c62e94c342cff58b1096af8106113ef (diff)
downloadchromium_src-8bbe7efe110336916c819fdc7f5566afa3a97495.zip
chromium_src-8bbe7efe110336916c819fdc7f5566afa3a97495.tar.gz
chromium_src-8bbe7efe110336916c819fdc7f5566afa3a97495.tar.bz2
Enable the X selection clipboard for copying html and text out of a linux test shell.
I implemented it in the webview delegate, so when we switch to the multiprocess architecture, we will need to find out if the clipboard callback can be async (the current method would require a sync call from browser to renderer to get the selected text). Review URL: http://codereview.chromium.org/12700 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6160 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe.h')
-rw-r--r--webkit/glue/webframe.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/glue/webframe.h b/webkit/glue/webframe.h
index 05fd9327..7c6c1fc 100644
--- a/webkit/glue/webframe.h
+++ b/webkit/glue/webframe.h
@@ -272,6 +272,10 @@ class WebFrame : public base::RefCounted<WebFrame> {
// Clear any text selection in the frame.
virtual void ClearSelection() = 0;
+ // Returns the selected text if there is any. If |as_html| is true, returns
+ // the selection as HTML. The return value is encoded in utf-8.
+ virtual std::string GetSelection(bool as_html) = 0;
+
// Paints the contents of this web view in a bitmapped image. This image
// will not have plugins drawn. Devices are cheap to copy because the data is
// internally refcounted so we allocate and return a new copy