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

Side by Side Diff: content/common/presentation/presentation_service.mojom

Issue 978543002: [Presentation API] Plumbing the |defaultpresentationstart| event from Blink to browser/Mojo. (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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module presentation; 5 module presentation;
6 6
7 import "presentation_session.mojom"; 7 import "presentation_session.mojom";
8 8
9 struct PresentationSessionInfo { 9 struct PresentationSessionInfo {
10 PresentationSession session; 10 PresentationSession session;
(...skipping 21 matching lines...) Expand all
32 // May start discovery of the presentation screens. The implementation might 32 // May start discovery of the presentation screens. The implementation might
33 // stop discovery once there are no active calls to GetScreenAvailability. 33 // stop discovery once there are no active calls to GetScreenAvailability.
34 // |presentation_url| can be specified to help the implementation to filter 34 // |presentation_url| can be specified to help the implementation to filter
35 // out incompatible screens. 35 // out incompatible screens.
36 GetScreenAvailability(string? presentation_url) => (bool available); 36 GetScreenAvailability(string? presentation_url) => (bool available);
37 37
38 // Called when the frame no longer listens to the 38 // Called when the frame no longer listens to the
39 // |availablechange| event. 39 // |availablechange| event.
40 OnScreenAvailabilityListenerRemoved(); 40 OnScreenAvailabilityListenerRemoved();
41 41
42 // Called when |ondefaultpresentationstarted| listener is added or the page
43 // is ready to listen to the next such event. Indicates the frame is ready
44 // to handle the default presentation started by the user agent.
45 WaitForDefaultPresentation()
Peter Beverloo 2015/03/03 21:40:40 ListenToDefaultPresentation perhaps? Wait* in nami
whywhat 2015/03/05 20:26:14 Done.
46 => (PresentationSessionInfo defaultSessionInfo);
47
48 // Called when the frame no longer listens to the
49 // |ondefaultpresentationstarted| event.
50 OnDefaultPresentationListenerRemoved();
51
42 // Called when startSession() is called by the frame. The result callback 52 // Called when startSession() is called by the frame. The result callback
43 // will return a non-null and valid PresentationSessionInfo if starting the 53 // will return a non-null and valid PresentationSessionInfo if starting the
44 // session succeeded, or null with a PresentationError if starting the 54 // session succeeded, or null with a PresentationError if starting the
45 // session failed. 55 // session failed.
46 // The presentation id is always returned along with the initialized 56 // The presentation id is always returned along with the initialized
47 // session on success. 57 // session on success.
48 // If the UA identifies a matching session (same presentation url and id), 58 // If the UA identifies a matching session (same presentation url and id),
49 // the user may choose this existing session and the page will join it 59 // the user may choose this existing session and the page will join it
50 // rather than get a new one. An empty presentation id means that the 60 // rather than get a new one. An empty presentation id means that the
51 // UA will generate the presentation id. 61 // UA will generate the presentation id.
52 StartSession(string presentation_url, string? presentation_id) 62 StartSession(string presentation_url, string? presentation_id)
53 => (PresentationSessionInfo? sessionInfo, PresentationError? error); 63 => (PresentationSessionInfo? sessionInfo, PresentationError? error);
54 64
55 // Called when joinSession() is called by the frame. The result callback 65 // Called when joinSession() is called by the frame. The result callback
56 // works the same as for the method above. JoinSession will join a known 66 // works the same as for the method above. JoinSession will join a known
57 // session (i.e. when the page navigates or the user opens another tab) 67 // session (i.e. when the page navigates or the user opens another tab)
58 // silently and without user action. 68 // silently and without user action.
59 JoinSession(string presentation_url, string? presentation_id) 69 JoinSession(string presentation_url, string? presentation_id)
60 => (PresentationSessionInfo? sessionInfo, PresentationError? error); 70 => (PresentationSessionInfo? sessionInfo, PresentationError? error);
61 }; 71 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698