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

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

Issue 979413002: [Presentation API] Additional plumbing for PresentationServiceImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@REAL-NEW-MASTER
Patch Set: updated comments 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/public/browser/presentation_session.h
diff --git a/content/public/browser/presentation_session.h b/content/public/browser/presentation_session.h
new file mode 100644
index 0000000000000000000000000000000000000000..028d49ac8f47b7788c95ac1f1c8a241e81e1d98f
--- /dev/null
+++ b/content/public/browser/presentation_session.h
@@ -0,0 +1,45 @@
+// 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_PUBLIC_BROWSER_PRESENTATION_SESSION_H_
+#define CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_
+
+#include <string>
+
+#include "content/common/content_export.h"
+
+namespace content {
+
+// Represents a presentation session that has been established via either
+// browser actions or Presentation API.
+struct CONTENT_EXPORT PresentationSessionInfo {
+ PresentationSessionInfo(const std::string& presentation_url,
+ const std::string& presentation_id);
+ ~PresentationSessionInfo();
+
+ const std::string presentation_url;
+ const std::string presentation_id;
+};
+
+// Possible reasons why an attempt to create a presentation session failed.
+enum CONTENT_EXPORT PresentationErrorType {
+ PRESENTATION_ERROR_NO_AVAILABLE_SCREENS,
+ PRESENTATION_ERROR_SESSION_REQUEST_CANCELLED,
+ PRESENTATION_ERROR_NO_PRESENTATION_FOUND,
+ PRESENTATION_ERROR_UNKNOWN,
+};
+
+// Struct returned when an attempt to create a presentation session failed.
+struct CONTENT_EXPORT PresentationError {
+ PresentationError(PresentationErrorType error_type,
+ const std::string& message);
+ ~PresentationError();
+
+ const PresentationErrorType error_type;
+ const std::string message;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_

Powered by Google App Engine
This is Rietveld 408576698