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

Unified Diff: content/browser/presentation/presentation_type_converters.cc

Issue 2613153003: [Presentation API] Replaces type converters with typemaps (Closed)
Patch Set: Extend presentation ID max length to 64. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/presentation/presentation_type_converters.cc
diff --git a/content/browser/presentation/presentation_type_converters.cc b/content/browser/presentation/presentation_type_converters.cc
deleted file mode 100644
index 086ec7c31d54e3b70b39d019e1b2f87634d2d63b..0000000000000000000000000000000000000000
--- a/content/browser/presentation/presentation_type_converters.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/presentation/presentation_type_converters.h"
-
-#include "base/logging.h"
-
-namespace content {
-
-blink::mojom::PresentationErrorType PresentationErrorTypeToMojo(
- content::PresentationErrorType input) {
- switch (input) {
- case content::PRESENTATION_ERROR_NO_AVAILABLE_SCREENS:
- return blink::mojom::PresentationErrorType::NO_AVAILABLE_SCREENS;
- case content::PRESENTATION_ERROR_SESSION_REQUEST_CANCELLED:
- return blink::mojom::PresentationErrorType::SESSION_REQUEST_CANCELLED;
- case content::PRESENTATION_ERROR_NO_PRESENTATION_FOUND:
- return blink::mojom::PresentationErrorType::NO_PRESENTATION_FOUND;
- case content::PRESENTATION_ERROR_PREVIOUS_START_IN_PROGRESS:
- return blink::mojom::PresentationErrorType::PREVIOUS_START_IN_PROGRESS;
- case content::PRESENTATION_ERROR_UNKNOWN:
- return blink::mojom::PresentationErrorType::UNKNOWN;
- }
- NOTREACHED();
- return blink::mojom::PresentationErrorType::UNKNOWN;
-}
-
-blink::mojom::PresentationConnectionState PresentationConnectionStateToMojo(
- content::PresentationConnectionState state) {
- switch (state) {
- case content::PRESENTATION_CONNECTION_STATE_CONNECTING:
- return blink::mojom::PresentationConnectionState::CONNECTING;
- case content::PRESENTATION_CONNECTION_STATE_CONNECTED:
- return blink::mojom::PresentationConnectionState::CONNECTED;
- case content::PRESENTATION_CONNECTION_STATE_CLOSED:
- return blink::mojom::PresentationConnectionState::CLOSED;
- case content::PRESENTATION_CONNECTION_STATE_TERMINATED:
- return blink::mojom::PresentationConnectionState::TERMINATED;
- }
- NOTREACHED();
- return blink::mojom::PresentationConnectionState::TERMINATED;
-}
-
-blink::mojom::PresentationConnectionCloseReason
-PresentationConnectionCloseReasonToMojo(
- content::PresentationConnectionCloseReason reason) {
- switch (reason) {
- case content::PRESENTATION_CONNECTION_CLOSE_REASON_CONNECTION_ERROR:
- return blink::mojom::PresentationConnectionCloseReason::CONNECTION_ERROR;
- case content::PRESENTATION_CONNECTION_CLOSE_REASON_CLOSED:
- return blink::mojom::PresentationConnectionCloseReason::CLOSED;
- case content::PRESENTATION_CONNECTION_CLOSE_REASON_WENT_AWAY:
- return blink::mojom::PresentationConnectionCloseReason::WENT_AWAY;
- }
- NOTREACHED();
- return blink::mojom::PresentationConnectionCloseReason::CONNECTION_ERROR;
-}
-
-} // namespace content
-

Powered by Google App Engine
This is Rietveld 408576698