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

Side by Side Diff: content/renderer/presentation/presentation_dispatcher.cc

Issue 1314413005: [Presentation API] 1-UA presentation support + presenter APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 #include "content/renderer/presentation/presentation_dispatcher.h" 5 #include "content/renderer/presentation/presentation_dispatcher.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 if (!controller_) 365 if (!controller_)
366 return; 366 return;
367 367
368 if (!session_info.is_null()) { 368 if (!session_info.is_null()) {
369 presentation_service_->ListenForSessionMessages(session_info.Clone()); 369 presentation_service_->ListenForSessionMessages(session_info.Clone());
370 controller_->didStartDefaultSession( 370 controller_->didStartDefaultSession(
371 new PresentationConnectionClient(std::move(session_info))); 371 new PresentationConnectionClient(std::move(session_info)));
372 } 372 }
373 } 373 }
374 374
375 void PresentationDispatcher::OnReceiverConnectionAvailable(
376 blink::mojom::PresentationSessionInfoPtr connection) {
377 // TODO(imcheng): Plumb this through Blink (crbug.com/513859).
378 NOTIMPLEMENTED();
379 }
380
375 void PresentationDispatcher::OnSessionCreated( 381 void PresentationDispatcher::OnSessionCreated(
376 blink::WebPresentationConnectionClientCallbacks* callback, 382 blink::WebPresentationConnectionClientCallbacks* callback,
377 blink::mojom::PresentationSessionInfoPtr session_info, 383 blink::mojom::PresentationSessionInfoPtr session_info,
378 blink::mojom::PresentationErrorPtr error) { 384 blink::mojom::PresentationErrorPtr error) {
379 DCHECK(callback); 385 DCHECK(callback);
380 if (!error.is_null()) { 386 if (!error.is_null()) {
381 DCHECK(session_info.is_null()); 387 DCHECK(session_info.is_null());
382 callback->onError(blink::WebPresentationError( 388 callback->onError(blink::WebPresentationError(
383 GetWebPresentationErrorTypeFromMojo(error->error_type), 389 GetWebPresentationErrorTypeFromMojo(error->error_type),
384 blink::WebString::fromUTF8(error->message))); 390 blink::WebString::fromUTF8(error->message)));
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 PresentationDispatcher::AvailabilityStatus::AvailabilityStatus( 534 PresentationDispatcher::AvailabilityStatus::AvailabilityStatus(
529 const std::string& availability_url) 535 const std::string& availability_url)
530 : url(availability_url), 536 : url(availability_url),
531 last_known_availability(false), 537 last_known_availability(false),
532 listening_state(ListeningState::INACTIVE) {} 538 listening_state(ListeningState::INACTIVE) {}
533 539
534 PresentationDispatcher::AvailabilityStatus::~AvailabilityStatus() { 540 PresentationDispatcher::AvailabilityStatus::~AvailabilityStatus() {
535 } 541 }
536 542
537 } // namespace content 543 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/presentation/presentation_dispatcher.h ('k') | extensions/renderer/resources/media_router_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698