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

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

Issue 1572433002: [Media Router] Add Connecting state to PresentationConnection to bring align with spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile fix Created 4 years, 11 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 24 matching lines...) Expand all
35 return blink::WebPresentationError::ErrorTypeNoPresentationFound; 35 return blink::WebPresentationError::ErrorTypeNoPresentationFound;
36 case presentation::PRESENTATION_ERROR_TYPE_UNKNOWN: 36 case presentation::PRESENTATION_ERROR_TYPE_UNKNOWN:
37 default: 37 default:
38 return blink::WebPresentationError::ErrorTypeUnknown; 38 return blink::WebPresentationError::ErrorTypeUnknown;
39 } 39 }
40 } 40 }
41 41
42 blink::WebPresentationConnectionState GetWebPresentationConnectionStateFromMojo( 42 blink::WebPresentationConnectionState GetWebPresentationConnectionStateFromMojo(
43 presentation::PresentationConnectionState mojoSessionState) { 43 presentation::PresentationConnectionState mojoSessionState) {
44 switch (mojoSessionState) { 44 switch (mojoSessionState) {
45 // TODO(imcheng): Add Connecting state to Blink (crbug.com/575351).
45 case presentation::PRESENTATION_CONNECTION_STATE_CONNECTED: 46 case presentation::PRESENTATION_CONNECTION_STATE_CONNECTED:
46 return blink::WebPresentationConnectionState::Connected; 47 return blink::WebPresentationConnectionState::Connected;
47 case presentation::PRESENTATION_CONNECTION_STATE_CLOSED: 48 case presentation::PRESENTATION_CONNECTION_STATE_CLOSED:
48 return blink::WebPresentationConnectionState::Closed; 49 return blink::WebPresentationConnectionState::Closed;
49 case presentation::PRESENTATION_CONNECTION_STATE_TERMINATED: 50 case presentation::PRESENTATION_CONNECTION_STATE_TERMINATED:
50 return blink::WebPresentationConnectionState::Terminated; 51 return blink::WebPresentationConnectionState::Terminated;
52 default:
53 NOTREACHED();
54 return blink::WebPresentationConnectionState::Terminated;
51 } 55 }
52
53 NOTREACHED();
54 return blink::WebPresentationConnectionState::Terminated;
55 } 56 }
56 57
57 } // namespace 58 } // namespace
58 59
59 namespace content { 60 namespace content {
60 61
61 PresentationDispatcher::PresentationDispatcher(RenderFrame* render_frame) 62 PresentationDispatcher::PresentationDispatcher(RenderFrame* render_frame)
62 : RenderFrameObserver(render_frame), 63 : RenderFrameObserver(render_frame),
63 controller_(nullptr), 64 controller_(nullptr),
64 binding_(this) { 65 binding_(this) {
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 PresentationDispatcher::AvailabilityStatus::AvailabilityStatus( 502 PresentationDispatcher::AvailabilityStatus::AvailabilityStatus(
502 const std::string& availability_url) 503 const std::string& availability_url)
503 : url(availability_url), 504 : url(availability_url),
504 last_known_availability(false), 505 last_known_availability(false),
505 listening_state(ListeningState::INACTIVE) {} 506 listening_state(ListeningState::INACTIVE) {}
506 507
507 PresentationDispatcher::AvailabilityStatus::~AvailabilityStatus() { 508 PresentationDispatcher::AvailabilityStatus::~AvailabilityStatus() {
508 } 509 }
509 510
510 } // namespace content 511 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/presentation_session.h ('k') | extensions/renderer/resources/media_router_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698