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

Unified Diff: content/public/common/presentation_session.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/public/common/presentation_session.h
diff --git a/content/public/common/presentation_session.h b/content/public/common/presentation_session.h
index c57913a75e028770fd1f3891888a53df60512892..aeaeb8f4153a89c4a7f369dd88959acd983a261e 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 = 64;
+
+ 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
« no previous file with comments | « content/common/presentation/typemaps.gni ('k') | content/renderer/presentation/presentation_connection_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698