Index: content/common/presentation_service.mojom |
diff --git a/content/common/presentation_service.mojom b/content/common/presentation_service.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..da8f7292000b27a967eb9eb9004fe08e75d23461 |
--- /dev/null |
+++ b/content/common/presentation_service.mojom |
@@ -0,0 +1,54 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
Peter Beverloo
2015/01/07 15:13:00
nit: 2015. Elsewhere too.
whywhat
2015/01/07 18:02:59
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+module presentation; |
+ |
+import "content/common/presentation_session.mojom"; |
+ |
+[Client=PresentationServiceClient] |
+interface PresentationService { |
Peter Beverloo
2015/01/07 15:13:00
Nothing provides this service yet, right? I very m
whywhat
2015/01/07 18:02:59
Done.
|
+ /* NavigatorPresentation idl */ |
+ |
+ // when the default presentation url/id are parsed first and/or when the frame |
Peter Beverloo
2015/01/07 15:13:00
While I'm not the appropriate reviewer for Mojo st
whywhat
2015/01/07 18:02:59
Done.
|
+ // changes at least one of the two. |
+ SetDefaultPresentation( |
Peter Beverloo
2015/01/07 15:13:01
This is not being used yet.
The same goes for Def
whywhat
2015/01/07 18:02:59
Removed from this CL.
|
+ string default_presentation_url, |
+ string? default_presenation_id); |
+ |
+ // when ondefaultpresentationstarted listener added/removed; |
+ // indicates if the frame is ready to handle the default presentation session |
+ // started by the user agent or not |
+ DefaultPresentationListenerChanged(bool is_present); |
+ |
+ // when onavailablechange listener added; |
+ // might start device discovery |
+ AddDeviceAvailabilityListener(); |
+ |
+ // when onavailablechange listener removed; |
+ // might stop device discovery |
+ RemoveDeviceAvailabilityListener(); |
+ |
+ // when startSession() is called |
+ // the result callback will return the presentation id (since |
+ // it can be provided by the UA) and the session identified to |
+ // use with the service going forward |
+ StartSession( |
+ string presentation_url, |
+ string? presentation_id, |
+ PresentationSession& session) => (bool success, string? error); |
+ |
+ // when joinSession() is called; same result callback as above |
+ JoinSession( |
+ string presentation_url, |
+ string? presentation_id, |
+ PresentationSession& session) => (bool success, string? error); |
+}; |
+ |
+interface PresentationServiceClient { |
+ // When to fire onavailablechange event |
+ DeviceAvailabilityChanged(bool available); |
+ |
+ // When to fire ondefaultpresentation event |
+ DefaultPresentationStarted(PresentationSession? session); |
+}; |