OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 [JavaPackage="org.chromium.mojo.intent"] |
| 6 module intent_receiver; |
| 7 |
| 8 // Service to interact with android intents. |
| 9 interface IntentReceiverManager { |
| 10 // This method takes an |IntentReceiver| and returns a serialized intent. |
| 11 // The serialized intent can be deserialized using an android parcel. The |
| 12 // caller can then transform this intent into a PendingIntent using |
| 13 // |PendingIntent#getService| and send it to another android application. |
| 14 // Whenever the pending intent is executed, the receiver will be called with |
| 15 // the content of the received intent. To be noted: this will fail if the |
| 16 // received intent is active (contains either a Binder or a file descriptor). |
| 17 RegisterReceiver(IntentReceiver receiver) => (array<uint8> intent); |
| 18 }; |
| 19 |
| 20 // Receiver interface, to be used with |
| 21 // |IntentReceiverManager.RegisterReceiver|. |
| 22 interface IntentReceiver { |
| 23 OnIntent(array<uint8> intent); |
| 24 }; |
OLD | NEW |