summaryrefslogtreecommitdiffstats
path: root/extensions/common/mojo
diff options
context:
space:
mode:
authorsammc <sammc@chromium.org>2014-10-23 18:46:40 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-24 01:47:03 +0000
commit680be408457f4272b468e72468eb22e1c0f0b67a (patch)
tree9b0581a0cdd4faf690443e1e28030cd64d99e864 /extensions/common/mojo
parent51307ca7a09f7be8da0572a7eff2b8e47bdb8d78 (diff)
downloadchromium_src-680be408457f4272b468e72468eb22e1c0f0b67a.zip
chromium_src-680be408457f4272b468e72468eb22e1c0f0b67a.tar.gz
chromium_src-680be408457f4272b468e72468eb22e1c0f0b67a.tar.bz2
Move stash_backend into extensions/browser/mojo.
Review URL: https://codereview.chromium.org/638273004 Cr-Commit-Position: refs/heads/master@{#301024}
Diffstat (limited to 'extensions/common/mojo')
-rw-r--r--extensions/common/mojo/stash.mojom32
1 files changed, 32 insertions, 0 deletions
diff --git a/extensions/common/mojo/stash.mojom b/extensions/common/mojo/stash.mojom
new file mode 100644
index 0000000..734697b
--- /dev/null
+++ b/extensions/common/mojo/stash.mojom
@@ -0,0 +1,32 @@
+// Copyright 2014 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 extensions {
+
+// A stashed client object. This contains the serialized bytes and handles,
+// stored in |data| and |handles|, respectively, of a mojo struct of the
+// serialized representation of the client object.
+struct StashedObject {
+ // A client identifier for this stashed object. This is to allow the client to
+ // reconstitute the correct serialization struct from this StashedObject.
+ string id;
+
+ // The serialized data of the serialization struct.
+ array<uint8> data;
+
+ // The handles contained within the serialization struct.
+ array<handle> stashed_handles;
+};
+
+interface StashService {
+ // Adds |stashed_objects| to the stash. StashedObjects are stored in memory in
+ // the browser process for as long as the extension that owns them remains
+ // enabled and the browser process runs.
+ AddToStash(array<StashedObject> stashed_objects);
+
+ // Returns all stashed objects.
+ RetrieveStash() => (array<StashedObject> stash);
+};
+
+}