|
1 | 1 | /*
|
2 |
| - * Copyright (C) 2018 Apple Inc. All rights reserved. |
| 2 | + * Copyright (C) 2018-2025 Apple Inc. All rights reserved. |
3 | 3 | *
|
4 | 4 | * Redistribution and use in source and binary forms, with or without
|
5 | 5 | * modification, are permitted provided that the following conditions
|
@@ -39,7 +39,7 @@ using namespace WebKit;
|
39 | 39 | void WKAddMockMediaDevice(WKContextRef context, WKStringRef persistentId, WKStringRef label, WKStringRef type, WKDictionaryRef properties, bool isDefault)
|
40 | 40 | {
|
41 | 41 | #if ENABLE(MEDIA_STREAM)
|
42 |
| - String typeString = WebKit::toImpl(type)->string(); |
| 42 | + String typeString = WebKit::toProtectedImpl(type)->string(); |
43 | 43 | Variant<WebCore::MockMicrophoneProperties, WebCore::MockSpeakerProperties, WebCore::MockCameraProperties, WebCore::MockDisplayProperties> deviceProperties;
|
44 | 44 | if (typeString == "camera"_s) {
|
45 | 45 | WebCore::MockCameraProperties cameraProperties;
|
@@ -72,26 +72,26 @@ void WKAddMockMediaDevice(WKContextRef context, WKStringRef persistentId, WKStri
|
72 | 72 | }
|
73 | 73 | }
|
74 | 74 |
|
75 |
| - toImpl(context)->addMockMediaDevice({ WebKit::toImpl(persistentId)->string(), WebKit::toImpl(label)->string(), flags, isDefault, WTFMove(deviceProperties) }); |
| 75 | + toProtectedImpl(context)->addMockMediaDevice({ WebKit::toProtectedImpl(persistentId)->string(), WebKit::toProtectedImpl(label)->string(), flags, isDefault, WTFMove(deviceProperties) }); |
76 | 76 | #endif
|
77 | 77 | }
|
78 | 78 |
|
79 | 79 | void WKClearMockMediaDevices(WKContextRef context)
|
80 | 80 | {
|
81 |
| - toImpl(context)->clearMockMediaDevices(); |
| 81 | + toProtectedImpl(context)->clearMockMediaDevices(); |
82 | 82 | }
|
83 | 83 |
|
84 | 84 | void WKRemoveMockMediaDevice(WKContextRef context, WKStringRef persistentId)
|
85 | 85 | {
|
86 |
| - toImpl(context)->removeMockMediaDevice(WebKit::toImpl(persistentId)->string()); |
| 86 | + toProtectedImpl(context)->removeMockMediaDevice(WebKit::toProtectedImpl(persistentId)->string()); |
87 | 87 | }
|
88 | 88 |
|
89 | 89 | void WKResetMockMediaDevices(WKContextRef context)
|
90 | 90 | {
|
91 |
| - toImpl(context)->resetMockMediaDevices(); |
| 91 | + toProtectedImpl(context)->resetMockMediaDevices(); |
92 | 92 | }
|
93 | 93 |
|
94 | 94 | void WKSetMockMediaDeviceIsEphemeral(WKContextRef context, WKStringRef persistentId, bool isEphemeral)
|
95 | 95 | {
|
96 |
| - toImpl(context)->setMockMediaDeviceIsEphemeral(WebKit::toImpl(persistentId)->string(), isEphemeral); |
| 96 | + toProtectedImpl(context)->setMockMediaDeviceIsEphemeral(WebKit::toProtectedImpl(persistentId)->string(), isEphemeral); |
97 | 97 | }
|
0 commit comments