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

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

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.h
diff --git a/content/browser/presentation/presentation_type_converters.h b/content/browser/presentation/presentation_type_converters.h
deleted file mode 100644
index ce7bb0021f7d0d921520aaf818e45d4b2c48d427..0000000000000000000000000000000000000000
--- a/content/browser/presentation/presentation_type_converters.h
+++ /dev/null
@@ -1,64 +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.
-
-#ifndef CONTENT_BROWSER_PRESENTATION_PRESENTATION_TYPE_CONVERTERS_H_
-#define CONTENT_BROWSER_PRESENTATION_PRESENTATION_TYPE_CONVERTERS_H_
-
-#include "content/common/content_export.h"
-#include "content/public/common/presentation_session.h"
-#include "third_party/WebKit/public/platform/modules/presentation/presentation.mojom.h"
-
-namespace content {
-
-CONTENT_EXPORT blink::mojom::PresentationErrorType PresentationErrorTypeToMojo(
- PresentationErrorType input);
-
-CONTENT_EXPORT blink::mojom::PresentationConnectionState
-PresentationConnectionStateToMojo(PresentationConnectionState state);
-
-CONTENT_EXPORT blink::mojom::PresentationConnectionCloseReason
-PresentationConnectionCloseReasonToMojo(
- PresentationConnectionCloseReason reason);
-} // namespace content
-
-namespace mojo {
-
-template <>
-struct TypeConverter<blink::mojom::PresentationSessionInfoPtr,
- content::PresentationSessionInfo> {
- static blink::mojom::PresentationSessionInfoPtr Convert(
- const content::PresentationSessionInfo& input) {
- blink::mojom::PresentationSessionInfoPtr output(
- blink::mojom::PresentationSessionInfo::New());
- output->url = input.presentation_url;
- output->id = input.presentation_id;
- return output;
- }
-};
-
-template <>
-struct TypeConverter<content::PresentationSessionInfo,
- blink::mojom::PresentationSessionInfoPtr> {
- static content::PresentationSessionInfo Convert(
- const blink::mojom::PresentationSessionInfoPtr& input) {
- return content::PresentationSessionInfo(input->url, input->id);
- }
-};
-
-template <>
-struct TypeConverter<blink::mojom::PresentationErrorPtr,
- content::PresentationError> {
- static blink::mojom::PresentationErrorPtr Convert(
- const content::PresentationError& input) {
- blink::mojom::PresentationErrorPtr output(
- blink::mojom::PresentationError::New());
- output->error_type = PresentationErrorTypeToMojo(input.error_type);
- output->message = input.message;
- return output;
- }
-};
-
-} // namespace mojo
-
-#endif // CONTENT_BROWSER_PRESENTATION_PRESENTATION_TYPE_CONVERTERS_H_

Powered by Google App Engine
This is Rietveld 408576698