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

Issue 10829341: Desktop aura: Use the X11 clipboard (Closed)

Created:
8 years, 4 months ago by Elliot Glaysher
Modified:
8 years, 3 months ago
CC:
chromium-reviews, dcheng
Visibility:
Public.

Description

Desktop aura: Use the X11 clipboard for text. This is a sketch of a clipboard implementation for linux_aura. Right now, it can only copy/paste plain text types. Dealing with bitmaps is out of scope for this patch and the two unit tests dealing with bitmaps have temporarily been disabled on linux_aura. Moving parts: - This moves the current clipboard_{aurax11 => chromeos}.cc so that chromeos isn't broken between now and when I'm done. I intend to remove clipboard_chromeos once I have all the features working. - This makes what was DispatcherLinux a part of libui.so, renamed to DispatcherAuraX11 and turned into a singleton. It has no aura dependencies, though is only used in aura code. Every usage in aura code previously grabbed the singleton instance from Env and then did an ugly static_cast<> to the other type. - Moves X11AtomCache from aura to ui. Needs to be used in aurax11 code in ui/base/; has no X11 dependencies. BUG=130805 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=156433

Patch Set 1 #

Patch Set 2 : Start transforming the patch into one where we just talk to x11. #

Patch Set 3 : Totally redo the patch. #

Patch Set 4 : fix comment #

Patch Set 5 : Rebase to ToT #

Patch Set 6 : Fix chromeos case #

Patch Set 7 : Maybe fix chromeos #

Patch Set 8 : Implement enough that the unit tests are happy and ifdef out the rest. #

Patch Set 9 : Fix mac_rel #

Total comments: 30

Patch Set 10 : Most nits #

Patch Set 11 : More nits from dcheng #

Patch Set 12 : Fix text type detection for dcheng #

Total comments: 24

Patch Set 13 : Minus the message loop (Rebase to ToT) #

Patch Set 14 : Style pass for derat #

Patch Set 15 : Fix for infinite recurssion in the WaitAndGetTargetsList java path. #

Patch Set 16 : Hopefully fix unit tests by ensuring that Clipboards are destroyed before MessageLoops. #

Total comments: 7

Patch Set 17 : Nits #

Patch Set 18 : Rebase now that the clipboard access patch is in. #

Patch Set 19 : Remove testing browser process modifications to see if the clipboard access patch helped. #

Total comments: 2

Patch Set 20 : Nits and rebase to tot #

Patch Set 21 : Rebase to ToT; I think the memory fix also fixed how unit tests were run. #

Patch Set 22 : Failing linux_aura test now passes locally with the memory fixes. #

Patch Set 23 : Rebase #

