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

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

Issue 979413002: [Presentation API] Additional plumbing for PresentationServiceImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@REAL-NEW-MASTER
Patch Set: rm presentation_session.mojom Created 5 years, 9 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
new file mode 100644
index 0000000000000000000000000000000000000000..73c4804edbe3539573f7544846718a63ae2fd1eb
--- /dev/null
+++ b/content/browser/presentation/presentation_type_converters.cc
@@ -0,0 +1,29 @@
+// 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 {
+
+presentation::PresentationErrorType PresentationErrorTypeToMojo(
+ content::PresentationErrorType input) {
+ switch (input) {
+ case content::PRESENTATION_ERROR_NO_AVAILABLE_SCREENS:
+ return presentation::PRESENTATION_ERROR_TYPE_NO_AVAILABLE_SCREENS;
+ case content::PRESENTATION_ERROR_SESSION_REQUEST_CANCELLED:
+ return presentation::PRESENTATION_ERROR_TYPE_SESSION_REQUEST_CANCELLED;
+ case content::PRESENTATION_ERROR_NO_PRESENTATION_FOUND:
+ return presentation::PRESENTATION_ERROR_TYPE_NO_PRESENTATION_FOUND;
+ case content::PRESENTATION_ERROR_UNKNOWN:
+ return presentation::PRESENTATION_ERROR_TYPE_UNKNOWN;
+ default:
+ NOTREACHED();
+ return presentation::PRESENTATION_ERROR_TYPE_UNKNOWN;
+ }
+}
+
+} // namespace content
+

Powered by Google App Engine
This is Rietveld 408576698