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

Unified Diff: content/public/common/presentation_session.h

Issue 2613153003: [Presentation API] Replaces type converters with typemaps (Closed)
Patch Set: Rebase again Created 3 years, 11 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/public/common/presentation_session.h
diff --git a/content/public/common/presentation_session.h b/content/public/common/presentation_session.h
index c57913a75e028770fd1f3891888a53df60512892..5d531a82515b28733137e4dfa510f4419677f885 100644
--- a/content/public/common/presentation_session.h
+++ b/content/public/common/presentation_session.h
@@ -31,12 +31,15 @@ enum PresentationConnectionCloseReason {
// Represents a presentation session that has been established via either
// browser actions or Presentation API.
struct CONTENT_EXPORT PresentationSessionInfo {
+ PresentationSessionInfo() = default;
PresentationSessionInfo(const GURL& presentation_url,
const std::string& presentation_id);
~PresentationSessionInfo();
- const GURL presentation_url;
- const std::string presentation_id;
+ static constexpr size_t kMaxIdLength = 32;
+
+ GURL presentation_url;
+ std::string presentation_id;
};
// Possible reasons why an attempt to create a presentation session failed.
@@ -50,12 +53,15 @@ enum PresentationErrorType {
// Struct returned when an attempt to create a presentation session failed.
struct CONTENT_EXPORT PresentationError {
+ PresentationError() = default;
PresentationError(PresentationErrorType error_type,
const std::string& message);
~PresentationError();
- const PresentationErrorType error_type;
- const std::string message;
+ static constexpr size_t kMaxMessageLength = 256;
+
+ PresentationErrorType error_type;
+ std::string message;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698