summaryrefslogtreecommitdiff
path: root/chromium/components/arc/common/intent_helper.mojom
blob: 57b1d499a4f75b34f57f543dbd08e20ea41ad569 (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
25
26
27
28
// 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;

// Handles intents from ARC in Chrome.
interface IntentHelperHost {
  // Opens the url with Chrome for Chrome OS.
  OnOpenUrl@0(string url);
};

// Sends intents to ARC on behalf of Chrome.
interface IntentHelperInstance {
  // Establishes full-duplex communication with the host.
  Init@0(IntentHelperHost host_ptr);

  // Send an Android broadcast message to the Android package and class
  // specified.  Data can be sent as extras by including a JSON map string which
  // will be automatically converted to a bundle accessible by the receiver.
  //
  // Note: Broadcasts can only be sent to whitelisted packages.  Packages can be
  // added to the whitelist in ArcBridgeService.java in the Android source.
  [MinVersion=1] SendBroadcast@1(string action,
                                 string package_name,
                                 string cls,
                                 string extras);
};