Chromium Code Reviews| Index: components/mus/public/interfaces/clipboard.mojom |
| diff --git a/components/mus/public/interfaces/clipboard.mojom b/components/mus/public/interfaces/clipboard.mojom |
| index 0e7c67581a94e5e1a448925c3b3641f834cd8db9..b483cab31a18a67604869f16a026920d133614bc 100644 |
| --- a/components/mus/public/interfaces/clipboard.mojom |
| +++ b/components/mus/public/interfaces/clipboard.mojom |
| @@ -4,6 +4,14 @@ |
| module mus.mojom; |
| +const string MIME_TYPE_HTML = "text/html"; |
| +const string MIME_TYPE_MOZ_URL = "text/x-moz-url"; |
| +const string MIME_TYPE_PNG = "image/png"; |
| +const string MIME_TYPE_RTF = "text/rtf"; |
| +const string MIME_TYPE_TEXT = "text/plain"; |
| +const string MIME_TYPE_URI_LIST = "text/uri-list"; |
| +const string MIME_TYPE_URL = "text/url"; |
| + |
| interface Clipboard { |
| enum Type { |
| COPY_PASTE = 0, |
| @@ -11,11 +19,6 @@ interface Clipboard { |
| DRAG = 2 |
| }; |
| - // Mime type constants |
| - const string MIME_TYPE_TEXT = "text/plain"; |
| - const string MIME_TYPE_HTML = "text/html"; |
| - const string MIME_TYPE_URL = "text/url"; |
| - |
| // Returns a sequence number which uniquely identifies clipboard state. |
| // Clients are able to assume that the clipboard contents are unchanged as |
| // long as this number has not changed. This number is monotonically |
| @@ -29,17 +32,14 @@ interface Clipboard { |
| GetAvailableMimeTypes(Type clipboard_types) |
| => (uint64 sequence, array<string> types); |
| - // If the current sequence number is still |sequence|, returns true and the |
| - // current data associated with the requested Mime type. When the sequence |
| - // number has changed (because new data has been written to the clipboard), |
| - // returns false and null for |data|. |
| + // Returns the current data associated with the requested Mime type. |
| // |
| // We don't want to provide one API to return the entire clipboard state |
| // because the combined size of the clipboard can be megabytes, especially |
| // when image data is involved. |
| [Sync] |
| - ReadMimeType(uint64 sequence, Type clipboard_type, string mime_type) |
| - => (bool sequence_valid, array<uint8>? data); |
| + ReadMimeType(Type clipboard_type, string mime_type) |
|
sky
2016/05/26 23:10:26
WDYT of renaming to ReadClipboardData? That better
Elliot Glaysher
2016/05/31 17:01:40
Done.
dcheng
2016/05/31 17:46:46
I haven't had time to look over this patch yet, bu
|
| + => (array<uint8>? data); |
| // Writes a set of mime types to the clipboard. This will increment the |
| // sequence number and return that. In the case of an empty or null map, |