Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to PR #277 that addresses issues #254, #269, #273 #278

Merged
merged 4 commits into from
Apr 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 68 additions & 32 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,22 @@ <h3>
connections</a> in this set share the same <a>presentation URL</a>
and <a>presentation identifier</a>.
</p>
<p>
In a <a>receiving browsing context</a>, the <dfn>presentation
controllers monitor</dfn>, initially set to <code>null</code>,
exposes the current <a>set of presentation controllers</a> to the
receiving application. The <a>presentation controllers monitor</a> is
represented by a <a>PresentationConnectionList</a>.
</p>
<p>
In a <a>receiving browsing context</a>, the <dfn>presentation
controllers promise</dfn>, which is initially set to
<code>null</code>, exposes the <a>presentation controllers
monitor</a> once the initial <a>presentation connection</a> is
established. The <a>presentation controllers promise</a> is
represented by a <a>Promise</a> that holds the <a>presentation
controllers monitor</a>.
</p>
</section>
<section>
<h3>
Expand Down Expand Up @@ -1275,9 +1291,10 @@ <h4>
<var>A</var> is a live <a>PresentationAvailability</a> object;
</li>
<li>
<var>availabilityUrl</var> is the parameter passed to
<code><a for="PresentationRequest">getAvailability</a>()</code>
to create <var>A</var>.
<var>availabilityUrl</var> is the <a>presentation request URL</a>
when <code><a for=
"PresentationRequest">getAvailability</a>()</code> is called to
create <var>A</var>.
</li>
</ol>
</section>
Expand Down Expand Up @@ -1523,10 +1540,9 @@ <h4>
A <a>receiving user agent</a> <a>fires</a> a <a>trusted event</a>
named <a for="PresentationConnectionList">connectionavailable</a>
on a <a>PresentationReceiver</a> when an incoming connection is
created. It is fired at the <a>PresentationConnectionList</a>
instance associated with the <a>PresentationReceiver</a> instance,
using the <a>PresentationConnectionAvailableEvent</a> interface,
with the <a for=
created. It is fired at the <a>presentation controllers
monitor</a>, using the <a>PresentationConnectionAvailableEvent</a>
interface, with the <a for=
"PresentationConnectionAvailableEvent">connection</a> attribute set
to the <a><code>PresentationConnection</code></a> object that was
created. The event is fired for all connections that are created
Expand Down Expand Up @@ -2286,25 +2302,30 @@ <h3>
attribute MUST return the result of running the following steps:
</p>
<ol>
<li>If there is already an unsettled <a>Promise</a> <var>P</var> from
a previous call to get the <a for=
"PresentationReceiver">connectionList</a> attribute for the same <a>
PresentationReceiver</a> object, return <var>P</var> and abort all
remaining steps.
<li>If the <a>presentation controllers promise</a> is not
<code>null</code>, return the <a>presentation controllers promise</a>
and abort all remaining steps.
</li>
<li>Let <var>P</var> be a new <a>Promise</a>.
<li>Otherwise, let the <a>presentation controllers promise</a> be a
new <a>Promise</a>.
</li>
<li>Return <var>P</var>, but continue running these steps <a>in
parallel</a>.
<li>Return the <a>presentation controllers promise</a>, but continue
running these steps <a>in parallel</a>.
</li>
<li>Let <var>list</var> be a new <a>PresentationConnectionList</a>.
</li>
<li>Resolve <var>P</var> with <var>list</var>.
<li>If the <a>set of presentation controllers</a> contains at least
one <a>presentation connection</a>, then run the following steps:
<ol>
<li>Let the <a>presentation controllers monitor</a> be a new <a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to be explicit that the connections property of the new PresentationConnectionList should be populated with the contents of the presentation controllers monitor.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I note that getting the connections property of the new PresentationConnectionList de facto returns "the non-terminated set of presentation connections in the set of presentation controllers":
https://w3c.github.io/presentation-api/#dom-presentationconnectionlist-connections

That quoted sentence could perhaps be moved here, as the section that describes the PresentationConnectionList interface should probably remain generic and not assume that there is going to be only one PresentationConnectionList instance per browsing context.

PresentationConnectionList</a>.
</li>
<li>
<a>Resolve</a> the <a>presentation controllers promise</a> with
the <a>presentation controllers monitor</a>.
</li>
</ol>
</li>
<li>If the <a>user agent</a> is not <a>monitoring incoming
presentation connections</a>, start <a>monitoring incoming
presentation connections</a> from <a>controlling browsing
contexts</a>.
<li>Otherwise, the <a>presentation controllers promise</a> remains
unsettled.
</li>
</ol>
<section>
Expand Down Expand Up @@ -2418,16 +2439,31 @@ <h4>
</li>
<li>Add <var>S</var> to the <a>set of presentation controllers</a>.
</li>
<li>
<a>Queue a task</a> to <a>fire</a> a <a>trusted event</a> with
the name <a for=
"PresentationConnectionList">connectionavailable</a>, that uses
the <a>PresentationConnectionAvailableEvent</a> interface, with
the <a for="PresentationConnectionAvailableEvent">connection</a>
attribute initialized to <var>S</var>, at the
<a>PresentationConnectionList</a> instance associated with the
<a>PresentationReceiver</a> object. The event must not bubble,
must not be cancelable, and has no default action.
<li>If the <a>presentation controllers promise</a> is
<code>null</code>, then abort all remaining steps.
</li>
<li>Otherwise, if the <a>presentation controllers promise</a> is
unsettled, then run the following steps:
<ol>
<li>Let the <a>presentation controllers monitor</a> be a new
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

<a>PresentationConnectionList</a>.
</li>
<li>
<a>Resolve</a> the <a>presentation controllers promise</a>
with the <a>presentation controllers monitor</a>.
</li>
<li>Abort all remaining steps.
</li>
</ol>
</li>
<li>Otherwise, <a>queue a task</a> to <a>fire</a> a <a>trusted
event</a> with the name <a for=
"PresentationConnectionList">connectionavailable</a>, that uses the
<a>PresentationConnectionAvailableEvent</a> interface, with the
<a for="PresentationConnectionAvailableEvent">connection</a>
attribute initialized to <var>S</var>, at the <a>presentation
controllers monitor</a>. The event must not bubble, must not be
cancelable, and has no default action.
</li>
</ol>
<p>
Expand Down