| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 PermissionStatus_h | 5 #ifndef PermissionStatus_h |
| 6 #define PermissionStatus_h | 6 #define PermissionStatus_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
| 9 #include "core/dom/SuspendableObject.h" | 9 #include "core/dom/SuspendableObject.h" |
| 10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
| 11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 #include "public/platform/modules/permissions/permission.mojom-blink.h" | 12 #include "public/platform/modules/permissions/permission.mojom-blink.h" |
| 13 #include "wtf/text/AtomicString.h" | 13 #include "wtf/text/AtomicString.h" |
| 14 #include "wtf/text/WTFString.h" | 14 #include "wtf/text/WTFString.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 class ExecutionContext; | 18 class ExecutionContext; |
| 19 class ScriptPromiseResolver; | 19 class ScriptPromiseResolver; |
| 20 | 20 |
| 21 // Expose the status of a given WebPermissionType for the current | 21 // Expose the status of a given WebPermissionType for the current |
| 22 // ExecutionContext. | 22 // ExecutionContext. |
| 23 class PermissionStatus final : public EventTargetWithInlineData, | 23 class PermissionStatus final : public EventTargetWithInlineData, |
| 24 public ActiveScriptWrappable, | 24 public ActiveScriptWrappable<PermissionStatus>, |
| 25 public SuspendableObject { | 25 public SuspendableObject { |
| 26 USING_GARBAGE_COLLECTED_MIXIN(PermissionStatus); | 26 USING_GARBAGE_COLLECTED_MIXIN(PermissionStatus); |
| 27 DEFINE_WRAPPERTYPEINFO(); | 27 DEFINE_WRAPPERTYPEINFO(); |
| 28 | 28 |
| 29 using MojoPermissionDescriptor = mojom::blink::PermissionDescriptorPtr; | 29 using MojoPermissionDescriptor = mojom::blink::PermissionDescriptorPtr; |
| 30 using MojoPermissionStatus = mojom::blink::PermissionStatus; | 30 using MojoPermissionStatus = mojom::blink::PermissionStatus; |
| 31 | 31 |
| 32 public: | 32 public: |
| 33 static PermissionStatus* take(ScriptPromiseResolver*, | 33 static PermissionStatus* take(ScriptPromiseResolver*, |
| 34 MojoPermissionStatus, | 34 MojoPermissionStatus, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 void stopListening(); | 67 void stopListening(); |
| 68 | 68 |
| 69 MojoPermissionStatus m_status; | 69 MojoPermissionStatus m_status; |
| 70 MojoPermissionDescriptor m_descriptor; | 70 MojoPermissionDescriptor m_descriptor; |
| 71 mojom::blink::PermissionServicePtr m_service; | 71 mojom::blink::PermissionServicePtr m_service; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace blink | 74 } // namespace blink |
| 75 | 75 |
| 76 #endif // PermissionStatus_h | 76 #endif // PermissionStatus_h |
| OLD | NEW |