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

Side by Side Diff: ash/public/interfaces/cast_config.mojom

Issue 2525563003: mash: Change CastConfigDelegate to a mojoified CastConfigClient. (Closed)
Patch Set: move dep to chromeos section Created 4 years 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 | « ash/public/interfaces/BUILD.gn ('k') | ash/test/tray_cast_test_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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 module ash.mojom;
6
7 struct CastSink {
8 string id;
9 string name;
10 string domain;
11 };
12
13 enum ContentSource {
14 UNKNOWN,
15 TAB,
16 DESKTOP
17 };
18
19 struct CastRoute {
20 string id;
21 string title;
22
23 // Is the activity source this computer? ie, are we mirroring the display?
24 bool is_local_source = false;
25
26 // What is source of the content? For example, we could be DIAL casting a
27 // tab or mirroring the entire desktop.
28 ContentSource content_source = ContentSource.UNKNOWN;
29 };
30
31 struct SinkAndRoute {
32 CastSink sink;
33 CastRoute route;
34 };
35
36 // Allows clients (e.g. Chrome browser) to interface with the cast item in the
37 // system tray.
38 interface CastConfig {
39 // Sets the client interface. This client interface will receive commands from
40 // ash and provide OnDevicesUpdated() calls.
41 SetClient(associated CastConfigClient client);
42
43 // Invoked whenever there is new sink or route information available.
44 OnDevicesUpdated(array<SinkAndRoute> device);
45 };
46
47 // This delegate allows the UI code in ash, e.g. |TrayCastDetailedView|,
48 // to access the cast system.
49 //
50 // TODO(erg): Eventually, this should no longer be exported by chrome, but
51 // should be exported by a separate cast service.
52 interface CastConfigClient {
53 // Request fresh data from the backend. When the data is available, all
54 // registered observers will get called.
55 RequestDeviceRefresh();
56
57 // Initiate a casting session to |sink|.
58 CastToSink(CastSink sink);
59
60 // A user-initiated request to stop the given cast session.
61 StopCasting(CastRoute route);
62 };
OLDNEW
« no previous file with comments | « ash/public/interfaces/BUILD.gn ('k') | ash/test/tray_cast_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698