Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: extensions/common/mojo/stash.mojom

Issue 648853007: Add handle waiting to StashBackend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/browser/mojo/stash_backend_unittest.cc ('k') | extensions/extensions_tests.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module extensions; 5 module extensions;
6 6
7 // A stashed client object. This contains the serialized bytes and handles, 7 // A stashed client object. This contains the serialized bytes and handles,
8 // stored in |data| and |handles|, respectively, of a mojo struct of the 8 // stored in |data| and |handles|, respectively, of a mojo struct of the
9 // serialized representation of the client object. 9 // serialized representation of the client object.
10 struct StashedObject { 10 struct StashedObject {
11 // A client identifier for this stashed object. This is to allow the client to 11 // A client identifier for this stashed object. This is to allow the client to
12 // reconstitute the correct serialization struct from this StashedObject. 12 // reconstitute the correct serialization struct from this StashedObject.
13 string id; 13 string id;
14 14
15 // The serialized data of the serialization struct. 15 // The serialized data of the serialization struct.
16 array<uint8> data; 16 array<uint8> data;
17 17
18 // The handles contained within the serialization struct. 18 // The handles contained within the serialization struct.
19 array<handle> stashed_handles; 19 array<handle> stashed_handles;
20
21 // Whether to monitor |stashed_handles| and relaunch the client when a handle
22 // becomes readable.
23 bool monitor_handles = false;
20 }; 24 };
21 25
22 interface StashService { 26 interface StashService {
23 // Adds |stashed_objects| to the stash. StashedObjects are stored in memory in 27 // Adds |stashed_objects| to the stash. StashedObjects are stored in memory in
24 // the browser process for as long as the extension that owns them remains 28 // the browser process for as long as the extension that owns them remains
25 // enabled and the browser process runs. 29 // enabled and the browser process runs.
26 AddToStash(array<StashedObject> stashed_objects); 30 AddToStash(array<StashedObject> stashed_objects);
27 31
28 // Returns all stashed objects. 32 // Returns all stashed objects.
29 RetrieveStash() => (array<StashedObject> stash); 33 RetrieveStash() => (array<StashedObject> stash);
30 }; 34 };
OLDNEW
« no previous file with comments | « extensions/browser/mojo/stash_backend_unittest.cc ('k') | extensions/extensions_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698