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

Unified Diff: chrome/browser/media/router/mojo/media_controller.mojom

Issue 2724513002: (Not for review) Dummy C++ side Custom Controls implementation (Closed)
Patch Set: . Created 3 years, 10 months 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: chrome/browser/media/router/mojo/media_controller.mojom
diff --git a/chrome/browser/media/router/mojo/media_controller.mojom b/chrome/browser/media/router/mojo/media_controller.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..dd85d4d252bdf81198afd590f57026f59c45ed2d
--- /dev/null
+++ b/chrome/browser/media/router/mojo/media_controller.mojom
@@ -0,0 +1,36 @@
+// Copyright 2017 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 media_router.mojom;
+
+import "chrome/browser/media/router/mojo/media_status.mojom";
+
+// Interface for a controller to change the current state of a media content.
+// This interface should be kept free of details specific to Media Router, so
+// that it can be moved to the media namespace and be reused for other features
+// in the future.
+interface MediaController {
+ // Starts playing the media if it is paused. Is a no-op if not supported by
+ // the media or the media is already playing.
+ Play();
+ // Pauses the media if it is playing. Is a no-op if not supported by the media
+ // or the media is already paused.
+ Pause();
+ // Mutes the media if |mute| is true, and unmutes it if false. Is a no-op if
+ // not supported by the media.
+ SetMute(bool mute);
+ // Changes the current volume of the media, with 1 being the highest and 0
+ // being the lowest/no sound. Does not change the (un)muted state of the
+ // media. Is a no-op if not supported by the media.
+ SetVolume(float volume);
+ // Sets the current playback position in milliseconds. |time| must be less
+ // than or equal to the duration of the media. Is a no-op if the media
+ // doesn't support seeking.
+ Seek(uint32 time);
+ // Sets the observer to be notified whenever there is a change in the status
+ // of the media. There can be at most one observer at a time, and it will be
+ // overwritten each time this method is called.
+ // TODO(takumif): Consider allowing multiple observers to be registered.
+ SetObserver(MediaStatusObserver observer);
+};
« no previous file with comments | « chrome/browser/media/router/media_status.cc ('k') | chrome/browser/media/router/mojo/media_route_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698