summaryrefslogtreecommitdiffstats
path: root/components/arc/common/clipboard.mojom
blob: a663eead2c1470afba3967649ee7c6581aadef08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module arc;

interface ClipboardHost {
  // Tells the host to change its content, usually when the user initiates
  // a 'copy' action.
  SetTextContent(string text);

  // Tells the host to return its content, usually when the user initiates
  // a 'paste' action or when the instance needs to re-sync its clipboard
  // content with the host.
  GetTextContent();
};

interface ClipboardInstance {
  // Establishes full-duplex communication with the host.
  Init(ClipboardHost host_ptr);

  // Pass the result of ClipboardHost.GetTextContent().
  OnGetTextContent(string returnedText);
};