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

Unified Diff: ui/base/clipboard/clipboard.h

Issue 2394773003: Reorder clipboard data types in ui/base/clipboard/clipboard.h (Closed)
Patch Set: Created 4 years, 2 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/clipboard.h
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h
index 7826b2696df33c824865ea9caf85446bebb35153..c164955030b8e6d76cd9425d365c1f840e1fff5d 100644
--- a/ui/base/clipboard/clipboard.h
+++ b/ui/base/clipboard/clipboard.h
@@ -257,13 +257,20 @@ class UI_BASE_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
// several system-specific FormatTypes. For example, on Linux the CBF_TEXT
// ObjectType maps to "text/plain", "STRING", and several other formats. On
// windows it maps to CF_UNICODETEXT.
+ //
+ // The order below is the order in which data will be written to the
+ // clipboard, so more specific types must be listed before less specific
+ // types. For example, placing an image on the clipboard might cause the
+ // clipboard to contain a bitmap, HTML markup representing the image, a URL to
+ // the image, and the image's alt text. Having the types follow this order
+ // maximizes the amount of data that can be extracted by various programs.
enum ObjectType {
- CBF_TEXT,
+ CBF_SMBITMAP, // Bitmap from shared memory.
CBF_HTML,
CBF_RTF,
CBF_BOOKMARK,
+ CBF_TEXT,
CBF_WEBKIT,
- CBF_SMBITMAP, // Bitmap from shared memory.
CBF_DATA, // Arbitrary block of bytes.
};
@@ -274,16 +281,16 @@ class UI_BASE_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
//
// Key Arguments Type
// -------------------------------------
- // CBF_TEXT text char array
+ // CBF_SMBITMAP bitmap A pointer to a SkBitmap. The caller must ensure
+ // the SkBitmap remains live for the duration of
+ // the WriteObjects call.
// CBF_HTML html char array
// url* char array
// CBF_RTF data byte array
// CBF_BOOKMARK html char array
// url char array
+ // CBF_TEXT text char array
// CBF_WEBKIT none empty vector
- // CBF_SMBITMAP bitmap A pointer to a SkBitmap. The caller must ensure
- // the SkBitmap remains live for the duration of
- // the WriteObjects call.
// CBF_DATA format char array
// data byte array
typedef std::vector<char> ObjectMapParam;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698