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

Side by Side Diff: mojo/services/camera/interfaces/camera.mojom

Issue 1457383005: Require an explicit ServiceName annotation for interfaces in Java (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 [DartPackage="mojo_services"] 5 [DartPackage="mojo_services"]
6 module mojo; 6 module mojo;
7 7
8 struct Photo { 8 struct Photo {
9 // A string to uniquely identify an instance of a |Photo|. This can be used 9 // A string to uniquely identify an instance of a |Photo|. This can be used
10 // to de-duplicate photos over multiple runs on the camera roll. 10 // to de-duplicate photos over multiple runs on the camera roll.
11 string unique_id; 11 string unique_id;
12 12
13 // Stream to read contents of the photo from. 13 // Stream to read contents of the photo from.
14 handle<data_pipe_consumer> content; 14 handle<data_pipe_consumer> content;
15 }; 15 };
16 16
17 // |CameraRollService| provides access to the device's camera roll. 17 // |CameraRollService| provides access to the device's camera roll.
18 // The camera roll is exposed as a snapshot of all photos available as a list. 18 // The camera roll is exposed as a snapshot of all photos available as a list.
19 // The head of the list (element with index 0) is a photo with the latest 19 // The head of the list (element with index 0) is a photo with the latest
20 // timestamp and subsequent elements are in decreasing order of timestamp. 20 // timestamp and subsequent elements are in decreasing order of timestamp.
21 [ServiceName="mojo::CameraRollService"]
21 interface CameraRollService { 22 interface CameraRollService {
22 // Updates the snapshot of all photos available. Photos might have been added 23 // Updates the snapshot of all photos available. Photos might have been added
23 // or removed after the service was started or |Update| was called. 24 // or removed after the service was started or |Update| was called.
24 Update(); 25 Update();
25 // Get the number of photos available in the current snapshot. 26 // Get the number of photos available in the current snapshot.
26 GetCount() => (uint32 num_photos); 27 GetCount() => (uint32 num_photos);
27 // Get the photo from the current snapshot at |index|. null will be returned 28 // Get the photo from the current snapshot at |index|. null will be returned
28 // if such an index is out-of-bounds. 29 // if such an index is out-of-bounds.
29 GetPhoto(uint32 index) => (Photo? photo); 30 GetPhoto(uint32 index) => (Photo? photo);
30 }; 31 };
31 32
32 // |CameraService| provides access to the device's camera video stream. 33 // |CameraService| provides access to the device's camera video stream.
34 [ServiceName="mojo::CameraService"]
33 interface CameraService { 35 interface CameraService {
34 // Returns the most recent frame captured by the device's camera 36 // Returns the most recent frame captured by the device's camera
35 // in preview mode. 37 // in preview mode.
36 GetLatestFrame() => (handle<data_pipe_consumer>? content); 38 GetLatestFrame() => (handle<data_pipe_consumer>? content);
37 }; 39 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698