Chromium Code Reviews| Index: services/android/intent.mojom |
| diff --git a/services/android/intent.mojom b/services/android/intent.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..50b83c574f0b74a096959e49317c05cd32c73569 |
| --- /dev/null |
| +++ b/services/android/intent.mojom |
| @@ -0,0 +1,24 @@ |
| +// Copyright 2015 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. |
| + |
| +[JavaPackage="org.chromium.mojo.intent"] |
| +module intent; |
| + |
| +// Service to interract with the android's intents. |
|
ppi
2015/04/08 10:42:49
s/the android's intents/android intents/
ppi
2015/04/08 10:42:49
s/interract/interact/
qsr
2015/04/08 11:03:23
Done.
qsr
2015/04/08 11:03:23
Done.
|
| +interface IntentManager { |
|
ppi
2015/04/08 10:42:49
wdyt about calling this IntentReceiverManager and
qsr
2015/04/08 11:03:23
Done.
|
| + // This methods takes an |IntentReceiver| and return a serialized intent. |
|
ppi
2015/04/08 10:42:49
s/return/returns/
ppi
2015/04/08 10:42:49
s/methods/method/
qsr
2015/04/08 11:03:23
Done.
qsr
2015/04/08 11:03:23
Done.
|
| + // The serialized intent can be deserialized using an android parcel. The |
| + // caller can then transform this intent into a PendingIntent using |
| + // |PendingIntent#getService| and send it to another android application. |
| + // Whenever the pending intent is executed, the receiver will be called with |
| + // the content of the received intent. To be noted: this will fail if the |
| + // received intent is active (contains either a Binder, or a file |
|
ppi
2015/04/08 10:42:49
drop the comma after Binder
qsr
2015/04/08 11:03:23
Done.
|
| + // descriptor). |
| + RegisterReceiver(IntentReceiver receiver) => (array<uint8> intent); |
| +}; |
| + |
| +// Receiver interface, to be used with |IntentManager.RegisterReceiver|. |
| +interface IntentReceiver { |
| + OnIntent(array<uint8> intent); |
| +}; |