diff options
author | ericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 21:42:14 +0000 |
---|---|---|
committer | ericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 21:42:14 +0000 |
commit | 0c4c3884b89e0c5fb3adbbb0f3cdf092cda84a10 (patch) | |
tree | e942cc54be97b815ae60fdd7bbd65a2aa624d843 /base/clipboard_linux.cc | |
parent | 2ef2712ec860306a843c0e18afbdc339da4917cd (diff) | |
download | chromium_src-0c4c3884b89e0c5fb3adbbb0f3cdf092cda84a10.zip chromium_src-0c4c3884b89e0c5fb3adbbb0f3cdf092cda84a10.tar.gz chromium_src-0c4c3884b89e0c5fb3adbbb0f3cdf092cda84a10.tar.bz2 |
The "Copy URL" link is always greyed out in the Chrome menu on popups [crbug.com/13488].
This turns out to be because it was never implemented.
Tested manually on Windows; I'll test on Linux before submitting.
BUG=13488
TEST=Tested manually on Windows and added a unit test for the new Clipboard function.
Review URL: http://codereview.chromium.org/210042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27772 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/clipboard_linux.cc')
-rw-r--r-- | base/clipboard_linux.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/base/clipboard_linux.cc b/base/clipboard_linux.cc index 9a04d1c..f49da3f 100644 --- a/base/clipboard_linux.cc +++ b/base/clipboard_linux.cc @@ -119,6 +119,14 @@ void Clipboard::WriteObjects(const ObjectMap& objects) { SetGtkClipboard(); } +// When a URL is copied from a render view context menu (via "copy link +// location", for example), we additionally stick it in the X clipboard. This +// matches other linux browsers. +void Clipboard::DidWriteURL(const std::string& utf8_text) { + gtk_clipboard_set_text(primary_selection_, utf8_text.c_str(), + utf8_text.length()); +} + // Take ownership of the GTK clipboard and inform it of the targets we support. void Clipboard::SetGtkClipboard() { scoped_array<GtkTargetEntry> targets( |