summaryrefslogtreecommitdiffstats
path: root/app/clipboard
Commit message (Collapse)AuthorAgeFilesLines
* shared_memory: remove wstrings, fix callers.evan@chromium.org2010-09-291-1/+1
| | | | | | | | | BUG=23581 TEST=compiles Review URL: http://codereview.chromium.org/3555002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60985 0039d316-1c4b-4281-b951-d872f2087c98
* [GTK] fix wraparound error in clipboard.estade@chromium.org2010-09-213-1/+22
| | | | | | | | | | | 0U - 1 = pain BUG=56298 TEST=see bug Review URL: http://codereview.chromium.org/3394011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60079 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 6)thestig@chromium.org2010-08-191-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3093013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56641 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded #includes of <string> and <vector> from src/app and ↵viettrungluu@chromium.org2010-08-141-1/+0
| | | | | | | | | | | src/base. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3173020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56144 0039d316-1c4b-4281-b951-d872f2087c98
* Add #include utf_string_conversions.h to all files that use ASCIIToWide andbrettw@chromium.org2010-08-031-2/+2
| | | | | | | | | | | | | | | ASCIIToUTF16. I removed string_util includes from a few places where it obviously wasn't needed. In a separate pass, I'm going to remove ASCIITo* from string_util, then I'm going to do an even later pass to find the unnecessary string_util.h includes and remove them. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3058027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54746 0039d316-1c4b-4281-b951-d872f2087c98
* Move the number conversions from string_util to a new file.brettw@chromium.org2010-07-301-21/+27
| | | | | | | | | | | | | Use the base namespace in the new file. Update callers. I removed all wstring variants and also the string->number ones that ignore the return value. That encourages people to write code and forget about error handling. TEST=included unit tests BUG=none Review URL: http://codereview.chromium.org/3056029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54355 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-263-0/+3
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity 9291: Uninitialized member in clipboard_linux.ccfinnur@chromium.org2010-07-231-1/+1
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/3008020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53450 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: improve clipboard compatibility with firefox + evolution.estade@chromium.org2010-07-201-12/+11
| | | | | | | | | | BUG=48424 TEST=copying from the chrome bookmark manager into firefox should save the bookmark's title as well as url TEST=copying the address from the omnibox into evolution copies text, and doesn't create an attachment Review URL: http://codereview.chromium.org/3022004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52983 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt four at landing the "histogram.h removed from message_loop.h" patch.erg@chromium.org2010-07-151-0/+1
| | | | | | | | | | | | | | Previously committed as r52349 and r52336. Related commits: r52367, r52364 and r52343. Rerunning trybots due to previous trybot breakage. TEST=none BUG=none Review URL: http://codereview.chromium.org/2965015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52496 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: linux: fix leak in Clipboard::WriteData with disallowed format.mattm@chromium.org2010-07-121-2/+2
| | | | | | | | | | CID=9154 TEST=none BUG=none Review URL: http://codereview.chromium.org/2946006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52134 0039d316-1c4b-4281-b951-d872f2087c98
* GTK - don't paste a garbage text/html character.estade@chromium.org2010-07-101-2/+6
| | | | | | | | | | | | | When the clipboard text/html data terminates with NULL, drop it (WebKit used to do this for us before the parsing changed in roll 61629:61653). Some programs such as open office NULL terminate clipboard text/html data, even though it is unnecessary since the clipboard api provides a length for the data buffer. Chrome also NULL terminates text/html data in order to work around a bug in some versions of pidgin. Also, don't NULL terminate text/plain data, because no app I tested (firefox, gedit, midori, konqueror, OO) does this. BUG=48335 TEST=manual (see bug) Review URL: http://codereview.chromium.org/2896006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52034 0039d316-1c4b-4281-b951-d872f2087c98
* Implement new Chromium IPCs for copying/dragging.dcheng@chromium.org2010-07-071-2/+5
| | | | | | | | | | | A new ClipboardDispatcher interface has been added to handle the IPC calls. The new methods don't really belong on the existing Clipboard class, since that class deals with only copy and paste. On Windows and Mac, ClipboardDispatcher will share logic for copy/paste and drag/drop. GTK will have to use two separate code paths. BUG=31037 TEST=none Review URL: http://codereview.chromium.org/2842016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51790 0039d316-1c4b-4281-b951-d872f2087c98
* Mac/clang: Possibly contentious changes.thakis@chromium.org2010-06-151-2/+2
| | | | | | | | | | | | As discussed on irc, we're getting rid of const NSObjects, and we're making all properties nonatomic. const: All of cocoa takes nonconst NSObjects, and passing a const NSString to a function that takes NSString is a const violation. gcc doesn't complain about this, but clang intentionally does. constness is usually done via immutable base classes and mutable subclasses in cocoa anyway, so getting rid of const isn't that bad. Also, we don't really have a choice. nonatomic: Some of our classes have custom setters that are not @synchronized. If the @property for that is not non-atomic, then the interface claims that the method is synchronized but the implementation actually isn't. That's a bug. gcc happens not to complain about this, but clang does. Since we shouldn't need atomic properties anywhere, the simple rule is now to just make all properties nonatomic. Review URL: http://codereview.chromium.org/2769014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49808 0039d316-1c4b-4281-b951-d872f2087c98
* Convert RTF on the pasteboard to HTML and all it to substitute if present ↵pinkerton@chromium.org2010-06-041-3/+13
| | | | | | | | | | and no HTML is on a paste or drop. Safari does not put HTML on the pasteboard, only RTF. BUG=44661 TEST=dropping/pasting html should retain basic structure, but fonts/colors don't seem to propagate. Review URL: http://codereview.chromium.org/2674002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48962 0039d316-1c4b-4281-b951-d872f2087c98
* <wininet.h> related cleanup.wtc@chromium.org2010-06-041-1/+1
| | | | | | | | | | | | | Document why clipboard_util_win.cc needs to include <wininet.h>. test_shell_win.cc does not need to include <wininet.h>. R=eroman BUG=none TEST=none Review URL: http://codereview.chromium.org/2606004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48937 0039d316-1c4b-4281-b951-d872f2087c98
* [GTTF] Add FRIEND_TEST_ALL_PREFIXES, a FRIEND_TEST replacementphajdan.jr@chromium.org2010-06-011-2/+3
| | | | | | | | | | | that works with all test prefixes (DISABLED, FLAKY, FAILS). TEST=none BUG=44549 Review URL: http://codereview.chromium.org/2439001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48634 0039d316-1c4b-4281-b951-d872f2087c98
* Don't populate WebDropData with file URLs when dragging files.dcheng@chromium.org2010-05-212-47/+58
| | | | | | | | | | | This is the Windows patch. There will be separate patches for Mac and Linux. BUG=42685 TEST=none Review URL: http://codereview.chromium.org/2126010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47870 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Null terminate text/html data we send to the clipboard. Change ↵thestig@chromium.org2010-05-174-26/+35
| | | | | | | | | | WriteHyperlink to take string16 anchor text. BUG=42624 TEST=none Review URL: http://codereview.chromium.org/2036013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47432 0039d316-1c4b-4281-b951-d872f2087c98
* Move non-linux specific code from base/linux_util to app/gtk_utilpvalchev@google.com2010-05-131-3/+4
| | | | | | | | from sprewell Review URL: http://codereview.chromium.org/2058004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47201 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix compilation error with gcc 4.5.craig.schlenter@chromium.org2010-05-111-1/+1
| | | | | | | | | | | | | | | Avoid a gcc 4.5 warning/error for values that aren't part of NPNVariable. Also drop some unnecessary static_casts by swapping from an int to a size_t in TemplateURLRef's Replacement struct and use platform specific NULL or 0 constants in a couple of places. BUG=43341 TEST=chrome target compiles with gcc 4.5. Review URL: http://codereview.chromium.org/2019002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46889 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/gfx contents to gfx/ben@chromium.org2010-03-146-6/+6
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41559 0039d316-1c4b-4281-b951-d872f2087c98
* win: string_util.h -> utf_string_conversions.h fix.jhawkins@google.com2010-03-112-0/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/830002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41292 0039d316-1c4b-4281-b951-d872f2087c98
* mac: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-101-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/745003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41100 0039d316-1c4b-4281-b951-d872f2087c98
* app: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-062-2/+4
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/668226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40853 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug 17333: Can't copy-paste text from OpenOffice to a contenteditable DIVjianli@chromium.org2010-03-032-5/+72
| | | | | | | | | BUG=17333 TEST=ClipboardTest.HtmlTest Review URL: http://codereview.chromium.org/661429 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40523 0039d316-1c4b-4281-b951-d872f2087c98
* Make SharedMemory use uint32 instead of size_t. This removes the remaining ↵jam@chromium.org2010-02-162-5/+5
| | | | | | | | size_t's from the IPC code. Review URL: http://codereview.chromium.org/581001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39164 0039d316-1c4b-4281-b951-d872f2087c98
* Windows: Put ScopedHGlobal in the right scope so it unlocks a STGMEDIUM's ↵thestig@chromium.org2010-02-041-48/+65
| | | | | | | | | | handle before we call ReleaseStgMedium. BUG=34528 TEST=Wine + Valgrind bot goes green. Review URL: http://codereview.chromium.org/565049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38075 0039d316-1c4b-4281-b951-d872f2087c98
* Copy percent-escaped URL when copying all the text from the address bar (Mac)kinuko@chromium.org2010-02-032-3/+4
| | | | | | | | | | | | | | | | | | | | BUG=31104 TEST=Visit http://www.google.com/search?ie=UTF-8&q=上地 and select entire text in Omnibox, then copy the text. Paste the copied text into other applications such as notepad and check if the pasted text contains %E4%B8%8A%E5%9C%B0, not 上地. Paste the copied text into Safari's URL bar and type return. Check if you are navigated to the same website. Paste the copied text into textareas in Chrome and check if the pasted text contains %E4%B8%8A%E5%9C%B0. Paste the copied text into Gmail's rich text editing mode and check if the pasted text contains 上地. Right click the link you pasted in Gmail and check if you see "Go to: http://www.google.com/...%E4%B8%8A%E5%9C%B0". Paste the copied text into TextEdit and check if the pasted text isn't garbled and correctly contains 上地. Check if the link in TextEdit is pointing to encoded URL (http://www.google.com/...%E4%B8%8A%E5%9C%B0). TEST=Visit http://www.google.com/search?ie=UTF-8&q=上地 again and select "q=上地" in Omnibox, then copy the text. Paste it into somewhere and check if you see "q=上地". TEST=Copy "上地" from somewhere and paste it into Omnibox. Copy from Omnibox and paste it into notepad. Then check if the pasted text is NOT encoded. Review URL: http://codereview.chromium.org/549172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37955 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Use Shared Mem transport to copy images.jeremy@chromium.org2010-01-276-84/+185
| | | | | | | | | | | | | | | | Prior to this change images where copied inline in IPC messages on non-Windows platforms. Copying an oversized image would cause the IPC system to bork and crash the renderer. Changes in this CL: * All platforms use a unified mechanism to copy images using shared memory. * Introduced a new IPC message so the renderer can allocated a shared memory segment on OS X. * On OS X tried to keep as few copies of the image data in memory as possible. BUG=26822 TEST=1)On all platforms: navigate to a webpage, right click on an image and copy. Then try pasting into an image editor. 2)Repro steps in bug should no longer crash the Renderer on Mac/Linux Review URL: http://codereview.chromium.org/552129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37247 0039d316-1c4b-4281-b951-d872f2087c98
* OpenBSD/FreeBSD ifdefs and GYP changes for app/ directorypvalchev@google.com2010-01-233-11/+11
| | | | | | | | | | | - Use OS_POSIX && !OS_MACOSX defines to capture Linux/*BSD as they have many similarities, use other defines instead of OS_LINUX where sensible. Based on original work by Sprewell and Ben Laurie on FreeBSD port Review URL: http://codereview.chromium.org/548126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36931 0039d316-1c4b-4281-b951-d872f2087c98
* Support dragging a virtual file out of the browser.jianli@chromium.org2010-01-151-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/351029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36378 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure an evil renderer can't mess up state of the clipboard, later causingcevans@chromium.org2010-01-121-0/+4
| | | | | | | | | | | an untrusted blob to be treated as a GdkPixmap. BUG=32014 TEST=NONE Review URL: http://codereview.chromium.org/547014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35982 0039d316-1c4b-4281-b951-d872f2087c98
* Add a range of sanity checks to the clipboard object handling. In ↵cevans@chromium.org2009-12-301-4/+23
| | | | | | | | | | | particular, fix an integer overflow that might be an issue on Linux. Other changes are to avoid OOB reads and calling front() or [] on an empty or insufficiently sized vector. BUG=31928 TEST=NONE Review URL: http://codereview.chromium.org/522024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35362 0039d316-1c4b-4281-b951-d872f2087c98
* Don't shoehorn a size_t into an int -- especially if the int is used in an ↵cevans@chromium.org2009-12-301-2/+2
| | | | | | | | | | | subsequent allocation. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/518022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35360 0039d316-1c4b-4281-b951-d872f2087c98
* Use utf_string_conversions header in more places.maruel@chromium.org2009-12-111-1/+1
| | | | | | | | | | | Patch contributed by Thiago Farina (thiago.farina@gmail.com) TEST=none BUG=none Review URL: http://codereview.chromium.org/465065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34348 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: improve format of text/html copy paste data.estade@chromium.org2009-12-082-7/+26
| | | | | | | | | BUG=28888 TEST=works to paste html into firefox/thunderbird Review URL: http://codereview.chromium.org/465081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34070 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: when reading html from clipboard, interpret BOM to meanestade@chromium.org2009-12-021-1/+10
| | | | | | | | | | | | | | | | | | | | | that the encoding is UTF-16. Otherwise, continue assuming it's utf-8. From firefox source: /* * "text/html" can be encoded UCS2. It is recommended that * documents transmitted as UCS2 always begin with a ZERO-WIDTH * NON-BREAKING SPACE character (hexadecimal FEFF, also called * Byte Order Mark (BOM)). Adding BOM can help other app to * detect mozilla use UCS2 encoding when copy-paste. */ BUG=29145 Review URL: http://codereview.chromium.org/455030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33585 0039d316-1c4b-4281-b951-d872f2087c98
* Small cleanups:pkasting@chromium.org2009-11-181-55/+41
| | | | | | | | | | | | | | * SplitUrlAndTitle() can't fail, so it doesn't need to return a bool. * assign() can do substrings in one shot * Half the code used "*str =" and half "str->assign()", often right next to each other; pick one for consistency * No need to calculate array sizes when we're the ones declaring them * Use early return in a few places BUG=none TEST=none Review URL: http://codereview.chromium.org/405023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32414 0039d316-1c4b-4281-b951-d872f2087c98
* Fix lint errors in app/ and turn on presubmit check.erg@google.com2009-11-171-1/+1
| | | | | | Review URL: http://codereview.chromium.org/400016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32222 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Clipboard::WriteFile{,s} which is unused on mac and windows and ↵estade@chromium.org2009-11-058-157/+0
| | | | | | | | | | | unimplemented on linux. BUG=18037 TEST=trybots Review URL: http://codereview.chromium.org/292018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31148 0039d316-1c4b-4281-b951-d872f2087c98
* Chromium fix for "Copy Image". (WebCore fix is ↵avi@chromium.org2009-10-222-1/+44
| | | | | | | | | | | http://codereview.chromium.org/294023 .) BUG=http://crbug.com/13099 TEST="Copy Image" works; see bug Review URL: http://codereview.chromium.org/308001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29812 0039d316-1c4b-4281-b951-d872f2087c98
* linux: rearrange clipboard codeevan@chromium.org2009-10-203-46/+45
| | | | | | | | | | | | | | | Once I understood what was going on, I attempted to clarify the comment in the header. The code seemed totally wrong on first read and I think a comment like the one I wrote would've helped. Concrete changes: DCHECK() if a key is set twice; don't call WriteText() from WriteBookmark(). BUG=22697 Review URL: http://codereview.chromium.org/307003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29523 0039d316-1c4b-4281-b951-d872f2087c98
* Turn NULL used as int to 0.phajdan.jr@chromium.org2009-10-131-1/+1
| | | | | | | | | | | | | (Excluding chrome/browser/...) Landing patch for Jacob Mandelson. Original review: http://codereview.chromium.org/195067 BUG=none TEST=base_unittests & app_unittests Review URL: http://codereview.chromium.org/267076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28810 0039d316-1c4b-4281-b951-d872f2087c98
* Move the clipboard stuff out of base and into app/clipboard. I renamedbrettw@chromium.org2009-10-0310-0/+2868
clipboard_util to clipboard_util_win since it's Windows-only. This patch makes test_shell depend on app as well. There should be no logic change. TEST=none BUG=none Review URL: http://codereview.chromium.org/260003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27937 0039d316-1c4b-4281-b951-d872f2087c98