| Index: components/mus/public/interfaces/clipboard.mojom
|
| diff --git a/components/mus/public/interfaces/clipboard.mojom b/components/mus/public/interfaces/clipboard.mojom
|
| index 201a7c3dea5ecbeeff12a0fb4fb894b8a4080778..0e7c67581a94e5e1a448925c3b3641f834cd8db9 100644
|
| --- a/components/mus/public/interfaces/clipboard.mojom
|
| +++ b/components/mus/public/interfaces/clipboard.mojom
|
| @@ -3,14 +3,6 @@
|
| // found in the LICENSE file.
|
|
|
| module mus.mojom;
|
| -
|
| -const string kMimeTypeHTML = "text/html";
|
| -const string kMimeTypeMozillaURL = "text/x-moz-url";
|
| -const string kMimeTypePNG = "image/png";
|
| -const string kMimeTypeRTF = "text/rtf";
|
| -const string kMimeTypeText = "text/plain";
|
| -const string kMimeTypeURIList = "text/uri-list";
|
| -const string kMimeTypeURL = "text/url";
|
|
|
| interface Clipboard {
|
| enum Type {
|
| @@ -18,6 +10,11 @@
|
| SELECTION = 1,
|
| 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
|
| @@ -32,14 +29,17 @@
|
| GetAvailableMimeTypes(Type clipboard_types)
|
| => (uint64 sequence, array<string> types);
|
|
|
| - // Returns the current data associated with the requested Mime type.
|
| + // 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|.
|
| //
|
| // 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]
|
| - ReadClipboardData(Type clipboard_type, string mime_type)
|
| - => (uint64 sequence, array<uint8>? data);
|
| + ReadMimeType(uint64 sequence, Type clipboard_type, string mime_type)
|
| + => (bool sequence_valid, 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,
|
|
|