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

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

Issue 2435243002: [Presentation API] add 'connecting' state to WebPresentationConnectionState (Closed)
Patch Set: resolve code review comments from mlamouri Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 27 matching lines...) Expand all
38 return blink::WebPresentationError::ErrorTypeNoPresentationFound; 38 return blink::WebPresentationError::ErrorTypeNoPresentationFound;
39 case blink::mojom::PresentationErrorType::UNKNOWN: 39 case blink::mojom::PresentationErrorType::UNKNOWN:
40 default: 40 default:
41 return blink::WebPresentationError::ErrorTypeUnknown; 41 return blink::WebPresentationError::ErrorTypeUnknown;
42 } 42 }
43 } 43 }
44 44
45 blink::WebPresentationConnectionState GetWebPresentationConnectionStateFromMojo( 45 blink::WebPresentationConnectionState GetWebPresentationConnectionStateFromMojo(
46 blink::mojom::PresentationConnectionState mojoSessionState) { 46 blink::mojom::PresentationConnectionState mojoSessionState) {
47 switch (mojoSessionState) { 47 switch (mojoSessionState) {
48 // TODO(imcheng): Add Connecting state to Blink (crbug.com/575351). 48 case blink::mojom::PresentationConnectionState::CONNECTING:
49 return blink::WebPresentationConnectionState::Connecting;
49 case blink::mojom::PresentationConnectionState::CONNECTED: 50 case blink::mojom::PresentationConnectionState::CONNECTED:
50 return blink::WebPresentationConnectionState::Connected; 51 return blink::WebPresentationConnectionState::Connected;
51 case blink::mojom::PresentationConnectionState::CLOSED: 52 case blink::mojom::PresentationConnectionState::CLOSED:
52 return blink::WebPresentationConnectionState::Closed; 53 return blink::WebPresentationConnectionState::Closed;
53 case blink::mojom::PresentationConnectionState::TERMINATED: 54 case blink::mojom::PresentationConnectionState::TERMINATED:
54 return blink::WebPresentationConnectionState::Terminated; 55 return blink::WebPresentationConnectionState::Terminated;
55 default: 56 default:
56 NOTREACHED(); 57 NOTREACHED();
57 return blink::WebPresentationConnectionState::Terminated; 58 return blink::WebPresentationConnectionState::Terminated;
58 } 59 }
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 PresentationDispatcher::AvailabilityStatus::AvailabilityStatus( 547 PresentationDispatcher::AvailabilityStatus::AvailabilityStatus(
547 const GURL& availability_url) 548 const GURL& availability_url)
548 : url(availability_url), 549 : url(availability_url),
549 last_known_availability(false), 550 last_known_availability(false),
550 listening_state(ListeningState::INACTIVE) {} 551 listening_state(ListeningState::INACTIVE) {}
551 552
552 PresentationDispatcher::AvailabilityStatus::~AvailabilityStatus() { 553 PresentationDispatcher::AvailabilityStatus::~AvailabilityStatus() {
553 } 554 }
554 555
555 } // namespace content 556 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698