Patch Set 24 : Fix MessageLoop ordering in tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+990 lines, -489 lines) Patch
M chrome/browser/bookmarks/bookmark_utils_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +4 lines, -3 lines 0 comments Download
M ui/aura/aura.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -2 lines 0 comments Download
M ui/aura/env.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M ui/aura/env.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/root_window_host_linux.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +2 lines, -2 lines 0 comments Download
D ui/aura/x11_atom_cache.h View 1 2 1 chunk +0 lines, -43 lines 0 comments Download
D ui/aura/x11_atom_cache.cc View 1 2 1 chunk +0 lines, -39 lines 0 comments Download
M ui/base/clipboard/clipboard.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +15 lines, -2 lines 0 comments Download
M ui/base/clipboard/clipboard_aurax11.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +913 lines, -376 lines 0 comments Download
A + ui/base/clipboard/clipboard_chromeos.cc View 0 chunks +-1 lines, --1 lines 0 comments Download
M ui/base/clipboard/clipboard_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +12 lines, -1 line 0 comments Download
A + ui/base/x/x11_atom_cache.h View 1 2 3 4 5 6 7 8 9 3 chunks +17 lines, -10 lines 0 comments Download
A + ui/base/x/x11_atom_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +13 lines, -5 lines 0 comments Download
M ui/ui.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +8 lines, -0 lines 0 comments Download
M ui/views/widget/x11_desktop_handler.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/widget/x11_window_event_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Elliot Glaysher
varunjain: approval as clipboard_aurax11 author sky: owners stamp derat: fyi since you suggested this
8 years, 4 months ago (2012-08-15 17:54:30 UTC) #1
varunjain
On 2012/08/15 17:54:30, Elliot Glaysher wrote: > varunjain: approval as clipboard_aurax11 author > sky: owners ...
8 years, 4 months ago (2012-08-15 18:04:39 UTC) #2
Daniel Erat
On 2012/08/15 18:04:39, varunjain wrote: > On 2012/08/15 17:54:30, Elliot Glaysher wrote: > > varunjain: ...
8 years, 4 months ago (2012-08-15 18:12:26 UTC) #3
Elliot Glaysher
On 2012/08/15 18:12:26, Daniel Erat wrote: > On 2012/08/15 18:04:39, varunjain wrote: > > On ...
8 years, 4 months ago (2012-08-15 18:23:14 UTC) #4
varunjain
On 2012/08/15 18:12:26, Daniel Erat wrote: > On 2012/08/15 18:04:39, varunjain wrote: > > On ...
8 years, 4 months ago (2012-08-15 18:29:04 UTC) #5
Daniel Erat
On 2012/08/15 18:23:14, Elliot Glaysher wrote: > On 2012/08/15 18:12:26, Daniel Erat wrote: > > ...
8 years, 4 months ago (2012-08-15 18:34:32 UTC) #6
Elliot Glaysher
derat, PTAL. Specifically, if there's something architecturally better that I could be doing, since I ...
8 years, 3 months ago (2012-08-27 21:53:49 UTC) #7
Daniel Erat
Here are some nits. I'll try to take not too long to go through ui/base/clipboard/clipboard_aurax11.cc. ...
8 years, 3 months ago (2012-08-27 22:23:31 UTC) #8
Elliot Glaysher
On 2012/08/27 22:23:31, Daniel Erat wrote: > Here are some nits. I'll try to take ...
8 years, 3 months ago (2012-08-27 22:25:52 UTC) #9
Elliot Glaysher
Reacting to nits (and opening discussion on lifetime issues on DispatcherAuraX11). http://codereview.chromium.org/10829341/diff/18007/ui/base/clipboard/clipboard.h File ui/base/clipboard/clipboard.h (right): ...
8 years, 3 months ago (2012-08-27 22:42:22 UTC) #10
dcheng
http://codereview.chromium.org/10829341/diff/18007/ui/base/clipboard/clipboard_aurax11.cc File ui/base/clipboard/clipboard_aurax11.cc (right): http://codereview.chromium.org/10829341/diff/18007/ui/base/clipboard/clipboard_aurax11.cc#newcode150 ui/base/clipboard/clipboard_aurax11.cc:150: to_delete.insert(it->second.first); Why not just delete here? http://codereview.chromium.org/10829341/diff/18007/ui/base/clipboard/clipboard_aurax11.cc#newcode239 ui/base/clipboard/clipboard_aurax11.cc:239: void ...
8 years, 3 months ago (2012-08-27 23:26:58 UTC) #11
Elliot Glaysher
http://codereview.chromium.org/10829341/diff/18007/ui/base/clipboard/clipboard_aurax11.cc File ui/base/clipboard/clipboard_aurax11.cc (right): http://codereview.chromium.org/10829341/diff/18007/ui/base/clipboard/clipboard_aurax11.cc#newcode150 ui/base/clipboard/clipboard_aurax11.cc:150: to_delete.insert(it->second.first); On 2012/08/27 23:26:58, dcheng wrote: > Why not ...
8 years, 3 months ago (2012-08-27 23:44:31 UTC) #12
dcheng
http://codereview.chromium.org/10829341/diff/18007/ui/base/clipboard/clipboard_aurax11.cc File ui/base/clipboard/clipboard_aurax11.cc (right): http://codereview.chromium.org/10829341/diff/18007/ui/base/clipboard/clipboard_aurax11.cc#newcode150 ui/base/clipboard/clipboard_aurax11.cc:150: to_delete.insert(it->second.first); On 2012/08/27 23:44:31, Elliot Glaysher wrote: > On ...
8 years, 3 months ago (2012-08-28 01:00:54 UTC) #13
Elliot Glaysher
http://codereview.chromium.org/10829341/diff/18007/ui/base/clipboard/clipboard_aurax11.cc File ui/base/clipboard/clipboard_aurax11.cc (right): http://codereview.chromium.org/10829341/diff/18007/ui/base/clipboard/clipboard_aurax11.cc#newcode150 ui/base/clipboard/clipboard_aurax11.cc:150: to_delete.insert(it->second.first); On 2012/08/28 01:00:54, dcheng wrote: > On 2012/08/27 ...
8 years, 3 months ago (2012-08-28 17:24:18 UTC) #14
Daniel Erat
This is just a first pass over clipboard_aurax11.cc. I need to spend some quality time ...
8 years, 3 months ago (2012-08-28 23:11:10 UTC) #15
Elliot Glaysher
I've solved the linux_aura unit test issues. http://codereview.chromium.org/10829341/diff/26001/ui/base/clipboard/clipboard_aurax11.cc File ui/base/clipboard/clipboard_aurax11.cc (right): http://codereview.chromium.org/10829341/diff/26001/ui/base/clipboard/clipboard_aurax11.cc#newcode454 ui/base/clipboard/clipboard_aurax11.cc:454: swa.background_pixmap = ...
8 years, 3 months ago (2012-08-31 00:00:19 UTC) #16
dcheng
http://codereview.chromium.org/10829341/diff/45018/ui/base/clipboard/clipboard_aurax11.cc File ui/base/clipboard/clipboard_aurax11.cc (right): http://codereview.chromium.org/10829341/diff/45018/ui/base/clipboard/clipboard_aurax11.cc#newcode907 ui/base/clipboard/clipboard_aurax11.cc:907: // There are multiple targets that correspond with the ...
8 years, 3 months ago (2012-09-04 21:16:01 UTC) #17
Daniel Erat
The general approach that you're taking seems correct to me. http://codereview.chromium.org/10829341/diff/45018/ui/base/clipboard/clipboard_aurax11.cc File ui/base/clipboard/clipboard_aurax11.cc (right): http://codereview.chromium.org/10829341/diff/45018/ui/base/clipboard/clipboard_aurax11.cc#newcode729 ...
8 years, 3 months ago (2012-09-05 00:21:25 UTC) #18
Elliot Glaysher
ptal I'm going to try to land https://chromiumcodereview.appspot.com/10911074/ before I land this. http://codereview.chromium.org/10829341/diff/45018/ui/base/clipboard/clipboard_aurax11.cc File ui/base/clipboard/clipboard_aurax11.cc ...
8 years, 3 months ago (2012-09-05 20:47:56 UTC) #19
Daniel Erat
I have trouble saying this with any degree of certainty for a change this big, ...
8 years, 3 months ago (2012-09-11 01:35:45 UTC) #20
Elliot Glaysher
sky: asking for ui stamp now that I have all prerequisite patches committed and have ...
8 years, 3 months ago (2012-09-12 20:00:07 UTC) #21
sky
LGTM
8 years, 3 months ago (2012-09-12 21:33:24 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erg@chromium.org/10829341/36011
8 years, 3 months ago (2012-09-12 21:35:44 UTC) #23
commit-bot: I haz the power
8 years, 3 months ago (2012-09-13 00:09:21 UTC) #24
Change committed as 156433

Powered by Google App Engine
This is Rietveld 408576698