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

Unified Diff: content/common/presentation/presentation_service.mojom

Issue 1024903003: [Presentation API] Plumbing of |onstatechange| from the Mojo service to the public/platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: content/common/presentation/presentation_service.mojom
diff --git a/content/common/presentation/presentation_service.mojom b/content/common/presentation/presentation_service.mojom
index 99ab552c37f40c542d3588b9c14c0189abb8df32..8de73168040d7c7706f5b46174e755aa3084ffc0 100644
--- a/content/common/presentation/presentation_service.mojom
+++ b/content/common/presentation/presentation_service.mojom
@@ -9,6 +9,11 @@ struct PresentationSessionInfo {
string id;
};
+enum PresentationSessionState {
+ CONNECTED,
+ DISCONNECTED
+};
+
enum PresentationErrorType {
NO_AVAILABLE_SCREENS,
SESSION_REQUEST_CANCELLED,
@@ -72,4 +77,12 @@ interface PresentationService {
// Called when closeSession() is called by the frame.
CloseSession(string presentation_url, string presentation_id);
+
+ // Called when the frame is ready to process the next state
+ // change. Returns the last session state if it’s
+ // changed since the last time the callback was called. Might
Peter Beverloo 2015/03/20 19:13:39 nit: advocating for 70-character line length limit
whywhat 2015/03/24 19:20:57 Copy paste from the doc about the Mojo interface.
+ // cause the event fired with the initial state change.
+ ListenForSessionStateChange()
mark a. foltz 2015/03/20 21:22:43 GetSessionState() for consistency with GetScreenAv
whywhat 2015/03/24 19:20:57 But this is consistent with ListenForDefaultSessio
mark a. foltz 2015/03/24 22:53:34 SGTM
+ => (PresentationSessionInfo sessionInfo,
+ PresentationSessionState newState);
};

Powered by Google App Engine
This is Rietveld 408576698