1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_
6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_
10 #include "content/common/content_export.h"
14 enum PresentationSessionState
{
15 PRESENTATION_SESSION_STATE_CONNECTED
,
16 PRESENTATION_SESSION_STATE_DISCONNECTED
19 // Represents a presentation session that has been established via either
20 // browser actions or Presentation API.
21 struct CONTENT_EXPORT PresentationSessionInfo
{
22 PresentationSessionInfo(const std::string
& presentation_url
,
23 const std::string
& presentation_id
);
24 ~PresentationSessionInfo();
26 const std::string presentation_url
;
27 const std::string presentation_id
;
30 // Possible reasons why an attempt to create a presentation session failed.
31 enum PresentationErrorType
{
32 PRESENTATION_ERROR_NO_AVAILABLE_SCREENS
,
33 PRESENTATION_ERROR_SESSION_REQUEST_CANCELLED
,
34 PRESENTATION_ERROR_NO_PRESENTATION_FOUND
,
35 PRESENTATION_ERROR_UNKNOWN
,
38 // Struct returned when an attempt to create a presentation session failed.
39 struct CONTENT_EXPORT PresentationError
{
40 PresentationError(PresentationErrorType error_type
,
41 const std::string
& message
);
44 const PresentationErrorType error_type
;
45 const std::string message
;
48 } // namespace content
50 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_