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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/public/interfaces/cast_config.mojom
diff --git a/ash/public/interfaces/cast_config.mojom b/ash/public/interfaces/cast_config.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..3a6392639c38041658a10a446c999ec0e9ae8b19
--- /dev/null
+++ b/ash/public/interfaces/cast_config.mojom
@@ -0,0 +1,62 @@
+// Copyright 2016 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 ash.mojom;
+
+struct CastSink {
+ string id;
+ string name;
+ string domain;
+};
+
+enum ContentSource {
+ UNKNOWN,
+ TAB,
+ DESKTOP
+};
+
+struct CastRoute {
+ string id;
+ string title;
+
+ // Is the activity source this computer? ie, are we mirroring the display?
+ bool is_local_source = false;
+
+ // What is source of the content? For example, we could be DIAL casting a
+ // tab or mirroring the entire desktop.
+ ContentSource content_source = ContentSource.UNKNOWN;
+};
+
+struct SinkAndRoute {
+ CastSink sink;
+ CastRoute route;
+};
+
+// Allows clients (e.g. Chrome browser) to interface with the cast item in the
+// system tray.
+interface CastConfig {
+ // Sets the client interface. This client interface will receive commands from
+ // ash and provide OnDevicesUpdated() calls.
+ SetClient(associated CastConfigClient client);
+
+ // Invoked whenever there is new sink or route information available.
+ OnDevicesUpdated(array<SinkAndRoute> device);
+};
+
+// This delegate allows the UI code in ash, e.g. |TrayCastDetailedView|,
+// to access the cast system.
+//
+// TODO(erg): Eventually, this should no longer be exported by chrome, but
+// should be exported by a separate cast service.
+interface CastConfigClient {
+ // Request fresh data from the backend. When the data is available, all
+ // registered observers will get called.
+ RequestDeviceRefresh();
+
+ // Initiate a casting session to |sink|.
+ CastToSink(CastSink sink);
+
+ // A user-initiated request to stop the given cast session.
+ StopCasting(CastRoute route);
+};
« 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