| 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_COMMON_PRESENTATION_INFO_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_PRESENTATION_INFO_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_PRESENTATION_INFO_H_ | 6 #define CONTENT_PUBLIC_COMMON_PRESENTATION_INFO_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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 enum PresentationErrorType { | 45 enum PresentationErrorType { |
| 46 PRESENTATION_ERROR_NO_AVAILABLE_SCREENS, | 46 PRESENTATION_ERROR_NO_AVAILABLE_SCREENS, |
| 47 PRESENTATION_ERROR_PRESENTATION_REQUEST_CANCELLED, | 47 PRESENTATION_ERROR_PRESENTATION_REQUEST_CANCELLED, |
| 48 PRESENTATION_ERROR_NO_PRESENTATION_FOUND, | 48 PRESENTATION_ERROR_NO_PRESENTATION_FOUND, |
| 49 PRESENTATION_ERROR_PREVIOUS_START_IN_PROGRESS, | 49 PRESENTATION_ERROR_PREVIOUS_START_IN_PROGRESS, |
| 50 PRESENTATION_ERROR_UNKNOWN, | 50 PRESENTATION_ERROR_UNKNOWN, |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 // Struct returned when an attempt to create a presentation failed. | 53 // Struct returned when an attempt to create a presentation failed. |
| 54 struct CONTENT_EXPORT PresentationError { | 54 struct CONTENT_EXPORT PresentationError { |
| 55 // TODO(mfoltz): Should this initialize error_type to UNKNOWN? |
| 55 PresentationError() = default; | 56 PresentationError() = default; |
| 56 PresentationError(PresentationErrorType error_type, | 57 PresentationError(PresentationErrorType error_type, |
| 57 const std::string& message); | 58 const std::string& message); |
| 58 ~PresentationError(); | 59 ~PresentationError(); |
| 59 | 60 |
| 60 static constexpr size_t kMaxMessageLength = 256; | 61 static constexpr size_t kMaxMessageLength = 256; |
| 61 | 62 |
| 62 PresentationErrorType error_type; | 63 PresentationErrorType error_type; |
| 63 std::string message; | 64 std::string message; |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 } // namespace content | 67 } // namespace content |
| 67 | 68 |
| 68 #endif // CONTENT_PUBLIC_COMMON_PRESENTATION_INFO_H_ | 69 #endif // CONTENT_PUBLIC_COMMON_PRESENTATION_INFO_H_ |
| OLD | NEW |