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

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

Issue 2563643003: mash: Change the MediaDelegate to a Media{Controller,Client}. (Closed)
Patch Set: Comment fixes 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/shell/shell_delegate_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/public/interfaces/media.mojom
diff --git a/ash/public/interfaces/media.mojom b/ash/public/interfaces/media.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..bf56de4f0c73bb4fe4c47661d5d17ac742dfee29
--- /dev/null
+++ b/ash/public/interfaces/media.mojom
@@ -0,0 +1,42 @@
+// 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;
+
+// Describes whether media is currently being captured.
+enum MediaCaptureState {
+ NONE = 0,
+ AUDIO = 1,
+ VIDEO = 2,
+ AUDIO_VIDEO = 3
+};
+
+// Allows clients (e.g. Chrome browser) to interface with the ash media
+// indicators.
+interface MediaController {
+ // Sets the client interface.
+ SetClient(associated MediaClient client);
+
+ // Called when the media capture state changes on the client, or in response
+ // to a RequestCaptureState() request. Returns an array of MediaCaptureState
+ // by index of the shell content. (These indexes are unstable, but are
+ // unlikely to change in practice, see comments in chrome's MediaClient::
+ // RequestCaptureState()).
+ NotifyCaptureState(array<MediaCaptureState> state);
+};
+
+// This delegate allows the UI code in ash to forward UI commands.
+interface MediaClient {
+ // Handles the Next Track Media shortcut key.
+ HandleMediaNextTrack();
+
+ // Handles the Play/Pause Toggle Media shortcut key.
+ HandleMediaPlayPause();
+
+ // Handles the Previous Track Media shortcut key.
+ HandleMediaPrevTrack();
+
+ // Requests that the client resends the NotifyMediaCaptureChanged() message.
+ RequestCaptureState();
+};
« no previous file with comments | « ash/public/interfaces/BUILD.gn ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698