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

Unified Diff: ash/public/interfaces/cast_config.mojom

Issue 2525563003: mash: Change CastConfigDelegate to a mojoified CastConfigClient. (Closed)
Patch Set: Now for the external apitests as well. 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
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..c7255a083520c1a816f47085b2855ac4f07549e6
--- /dev/null
+++ b/ash/public/interfaces/cast_config.mojom
@@ -0,0 +1,60 @@
+// 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 {
James Cook 2016/11/30 22:16:38 Can you document this? (I know the original is und
Elliot Glaysher 2016/12/01 23:59:12 I cannot. I don't know what it is.
+ string id;
+ string name;
+ string domain;
+};
+
+enum ContentSource {
+ UNKNOWN,
+ TAB,
+ DESKTOP
+};
+
+struct CastRoute {
James Cook 2016/11/30 22:16:38 ditto
+ 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;
+};
+
+// Interface implemented by ash to listen for when devices become available.
+interface CastConfigObserver {
+ // 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 {
James Cook 2016/11/30 22:16:38 As mentioned in person, I think we should have an
Elliot Glaysher 2016/12/01 23:59:13 Done.
+ // 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);
+
+ // Observers are immediately notified of the current shelf states when added.
James Cook 2016/11/30 22:16:38 shelf states? system tray / system menu state? s
Elliot Glaysher 2016/12/01 23:59:12 Done.
+ AddObserver(associated CastConfigObserver observer);
+};

Powered by Google App Engine
This is Rietveld 408576698