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

Unified Diff: base/clipboard.h

Issue 11398: Lazily create the clipboard owner window. CreateWindow can take ~.5ms, and w... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/clipboard_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/clipboard.h
===================================================================
--- base/clipboard.h (revision 5863)
+++ base/clipboard.h (working copy)
@@ -175,7 +175,12 @@
// Free a handle depending on its type (as intuited from format)
static void FreeData(FormatType format, HANDLE data);
- HWND clipboard_owner_;
+ // Return the window that should be the clipboard owner, creating it
+ // if neccessary. Marked const for lazily initialization by const methods.
+ HWND GetClipboardWindow() const;
+
+ // Mark this as mutable so const methods can still do lazy initialization.
Peter Kasting 2008/11/25 06:46:13 Nit: Should probably comment that no one should ac
+ mutable HWND clipboard_owner_;
#elif defined(OS_LINUX)
// Data is stored in the |clipboard_data_| map until it is saved to the system
// clipboard. The Store* functions save data to the |clipboard_data_| map. The
« no previous file with comments | « no previous file | base/clipboard_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698