| OLD | NEW |
| 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 <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 blink::WebPresentationError::ErrorType GetWebPresentationErrorTypeFromMojo( | 48 blink::WebPresentationError::ErrorType GetWebPresentationErrorTypeFromMojo( |
| 49 blink::mojom::PresentationErrorType mojoErrorType) { | 49 blink::mojom::PresentationErrorType mojoErrorType) { |
| 50 switch (mojoErrorType) { | 50 switch (mojoErrorType) { |
| 51 case blink::mojom::PresentationErrorType::NO_AVAILABLE_SCREENS: | 51 case blink::mojom::PresentationErrorType::NO_AVAILABLE_SCREENS: |
| 52 return blink::WebPresentationError::ErrorTypeNoAvailableScreens; | 52 return blink::WebPresentationError::ErrorTypeNoAvailableScreens; |
| 53 case blink::mojom::PresentationErrorType::SESSION_REQUEST_CANCELLED: | 53 case blink::mojom::PresentationErrorType::SESSION_REQUEST_CANCELLED: |
| 54 return blink::WebPresentationError::ErrorTypeSessionRequestCancelled; | 54 return blink::WebPresentationError::ErrorTypeSessionRequestCancelled; |
| 55 case blink::mojom::PresentationErrorType::NO_PRESENTATION_FOUND: | 55 case blink::mojom::PresentationErrorType::NO_PRESENTATION_FOUND: |
| 56 return blink::WebPresentationError::ErrorTypeNoPresentationFound; | 56 return blink::WebPresentationError::ErrorTypeNoPresentationFound; |
| 57 case blink::mojom::PresentationErrorType::PREVIOUS_START_IN_PROGRESS: |
| 58 return blink::WebPresentationError::ErrorTypePreviousStartInProgress; |
| 57 case blink::mojom::PresentationErrorType::UNKNOWN: | 59 case blink::mojom::PresentationErrorType::UNKNOWN: |
| 58 default: | 60 default: |
| 59 return blink::WebPresentationError::ErrorTypeUnknown; | 61 return blink::WebPresentationError::ErrorTypeUnknown; |
| 60 } | 62 } |
| 61 } | 63 } |
| 62 | 64 |
| 63 blink::WebPresentationConnectionState GetWebPresentationConnectionStateFromMojo( | 65 blink::WebPresentationConnectionState GetWebPresentationConnectionStateFromMojo( |
| 64 blink::mojom::PresentationConnectionState mojoSessionState) { | 66 blink::mojom::PresentationConnectionState mojoSessionState) { |
| 65 switch (mojoSessionState) { | 67 switch (mojoSessionState) { |
| 66 case blink::mojom::PresentationConnectionState::CONNECTING: | 68 case blink::mojom::PresentationConnectionState::CONNECTING: |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 PresentationDispatcher::AvailabilityStatus::AvailabilityStatus( | 571 PresentationDispatcher::AvailabilityStatus::AvailabilityStatus( |
| 570 const GURL& availability_url) | 572 const GURL& availability_url) |
| 571 : url(availability_url), | 573 : url(availability_url), |
| 572 last_known_availability(false), | 574 last_known_availability(false), |
| 573 listening_state(ListeningState::INACTIVE) {} | 575 listening_state(ListeningState::INACTIVE) {} |
| 574 | 576 |
| 575 PresentationDispatcher::AvailabilityStatus::~AvailabilityStatus() { | 577 PresentationDispatcher::AvailabilityStatus::~AvailabilityStatus() { |
| 576 } | 578 } |
| 577 | 579 |
| 578 } // namespace content | 580 } // namespace content |
| OLD | NEW |