| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 PRESENTATION_CONNECTION_CLOSE_REASON_CLOSED, | 26 PRESENTATION_CONNECTION_CLOSE_REASON_CLOSED, |
| 27 PRESENTATION_CONNECTION_CLOSE_REASON_WENT_AWAY | 27 PRESENTATION_CONNECTION_CLOSE_REASON_WENT_AWAY |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 // TODO(imcheng): Rename to PresentationConnectionInfo. | 30 // TODO(imcheng): Rename to PresentationConnectionInfo. |
| 31 // Represents a presentation session that has been established via either | 31 // Represents a presentation session that has been established via either |
| 32 // browser actions or Presentation API. | 32 // browser actions or Presentation API. |
| 33 struct CONTENT_EXPORT PresentationSessionInfo { | 33 struct CONTENT_EXPORT PresentationSessionInfo { |
| 34 PresentationSessionInfo(const GURL& presentation_url, | 34 PresentationSessionInfo(const GURL& presentation_url, |
| 35 const std::string& presentation_id); | 35 const std::string& presentation_id); |
| 36 PresentationSessionInfo(const GURL& presentation_url, |
| 37 const std::string& presentation_id, |
| 38 bool is_offscreen_presentation); |
| 36 ~PresentationSessionInfo(); | 39 ~PresentationSessionInfo(); |
| 37 | 40 |
| 38 const GURL presentation_url; | 41 const GURL presentation_url; |
| 39 const std::string presentation_id; | 42 const std::string presentation_id; |
| 43 const bool is_offscreen; |
| 40 }; | 44 }; |
| 41 | 45 |
| 42 // Possible reasons why an attempt to create a presentation session failed. | 46 // Possible reasons why an attempt to create a presentation session failed. |
| 43 enum PresentationErrorType { | 47 enum PresentationErrorType { |
| 44 PRESENTATION_ERROR_NO_AVAILABLE_SCREENS, | 48 PRESENTATION_ERROR_NO_AVAILABLE_SCREENS, |
| 45 PRESENTATION_ERROR_SESSION_REQUEST_CANCELLED, | 49 PRESENTATION_ERROR_SESSION_REQUEST_CANCELLED, |
| 46 PRESENTATION_ERROR_NO_PRESENTATION_FOUND, | 50 PRESENTATION_ERROR_NO_PRESENTATION_FOUND, |
| 47 PRESENTATION_ERROR_UNKNOWN, | 51 PRESENTATION_ERROR_UNKNOWN, |
| 48 }; | 52 }; |
| 49 | 53 |
| 50 // Struct returned when an attempt to create a presentation session failed. | 54 // Struct returned when an attempt to create a presentation session failed. |
| 51 struct CONTENT_EXPORT PresentationError { | 55 struct CONTENT_EXPORT PresentationError { |
| 52 PresentationError(PresentationErrorType error_type, | 56 PresentationError(PresentationErrorType error_type, |
| 53 const std::string& message); | 57 const std::string& message); |
| 54 ~PresentationError(); | 58 ~PresentationError(); |
| 55 | 59 |
| 56 const PresentationErrorType error_type; | 60 const PresentationErrorType error_type; |
| 57 const std::string message; | 61 const std::string message; |
| 58 }; | 62 }; |
| 59 | 63 |
| 60 } // namespace content | 64 } // namespace content |
| 61 | 65 |
| 62 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_ | 66 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_ |
| OLD | NEW |