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

Issue 11398: Lazily create the clipboard owner window. CreateWindow can take ~.5ms, and w... (Closed)

Created:
12 years, 1 month ago by Dean McNamee
Modified:
9 years, 7 months ago
Reviewers:
tony, Peter Kasting, sky
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Lazily create the clipboard owner window. CreateWindow can take ~.5ms, and we don't need to do this until the clipboard is actually used (ctrl-c/ctrl-v). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=5963

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -13 lines) Patch
M base/clipboard.h View 1 2 3 4 5 1 chunk +6 lines, -1 line 1 comment Download
M base/clipboard_win.cc View 1 2 3 4 5 6 7 8 chunks +20 lines, -12 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Dean McNamee
I'm not super into sprinkling EnsureClipboardWindow everywhere, but, yeah, whatevz.
12 years, 1 month ago (2008-11-24 16:45:43 UTC) #1
sky
LGTM http://codereview.chromium.org/11398/diff/201/6 File base/clipboard_win.cc (right): http://codereview.chromium.org/11398/diff/201/6#newcode622 Line 622: }; nit: no ;
12 years, 1 month ago (2008-11-24 17:02:37 UTC) #2
Dean McNamee
Updated because I had to remove a bunch of const-ness. Adding Tony. On 2008/11/24 17:02:37, ...
12 years ago (2008-11-24 22:49:03 UTC) #3
Peter Kasting
On 2008/11/24 22:49:03, Dean McNamee wrote: > Updated because I had to remove a bunch ...
12 years ago (2008-11-24 22:51:30 UTC) #4
Dean McNamee
Updated w/ mutable. On 2008/11/24 22:51:30, pkasting wrote: > On 2008/11/24 22:49:03, Dean McNamee wrote: ...
12 years ago (2008-11-25 00:53:59 UTC) #5
Peter Kasting
LGTM!
12 years ago (2008-11-25 00:55:01 UTC) #6
Peter Kasting
On 2008/11/25 00:55:01, pkasting wrote: > LGTM! BTW, another technique that would have worked here ...
12 years ago (2008-11-25 00:57:08 UTC) #7
Dean McNamee
Ok, one last time then. On 2008/11/25 00:57:08, pkasting wrote: > On 2008/11/25 00:55:01, pkasting ...
12 years ago (2008-11-25 01:35:46 UTC) #8
Peter Kasting
12 years ago (2008-11-25 06:46:13 UTC) #9
LGTM again with nit

http://codereview.chromium.org/11398/diff/22/219
File base/clipboard.h (right):

http://codereview.chromium.org/11398/diff/22/219#newcode182
Line 182: // Mark this as mutable so const methods can still do lazy
initialization.
Nit: Should probably comment that no one should access this directly (unless
they don't want to create it, like the destructor).

Also probably don't need the explanation on mutable, it's sort of obvious, but
feel free to leave it if you think it adds clarity

Powered by Google App Engine
This is Rietveld 408576698