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

Side by Side Diff: components/clipboard/public/interfaces/clipboard.mojom

Issue 1978763003: Readd the clipboard service and get it compiling again. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add OWNERS to the interfaces directory. Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « components/clipboard/public/interfaces/OWNERS ('k') | components/clipboard/test_manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
sky 2016/05/14 00:01:11 2016
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module mojo;
6
7 interface Clipboard {
sky 2016/05/14 00:01:11 It seems like only code that has UI should be inte
8 enum Type {
9 COPY_PASTE = 0,
10 SELECTION = 1,
11 DRAG = 2
12 };
13
14 // Mime type constants
15 const string MIME_TYPE_TEXT = "text/plain";
16 const string MIME_TYPE_HTML = "text/html";
17 const string MIME_TYPE_URL = "text/url";
18
19 // Returns a sequence number which uniquely identifies clipboard state.
20 // Clients are able to assume that the clipboard contents are unchanged as
21 // long as this number has not changed. This number is monotonically
22 // increasing, is increased when the clipboard state changes, and is
23 // provided by Windows, Linux, and Mac.
24 GetSequenceNumber(Type clipboard_type) => (uint64 sequence);
25
26 // Returns the available mime types. (Note: the chrome interface has a
27 // |contains_filenames| parameter here, but it appears to always be set
28 // to false.)
29 GetAvailableMimeTypes(Type clipboard_types) => (array<string> types);
sky 2016/05/14 00:01:11 I would expect the read functions to take a sequen
30
31 // Returns the data associated with a Mime type, returning NULL if that data
32 // doesn't exist. Note: because of the inherit raciness of clipboard access,
33 // this may return NULL even if you just verified that it exists with
34 // GetAvailableFormatMimeTypes(). We don't want to provide one API to return
35 // the entire clipboard state because the combined size of the clipboard can
36 // be megabytes, especially when image data is involved.
37 ReadMimeType(Type clipboard_type, string mime_type) => (array<uint8>? data);
38
39 // Writes a set of mime types to the clipboard. This will increment the
40 // sequence number. In the case of an empty or null map, this will just
41 // clear the clipboard.
42 WriteClipboardData(Type clipboard_type, map<string, array<uint8>>? data);
sky 2016/05/14 00:01:11 I think this should callback with the actual seque
43 };
OLDNEW
« no previous file with comments | « components/clipboard/public/interfaces/OWNERS ('k') | components/clipboard/test_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698