chromedeveloperprotocol-client 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cdp/__init__.py +4 -0
- cdp/domains.py +582 -0
- cdp/generator/__init__.py +3 -0
- cdp/generator/client_generator.py +246 -0
- cdp/generator/constant.py +4 -0
- cdp/generator/domain_generator.py +149 -0
- cdp/generator/event_generator.py +202 -0
- cdp/generator/method_generator.py +215 -0
- cdp/generator/service.py +153 -0
- cdp/generator/type_generator.py +231 -0
- cdp/protocol/__init__.py +0 -0
- cdp/protocol/accessibility/__init__.py +0 -0
- cdp/protocol/accessibility/events/__init__.py +0 -0
- cdp/protocol/accessibility/events/service.py +37 -0
- cdp/protocol/accessibility/events/types.py +14 -0
- cdp/protocol/accessibility/methods/__init__.py +0 -0
- cdp/protocol/accessibility/methods/service.py +109 -0
- cdp/protocol/accessibility/methods/types.py +70 -0
- cdp/protocol/accessibility/service.py +21 -0
- cdp/protocol/accessibility/types.py +89 -0
- cdp/protocol/animation/__init__.py +0 -0
- cdp/protocol/animation/events/__init__.py +0 -0
- cdp/protocol/animation/events/service.py +53 -0
- cdp/protocol/animation/events/types.py +20 -0
- cdp/protocol/animation/methods/__init__.py +0 -0
- cdp/protocol/animation/methods/service.py +131 -0
- cdp/protocol/animation/methods/types.py +52 -0
- cdp/protocol/animation/service.py +21 -0
- cdp/protocol/animation/types.py +79 -0
- cdp/protocol/audits/__init__.py +0 -0
- cdp/protocol/audits/events/__init__.py +0 -0
- cdp/protocol/audits/events/service.py +29 -0
- cdp/protocol/audits/events/types.py +10 -0
- cdp/protocol/audits/methods/__init__.py +0 -0
- cdp/protocol/audits/methods/service.py +76 -0
- cdp/protocol/audits/methods/types.py +36 -0
- cdp/protocol/audits/service.py +21 -0
- cdp/protocol/audits/types.py +293 -0
- cdp/protocol/autofill/__init__.py +0 -0
- cdp/protocol/autofill/events/__init__.py +0 -0
- cdp/protocol/autofill/events/service.py +29 -0
- cdp/protocol/autofill/events/types.py +14 -0
- cdp/protocol/autofill/methods/__init__.py +0 -0
- cdp/protocol/autofill/methods/service.py +65 -0
- cdp/protocol/autofill/methods/types.py +22 -0
- cdp/protocol/autofill/service.py +21 -0
- cdp/protocol/autofill/types.py +54 -0
- cdp/protocol/background_service/__init__.py +0 -0
- cdp/protocol/background_service/events/__init__.py +0 -0
- cdp/protocol/background_service/events/service.py +37 -0
- cdp/protocol/background_service/events/types.py +14 -0
- cdp/protocol/background_service/methods/__init__.py +0 -0
- cdp/protocol/background_service/methods/service.py +65 -0
- cdp/protocol/background_service/methods/types.py +17 -0
- cdp/protocol/background_service/service.py +21 -0
- cdp/protocol/background_service/types.py +32 -0
- cdp/protocol/bluetooth_emulation/__init__.py +0 -0
- cdp/protocol/bluetooth_emulation/events/__init__.py +0 -0
- cdp/protocol/bluetooth_emulation/events/service.py +45 -0
- cdp/protocol/bluetooth_emulation/events/types.py +23 -0
- cdp/protocol/bluetooth_emulation/methods/__init__.py +0 -0
- cdp/protocol/bluetooth_emulation/methods/service.py +186 -0
- cdp/protocol/bluetooth_emulation/methods/types.py +81 -0
- cdp/protocol/bluetooth_emulation/service.py +21 -0
- cdp/protocol/bluetooth_emulation/types.py +45 -0
- cdp/protocol/browser/__init__.py +0 -0
- cdp/protocol/browser/events/__init__.py +0 -0
- cdp/protocol/browser/events/service.py +37 -0
- cdp/protocol/browser/events/types.py +28 -0
- cdp/protocol/browser/methods/__init__.py +0 -0
- cdp/protocol/browser/methods/service.py +230 -0
- cdp/protocol/browser/methods/types.py +126 -0
- cdp/protocol/browser/service.py +21 -0
- cdp/protocol/browser/types.py +57 -0
- cdp/protocol/cache_storage/__init__.py +0 -0
- cdp/protocol/cache_storage/events/__init__.py +0 -0
- cdp/protocol/cache_storage/events/service.py +20 -0
- cdp/protocol/cache_storage/events/types.py +3 -0
- cdp/protocol/cache_storage/methods/__init__.py +0 -0
- cdp/protocol/cache_storage/methods/service.py +76 -0
- cdp/protocol/cache_storage/methods/types.py +57 -0
- cdp/protocol/cache_storage/service.py +21 -0
- cdp/protocol/cache_storage/types.py +49 -0
- cdp/protocol/cast/__init__.py +0 -0
- cdp/protocol/cast/events/__init__.py +0 -0
- cdp/protocol/cast/events/service.py +37 -0
- cdp/protocol/cast/events/types.py +12 -0
- cdp/protocol/cast/methods/__init__.py +0 -0
- cdp/protocol/cast/methods/service.py +87 -0
- cdp/protocol/cast/methods/types.py +15 -0
- cdp/protocol/cast/service.py +21 -0
- cdp/protocol/cast/types.py +9 -0
- cdp/protocol/css/__init__.py +0 -0
- cdp/protocol/css/events/__init__.py +0 -0
- cdp/protocol/css/events/service.py +69 -0
- cdp/protocol/css/events/types.py +27 -0
- cdp/protocol/css/methods/__init__.py +0 -0
- cdp/protocol/css/methods/service.py +428 -0
- cdp/protocol/css/methods/types.py +278 -0
- cdp/protocol/css/service.py +21 -0
- cdp/protocol/css/types.py +451 -0
- cdp/protocol/debugger/__init__.py +0 -0
- cdp/protocol/debugger/events/__init__.py +0 -0
- cdp/protocol/debugger/events/service.py +53 -0
- cdp/protocol/debugger/events/types.py +112 -0
- cdp/protocol/debugger/methods/__init__.py +0 -0
- cdp/protocol/debugger/methods/service.py +362 -0
- cdp/protocol/debugger/methods/types.py +250 -0
- cdp/protocol/debugger/service.py +21 -0
- cdp/protocol/debugger/types.py +91 -0
- cdp/protocol/device_access/__init__.py +0 -0
- cdp/protocol/device_access/events/__init__.py +0 -0
- cdp/protocol/device_access/events/service.py +29 -0
- cdp/protocol/device_access/events/types.py +12 -0
- cdp/protocol/device_access/methods/__init__.py +0 -0
- cdp/protocol/device_access/methods/service.py +65 -0
- cdp/protocol/device_access/methods/types.py +16 -0
- cdp/protocol/device_access/service.py +21 -0
- cdp/protocol/device_access/types.py +13 -0
- cdp/protocol/device_orientation/__init__.py +0 -0
- cdp/protocol/device_orientation/events/__init__.py +0 -0
- cdp/protocol/device_orientation/events/service.py +20 -0
- cdp/protocol/device_orientation/events/types.py +3 -0
- cdp/protocol/device_orientation/methods/__init__.py +0 -0
- cdp/protocol/device_orientation/methods/service.py +43 -0
- cdp/protocol/device_orientation/methods/types.py +12 -0
- cdp/protocol/device_orientation/service.py +21 -0
- cdp/protocol/device_orientation/types.py +3 -0
- cdp/protocol/dom/__init__.py +0 -0
- cdp/protocol/dom/events/__init__.py +0 -0
- cdp/protocol/dom/events/service.py +165 -0
- cdp/protocol/dom/events/types.py +97 -0
- cdp/protocol/dom/methods/__init__.py +0 -0
- cdp/protocol/dom/methods/service.py +593 -0
- cdp/protocol/dom/methods/types.py +384 -0
- cdp/protocol/dom/service.py +21 -0
- cdp/protocol/dom/types.py +151 -0
- cdp/protocol/dom_debugger/__init__.py +0 -0
- cdp/protocol/dom_debugger/events/__init__.py +0 -0
- cdp/protocol/dom_debugger/events/service.py +20 -0
- cdp/protocol/dom_debugger/events/types.py +3 -0
- cdp/protocol/dom_debugger/methods/__init__.py +0 -0
- cdp/protocol/dom_debugger/methods/service.py +109 -0
- cdp/protocol/dom_debugger/methods/types.py +51 -0
- cdp/protocol/dom_debugger/service.py +21 -0
- cdp/protocol/dom_debugger/types.py +36 -0
- cdp/protocol/dom_snapshot/__init__.py +0 -0
- cdp/protocol/dom_snapshot/events/__init__.py +0 -0
- cdp/protocol/dom_snapshot/events/service.py +20 -0
- cdp/protocol/dom_snapshot/events/types.py +3 -0
- cdp/protocol/dom_snapshot/methods/__init__.py +0 -0
- cdp/protocol/dom_snapshot/methods/service.py +54 -0
- cdp/protocol/dom_snapshot/methods/types.py +28 -0
- cdp/protocol/dom_snapshot/service.py +21 -0
- cdp/protocol/dom_snapshot/types.py +220 -0
- cdp/protocol/dom_storage/__init__.py +0 -0
- cdp/protocol/dom_storage/events/__init__.py +0 -0
- cdp/protocol/dom_storage/events/service.py +53 -0
- cdp/protocol/dom_storage/events/types.py +22 -0
- cdp/protocol/dom_storage/methods/__init__.py +0 -0
- cdp/protocol/dom_storage/methods/service.py +87 -0
- cdp/protocol/dom_storage/methods/types.py +27 -0
- cdp/protocol/dom_storage/service.py +21 -0
- cdp/protocol/dom_storage/types.py +15 -0
- cdp/protocol/emulation/__init__.py +0 -0
- cdp/protocol/emulation/events/__init__.py +0 -0
- cdp/protocol/emulation/events/service.py +29 -0
- cdp/protocol/emulation/events/types.py +6 -0
- cdp/protocol/emulation/methods/__init__.py +0 -0
- cdp/protocol/emulation/methods/service.py +494 -0
- cdp/protocol/emulation/methods/types.py +261 -0
- cdp/protocol/emulation/service.py +21 -0
- cdp/protocol/emulation/types.py +132 -0
- cdp/protocol/event_breakpoints/__init__.py +0 -0
- cdp/protocol/event_breakpoints/events/__init__.py +0 -0
- cdp/protocol/event_breakpoints/events/service.py +20 -0
- cdp/protocol/event_breakpoints/events/types.py +3 -0
- cdp/protocol/event_breakpoints/methods/__init__.py +0 -0
- cdp/protocol/event_breakpoints/methods/service.py +54 -0
- cdp/protocol/event_breakpoints/methods/types.py +10 -0
- cdp/protocol/event_breakpoints/service.py +21 -0
- cdp/protocol/event_breakpoints/types.py +3 -0
- cdp/protocol/extensions/__init__.py +0 -0
- cdp/protocol/extensions/events/__init__.py +0 -0
- cdp/protocol/extensions/events/service.py +20 -0
- cdp/protocol/extensions/events/types.py +3 -0
- cdp/protocol/extensions/methods/__init__.py +0 -0
- cdp/protocol/extensions/methods/service.py +87 -0
- cdp/protocol/extensions/methods/types.py +46 -0
- cdp/protocol/extensions/service.py +21 -0
- cdp/protocol/extensions/types.py +6 -0
- cdp/protocol/fed_cm/__init__.py +0 -0
- cdp/protocol/fed_cm/events/__init__.py +0 -0
- cdp/protocol/fed_cm/events/service.py +37 -0
- cdp/protocol/fed_cm/events/types.py +18 -0
- cdp/protocol/fed_cm/methods/__init__.py +0 -0
- cdp/protocol/fed_cm/methods/service.py +98 -0
- cdp/protocol/fed_cm/methods/types.py +26 -0
- cdp/protocol/fed_cm/service.py +21 -0
- cdp/protocol/fed_cm/types.py +25 -0
- cdp/protocol/fetch/__init__.py +0 -0
- cdp/protocol/fetch/events/__init__.py +0 -0
- cdp/protocol/fetch/events/service.py +37 -0
- cdp/protocol/fetch/events/types.py +47 -0
- cdp/protocol/fetch/methods/__init__.py +0 -0
- cdp/protocol/fetch/methods/service.py +120 -0
- cdp/protocol/fetch/methods/types.py +85 -0
- cdp/protocol/fetch/service.py +21 -0
- cdp/protocol/fetch/types.py +41 -0
- cdp/protocol/file_system/__init__.py +0 -0
- cdp/protocol/file_system/events/__init__.py +0 -0
- cdp/protocol/file_system/events/service.py +20 -0
- cdp/protocol/file_system/events/types.py +3 -0
- cdp/protocol/file_system/methods/__init__.py +0 -0
- cdp/protocol/file_system/methods/service.py +32 -0
- cdp/protocol/file_system/methods/types.py +14 -0
- cdp/protocol/file_system/service.py +21 -0
- cdp/protocol/file_system/types.py +28 -0
- cdp/protocol/headless_experimental/__init__.py +0 -0
- cdp/protocol/headless_experimental/events/__init__.py +0 -0
- cdp/protocol/headless_experimental/events/service.py +20 -0
- cdp/protocol/headless_experimental/events/types.py +3 -0
- cdp/protocol/headless_experimental/methods/__init__.py +0 -0
- cdp/protocol/headless_experimental/methods/service.py +32 -0
- cdp/protocol/headless_experimental/methods/types.py +22 -0
- cdp/protocol/headless_experimental/service.py +21 -0
- cdp/protocol/headless_experimental/types.py +12 -0
- cdp/protocol/heap_profiler/__init__.py +0 -0
- cdp/protocol/heap_profiler/events/__init__.py +0 -0
- cdp/protocol/heap_profiler/events/service.py +61 -0
- cdp/protocol/heap_profiler/events/types.py +18 -0
- cdp/protocol/heap_profiler/methods/__init__.py +0 -0
- cdp/protocol/heap_profiler/methods/service.py +153 -0
- cdp/protocol/heap_profiler/methods/types.py +73 -0
- cdp/protocol/heap_profiler/service.py +21 -0
- cdp/protocol/heap_profiler/types.py +32 -0
- cdp/protocol/indexed_db/__init__.py +0 -0
- cdp/protocol/indexed_db/events/__init__.py +0 -0
- cdp/protocol/indexed_db/events/service.py +20 -0
- cdp/protocol/indexed_db/events/types.py +3 -0
- cdp/protocol/indexed_db/methods/__init__.py +0 -0
- cdp/protocol/indexed_db/methods/service.py +120 -0
- cdp/protocol/indexed_db/methods/types.py +111 -0
- cdp/protocol/indexed_db/service.py +21 -0
- cdp/protocol/indexed_db/types.py +74 -0
- cdp/protocol/input/__init__.py +0 -0
- cdp/protocol/input/events/__init__.py +0 -0
- cdp/protocol/input/events/service.py +29 -0
- cdp/protocol/input/events/types.py +10 -0
- cdp/protocol/input/methods/__init__.py +0 -0
- cdp/protocol/input/methods/service.py +164 -0
- cdp/protocol/input/methods/types.py +181 -0
- cdp/protocol/input/service.py +21 -0
- cdp/protocol/input/types.py +46 -0
- cdp/protocol/inspector/__init__.py +0 -0
- cdp/protocol/inspector/events/__init__.py +0 -0
- cdp/protocol/inspector/events/service.py +53 -0
- cdp/protocol/inspector/events/types.py +13 -0
- cdp/protocol/inspector/methods/__init__.py +0 -0
- cdp/protocol/inspector/methods/service.py +43 -0
- cdp/protocol/inspector/methods/types.py +3 -0
- cdp/protocol/inspector/service.py +21 -0
- cdp/protocol/inspector/types.py +3 -0
- cdp/protocol/io/__init__.py +0 -0
- cdp/protocol/io/events/__init__.py +0 -0
- cdp/protocol/io/events/service.py +20 -0
- cdp/protocol/io/events/types.py +3 -0
- cdp/protocol/io/methods/__init__.py +0 -0
- cdp/protocol/io/methods/service.py +54 -0
- cdp/protocol/io/methods/types.py +33 -0
- cdp/protocol/io/service.py +21 -0
- cdp/protocol/io/types.py +6 -0
- cdp/protocol/layer_tree/__init__.py +0 -0
- cdp/protocol/layer_tree/events/__init__.py +0 -0
- cdp/protocol/layer_tree/events/service.py +37 -0
- cdp/protocol/layer_tree/events/types.py +18 -0
- cdp/protocol/layer_tree/methods/__init__.py +0 -0
- cdp/protocol/layer_tree/methods/service.py +120 -0
- cdp/protocol/layer_tree/methods/types.py +70 -0
- cdp/protocol/layer_tree/service.py +21 -0
- cdp/protocol/layer_tree/types.py +73 -0
- cdp/protocol/log/__init__.py +0 -0
- cdp/protocol/log/events/__init__.py +0 -0
- cdp/protocol/log/events/service.py +29 -0
- cdp/protocol/log/events/types.py +11 -0
- cdp/protocol/log/methods/__init__.py +0 -0
- cdp/protocol/log/methods/service.py +76 -0
- cdp/protocol/log/methods/types.py +14 -0
- cdp/protocol/log/service.py +21 -0
- cdp/protocol/log/types.py +40 -0
- cdp/protocol/media/__init__.py +0 -0
- cdp/protocol/media/events/__init__.py +0 -0
- cdp/protocol/media/events/service.py +61 -0
- cdp/protocol/media/events/types.py +27 -0
- cdp/protocol/media/methods/__init__.py +0 -0
- cdp/protocol/media/methods/service.py +43 -0
- cdp/protocol/media/methods/types.py +3 -0
- cdp/protocol/media/service.py +21 -0
- cdp/protocol/media/types.py +42 -0
- cdp/protocol/memory/__init__.py +0 -0
- cdp/protocol/memory/events/__init__.py +0 -0
- cdp/protocol/memory/events/service.py +20 -0
- cdp/protocol/memory/events/types.py +3 -0
- cdp/protocol/memory/methods/__init__.py +0 -0
- cdp/protocol/memory/methods/service.py +142 -0
- cdp/protocol/memory/methods/types.py +48 -0
- cdp/protocol/memory/service.py +21 -0
- cdp/protocol/memory/types.py +34 -0
- cdp/protocol/network/__init__.py +0 -0
- cdp/protocol/network/events/__init__.py +0 -0
- cdp/protocol/network/events/service.py +365 -0
- cdp/protocol/network/events/types.py +360 -0
- cdp/protocol/network/methods/__init__.py +0 -0
- cdp/protocol/network/methods/service.py +384 -0
- cdp/protocol/network/methods/types.py +252 -0
- cdp/protocol/network/service.py +21 -0
- cdp/protocol/network/types.py +691 -0
- cdp/protocol/overlay/__init__.py +0 -0
- cdp/protocol/overlay/events/__init__.py +0 -0
- cdp/protocol/overlay/events/service.py +53 -0
- cdp/protocol/overlay/events/types.py +20 -0
- cdp/protocol/overlay/methods/__init__.py +0 -0
- cdp/protocol/overlay/methods/service.py +307 -0
- cdp/protocol/overlay/methods/types.py +144 -0
- cdp/protocol/overlay/service.py +21 -0
- cdp/protocol/overlay/types.py +198 -0
- cdp/protocol/page/__init__.py +0 -0
- cdp/protocol/page/events/__init__.py +0 -0
- cdp/protocol/page/events/service.py +213 -0
- cdp/protocol/page/events/types.py +147 -0
- cdp/protocol/page/methods/__init__.py +0 -0
- cdp/protocol/page/methods/service.py +560 -0
- cdp/protocol/page/methods/types.py +346 -0
- cdp/protocol/page/service.py +21 -0
- cdp/protocol/page/types.py +379 -0
- cdp/protocol/performance/__init__.py +0 -0
- cdp/protocol/performance/events/__init__.py +0 -0
- cdp/protocol/performance/events/service.py +29 -0
- cdp/protocol/performance/events/types.py +13 -0
- cdp/protocol/performance/methods/__init__.py +0 -0
- cdp/protocol/performance/methods/service.py +54 -0
- cdp/protocol/performance/methods/types.py +18 -0
- cdp/protocol/performance/service.py +21 -0
- cdp/protocol/performance/types.py +10 -0
- cdp/protocol/performance_timeline/__init__.py +0 -0
- cdp/protocol/performance_timeline/events/__init__.py +0 -0
- cdp/protocol/performance_timeline/events/service.py +29 -0
- cdp/protocol/performance_timeline/events/types.py +10 -0
- cdp/protocol/performance_timeline/methods/__init__.py +0 -0
- cdp/protocol/performance_timeline/methods/service.py +32 -0
- cdp/protocol/performance_timeline/methods/types.py +7 -0
- cdp/protocol/performance_timeline/service.py +21 -0
- cdp/protocol/performance_timeline/types.py +46 -0
- cdp/protocol/preload/__init__.py +0 -0
- cdp/protocol/preload/events/__init__.py +0 -0
- cdp/protocol/preload/events/service.py +69 -0
- cdp/protocol/preload/events/types.py +49 -0
- cdp/protocol/preload/methods/__init__.py +0 -0
- cdp/protocol/preload/methods/service.py +43 -0
- cdp/protocol/preload/methods/types.py +3 -0
- cdp/protocol/preload/service.py +21 -0
- cdp/protocol/preload/types.py +56 -0
- cdp/protocol/profiler/__init__.py +0 -0
- cdp/protocol/profiler/events/__init__.py +0 -0
- cdp/protocol/profiler/events/service.py +45 -0
- cdp/protocol/profiler/events/types.py +30 -0
- cdp/protocol/profiler/methods/__init__.py +0 -0
- cdp/protocol/profiler/methods/service.py +120 -0
- cdp/protocol/profiler/methods/types.py +45 -0
- cdp/protocol/profiler/service.py +21 -0
- cdp/protocol/profiler/types.py +65 -0
- cdp/protocol/pwa/__init__.py +0 -0
- cdp/protocol/pwa/events/__init__.py +0 -0
- cdp/protocol/pwa/events/service.py +20 -0
- cdp/protocol/pwa/events/types.py +3 -0
- cdp/protocol/pwa/methods/__init__.py +0 -0
- cdp/protocol/pwa/methods/service.py +98 -0
- cdp/protocol/pwa/methods/types.py +43 -0
- cdp/protocol/pwa/service.py +21 -0
- cdp/protocol/pwa/types.py +15 -0
- cdp/protocol/py.typed +0 -0
- cdp/protocol/runtime/__init__.py +0 -0
- cdp/protocol/runtime/events/__init__.py +0 -0
- cdp/protocol/runtime/events/service.py +85 -0
- cdp/protocol/runtime/events/types.py +55 -0
- cdp/protocol/runtime/methods/__init__.py +0 -0
- cdp/protocol/runtime/methods/service.py +274 -0
- cdp/protocol/runtime/methods/types.py +226 -0
- cdp/protocol/runtime/service.py +21 -0
- cdp/protocol/runtime/types.py +194 -0
- cdp/protocol/security/__init__.py +0 -0
- cdp/protocol/security/events/__init__.py +0 -0
- cdp/protocol/security/events/service.py +29 -0
- cdp/protocol/security/events/types.py +11 -0
- cdp/protocol/security/methods/__init__.py +0 -0
- cdp/protocol/security/methods/service.py +54 -0
- cdp/protocol/security/methods/types.py +9 -0
- cdp/protocol/security/service.py +21 -0
- cdp/protocol/security/types.py +102 -0
- cdp/protocol/service_worker/__init__.py +0 -0
- cdp/protocol/service_worker/events/__init__.py +0 -0
- cdp/protocol/service_worker/events/service.py +45 -0
- cdp/protocol/service_worker/events/types.py +16 -0
- cdp/protocol/service_worker/methods/__init__.py +0 -0
- cdp/protocol/service_worker/methods/service.py +153 -0
- cdp/protocol/service_worker/methods/types.py +36 -0
- cdp/protocol/service_worker/service.py +21 -0
- cdp/protocol/service_worker/types.py +38 -0
- cdp/protocol/storage/__init__.py +0 -0
- cdp/protocol/storage/events/__init__.py +0 -0
- cdp/protocol/storage/events/service.py +141 -0
- cdp/protocol/storage/events/types.py +139 -0
- cdp/protocol/storage/methods/__init__.py +0 -0
- cdp/protocol/storage/methods/service.py +428 -0
- cdp/protocol/storage/methods/types.py +184 -0
- cdp/protocol/storage/service.py +21 -0
- cdp/protocol/storage/types.py +236 -0
- cdp/protocol/system_info/__init__.py +0 -0
- cdp/protocol/system_info/events/__init__.py +0 -0
- cdp/protocol/system_info/events/service.py +20 -0
- cdp/protocol/system_info/events/types.py +3 -0
- cdp/protocol/system_info/methods/__init__.py +0 -0
- cdp/protocol/system_info/methods/service.py +54 -0
- cdp/protocol/system_info/methods/types.py +27 -0
- cdp/protocol/system_info/service.py +21 -0
- cdp/protocol/system_info/types.py +71 -0
- cdp/protocol/target/__init__.py +0 -0
- cdp/protocol/target/events/__init__.py +0 -0
- cdp/protocol/target/events/service.py +77 -0
- cdp/protocol/target/events/types.py +38 -0
- cdp/protocol/target/methods/__init__.py +0 -0
- cdp/protocol/target/methods/service.py +219 -0
- cdp/protocol/target/methods/types.py +148 -0
- cdp/protocol/target/service.py +21 -0
- cdp/protocol/target/types.py +44 -0
- cdp/protocol/tethering/__init__.py +0 -0
- cdp/protocol/tethering/events/__init__.py +0 -0
- cdp/protocol/tethering/events/service.py +29 -0
- cdp/protocol/tethering/events/types.py +9 -0
- cdp/protocol/tethering/methods/__init__.py +0 -0
- cdp/protocol/tethering/methods/service.py +43 -0
- cdp/protocol/tethering/methods/types.py +10 -0
- cdp/protocol/tethering/service.py +21 -0
- cdp/protocol/tethering/types.py +3 -0
- cdp/protocol/tracing/__init__.py +0 -0
- cdp/protocol/tracing/events/__init__.py +0 -0
- cdp/protocol/tracing/events/service.py +45 -0
- cdp/protocol/tracing/events/types.py +28 -0
- cdp/protocol/tracing/methods/__init__.py +0 -0
- cdp/protocol/tracing/methods/service.py +87 -0
- cdp/protocol/tracing/methods/types.py +54 -0
- cdp/protocol/tracing/service.py +21 -0
- cdp/protocol/tracing/types.py +34 -0
- cdp/protocol/web_audio/__init__.py +0 -0
- cdp/protocol/web_audio/events/__init__.py +0 -0
- cdp/protocol/web_audio/events/service.py +125 -0
- cdp/protocol/web_audio/events/types.py +56 -0
- cdp/protocol/web_audio/methods/__init__.py +0 -0
- cdp/protocol/web_audio/methods/service.py +54 -0
- cdp/protocol/web_audio/methods/types.py +17 -0
- cdp/protocol/web_audio/service.py +21 -0
- cdp/protocol/web_audio/types.py +66 -0
- cdp/protocol/web_authn/__init__.py +0 -0
- cdp/protocol/web_authn/events/__init__.py +0 -0
- cdp/protocol/web_authn/events/service.py +53 -0
- cdp/protocol/web_authn/events/types.py +21 -0
- cdp/protocol/web_authn/methods/__init__.py +0 -0
- cdp/protocol/web_authn/methods/service.py +164 -0
- cdp/protocol/web_authn/methods/types.py +61 -0
- cdp/protocol/web_authn/service.py +21 -0
- cdp/protocol/web_authn/types.py +54 -0
- cdp/py.typed +0 -0
- cdp/service.py +184 -0
- chromedeveloperprotocol_client-0.1.0.dist-info/METADATA +15 -0
- chromedeveloperprotocol_client-0.1.0.dist-info/RECORD +476 -0
- chromedeveloperprotocol_client-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""CDP Log Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.network.types import RequestId
|
|
8
|
+
from cdp.protocol.runtime.types import RemoteObject
|
|
9
|
+
from cdp.protocol.runtime.types import StackTrace
|
|
10
|
+
from cdp.protocol.runtime.types import Timestamp
|
|
11
|
+
|
|
12
|
+
class LogEntry(TypedDict, total=True):
|
|
13
|
+
"""Log entry."""
|
|
14
|
+
source: 'Literal["xml", "javascript", "network", "storage", "appcache", "rendering", "security", "deprecation", "worker", "violation", "intervention", "recommendation", "other"]'
|
|
15
|
+
"""Log entry source."""
|
|
16
|
+
level: 'Literal["verbose", "info", "warning", "error"]'
|
|
17
|
+
"""Log entry severity."""
|
|
18
|
+
text: 'str'
|
|
19
|
+
"""Logged text."""
|
|
20
|
+
timestamp: 'Timestamp'
|
|
21
|
+
"""Timestamp when this entry was added."""
|
|
22
|
+
category: NotRequired['Literal["cors"]']
|
|
23
|
+
url: NotRequired['str']
|
|
24
|
+
"""URL of the resource if known."""
|
|
25
|
+
lineNumber: NotRequired['int']
|
|
26
|
+
"""Line number in the resource."""
|
|
27
|
+
stackTrace: NotRequired['StackTrace']
|
|
28
|
+
"""JavaScript stack trace."""
|
|
29
|
+
networkRequestId: NotRequired['RequestId']
|
|
30
|
+
"""Identifier of the network request associated with this entry."""
|
|
31
|
+
workerId: NotRequired['str']
|
|
32
|
+
"""Identifier of the worker associated with this entry."""
|
|
33
|
+
args: NotRequired['List[RemoteObject]']
|
|
34
|
+
"""Call arguments."""
|
|
35
|
+
class ViolationSetting(TypedDict, total=True):
|
|
36
|
+
"""Violation configuration setting."""
|
|
37
|
+
name: 'Literal["longTask", "longLayout", "blockedEvent", "blockedParser", "discouragedAPIUse", "handler", "recurringHandler"]'
|
|
38
|
+
"""Violation type."""
|
|
39
|
+
threshold: 'float'
|
|
40
|
+
"""Time threshold to trigger upon."""
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""CDP Media Domain Events"""
|
|
2
|
+
from ..types import *
|
|
3
|
+
from .types import *
|
|
4
|
+
from typing import Optional, Dict, Any, Callable, TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ....service import Client
|
|
8
|
+
|
|
9
|
+
class MediaEvents:
|
|
10
|
+
"""
|
|
11
|
+
Events for the Media domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Media events.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
def on_player_properties_changed(self, callback: Callable[[playerPropertiesChangedEvent,Optional[str]], None]=None) -> None:
|
|
23
|
+
"""
|
|
24
|
+
This can be called multiple times, and can be used to set / override / remove player properties. A null propValue indicates removal.
|
|
25
|
+
Args:
|
|
26
|
+
callback (callable, optional): Function called when the event is fired.
|
|
27
|
+
The callback receives (params: playerPropertiesChangedEvent, session_id: Optional[str]).
|
|
28
|
+
"""
|
|
29
|
+
self.client.on('Media.playerPropertiesChanged', callback)
|
|
30
|
+
def on_player_events_added(self, callback: Callable[[playerEventsAddedEvent,Optional[str]], None]=None) -> None:
|
|
31
|
+
"""
|
|
32
|
+
Send events as a list, allowing them to be batched on the browser for less congestion. If batched, events must ALWAYS be in chronological order.
|
|
33
|
+
Args:
|
|
34
|
+
callback (callable, optional): Function called when the event is fired.
|
|
35
|
+
The callback receives (params: playerEventsAddedEvent, session_id: Optional[str]).
|
|
36
|
+
"""
|
|
37
|
+
self.client.on('Media.playerEventsAdded', callback)
|
|
38
|
+
def on_player_messages_logged(self, callback: Callable[[playerMessagesLoggedEvent,Optional[str]], None]=None) -> None:
|
|
39
|
+
"""
|
|
40
|
+
Send a list of any messages that need to be delivered.
|
|
41
|
+
Args:
|
|
42
|
+
callback (callable, optional): Function called when the event is fired.
|
|
43
|
+
The callback receives (params: playerMessagesLoggedEvent, session_id: Optional[str]).
|
|
44
|
+
"""
|
|
45
|
+
self.client.on('Media.playerMessagesLogged', callback)
|
|
46
|
+
def on_player_errors_raised(self, callback: Callable[[playerErrorsRaisedEvent,Optional[str]], None]=None) -> None:
|
|
47
|
+
"""
|
|
48
|
+
Send a list of any errors that need to be delivered.
|
|
49
|
+
Args:
|
|
50
|
+
callback (callable, optional): Function called when the event is fired.
|
|
51
|
+
The callback receives (params: playerErrorsRaisedEvent, session_id: Optional[str]).
|
|
52
|
+
"""
|
|
53
|
+
self.client.on('Media.playerErrorsRaised', callback)
|
|
54
|
+
def on_player_created(self, callback: Callable[[playerCreatedEvent,Optional[str]], None]=None) -> None:
|
|
55
|
+
"""
|
|
56
|
+
Called whenever a player is created, or when a new agent joins and receives a list of active players. If an agent is restored, it will receive one event for each active player.
|
|
57
|
+
Args:
|
|
58
|
+
callback (callable, optional): Function called when the event is fired.
|
|
59
|
+
The callback receives (params: playerCreatedEvent, session_id: Optional[str]).
|
|
60
|
+
"""
|
|
61
|
+
self.client.on('Media.playerCreated', callback)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""CDP Media Events"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.media.types import Player
|
|
8
|
+
from cdp.protocol.media.types import PlayerError
|
|
9
|
+
from cdp.protocol.media.types import PlayerEvent
|
|
10
|
+
from cdp.protocol.media.types import PlayerId
|
|
11
|
+
from cdp.protocol.media.types import PlayerMessage
|
|
12
|
+
from cdp.protocol.media.types import PlayerProperty
|
|
13
|
+
|
|
14
|
+
class playerPropertiesChangedEvent(TypedDict, total=True):
|
|
15
|
+
playerId: 'PlayerId'
|
|
16
|
+
properties: 'List[PlayerProperty]'
|
|
17
|
+
class playerEventsAddedEvent(TypedDict, total=True):
|
|
18
|
+
playerId: 'PlayerId'
|
|
19
|
+
events: 'List[PlayerEvent]'
|
|
20
|
+
class playerMessagesLoggedEvent(TypedDict, total=True):
|
|
21
|
+
playerId: 'PlayerId'
|
|
22
|
+
messages: 'List[PlayerMessage]'
|
|
23
|
+
class playerErrorsRaisedEvent(TypedDict, total=True):
|
|
24
|
+
playerId: 'PlayerId'
|
|
25
|
+
errors: 'List[PlayerError]'
|
|
26
|
+
class playerCreatedEvent(TypedDict, total=True):
|
|
27
|
+
player: 'Player'
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""CDP Media Domain Methods"""
|
|
2
|
+
from ..types import *
|
|
3
|
+
from .types import *
|
|
4
|
+
from typing import Optional, Dict, Any, Callable, TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ....service import Client
|
|
8
|
+
|
|
9
|
+
class MediaMethods:
|
|
10
|
+
"""
|
|
11
|
+
Methods for the Media domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Media methods.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
async def enable(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
23
|
+
"""
|
|
24
|
+
Enables the Media domain
|
|
25
|
+
Args:
|
|
26
|
+
params (None, optional): Parameters for the enable method.
|
|
27
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
Dict[str, Any]: The result of the enable call.
|
|
31
|
+
"""
|
|
32
|
+
return await self.client.send(method="Media.enable", params=params,session_id=session_id)
|
|
33
|
+
async def disable(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
34
|
+
"""
|
|
35
|
+
Disables the Media domain.
|
|
36
|
+
Args:
|
|
37
|
+
params (None, optional): Parameters for the disable method.
|
|
38
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
Dict[str, Any]: The result of the disable call.
|
|
42
|
+
"""
|
|
43
|
+
return await self.client.send(method="Media.disable", params=params,session_id=session_id)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""CDP Media Domain"""
|
|
2
|
+
from typing import TYPE_CHECKING
|
|
3
|
+
from .methods.service import MediaMethods
|
|
4
|
+
from .events.service import MediaEvents
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ...service import Client
|
|
8
|
+
|
|
9
|
+
class Media(MediaMethods, MediaEvents):
|
|
10
|
+
"""
|
|
11
|
+
This domain allows detailed inspection of media elements.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Media domain.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
MediaMethods.__init__(self, client)
|
|
21
|
+
MediaEvents.__init__(self, client)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""CDP Media Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.dom.types import BackendNodeId
|
|
8
|
+
|
|
9
|
+
PlayerId = str
|
|
10
|
+
"""Players will get an ID that is unique within the agent context."""
|
|
11
|
+
Timestamp = float
|
|
12
|
+
class PlayerMessage(TypedDict, total=True):
|
|
13
|
+
"""Have one type per entry in MediaLogRecord::Type Corresponds to kMessage"""
|
|
14
|
+
level: 'Literal["error", "warning", "info", "debug"]'
|
|
15
|
+
"""Keep in sync with MediaLogMessageLevel We are currently keeping the message level 'error' separate from the PlayerError type because right now they represent different things, this one being a DVLOG(ERROR) style log message that gets printed based on what log level is selected in the UI, and the other is a representation of a media::PipelineStatus object. Soon however we're going to be moving away from using PipelineStatus for errors and introducing a new error type which should hopefully let us integrate the error log level into the PlayerError type."""
|
|
16
|
+
message: 'str'
|
|
17
|
+
class PlayerProperty(TypedDict, total=True):
|
|
18
|
+
"""Corresponds to kMediaPropertyChange"""
|
|
19
|
+
name: 'str'
|
|
20
|
+
value: 'str'
|
|
21
|
+
class PlayerEvent(TypedDict, total=True):
|
|
22
|
+
"""Corresponds to kMediaEventTriggered"""
|
|
23
|
+
timestamp: 'Timestamp'
|
|
24
|
+
value: 'str'
|
|
25
|
+
class PlayerErrorSourceLocation(TypedDict, total=True):
|
|
26
|
+
"""Represents logged source line numbers reported in an error. NOTE: file and line are from chromium c++ implementation code, not js."""
|
|
27
|
+
file: 'str'
|
|
28
|
+
line: 'int'
|
|
29
|
+
class PlayerError(TypedDict, total=True):
|
|
30
|
+
"""Corresponds to kMediaError"""
|
|
31
|
+
errorType: 'str'
|
|
32
|
+
code: 'int'
|
|
33
|
+
"""Code is the numeric enum entry for a specific set of error codes, such as PipelineStatusCodes in media/base/pipeline_status.h"""
|
|
34
|
+
stack: 'List[PlayerErrorSourceLocation]'
|
|
35
|
+
"""A trace of where this error was caused / where it passed through."""
|
|
36
|
+
cause: 'List[PlayerError]'
|
|
37
|
+
"""Errors potentially have a root cause error, ie, a DecoderError might be caused by an WindowsError"""
|
|
38
|
+
data: 'Dict[str, Any]'
|
|
39
|
+
"""Extra data attached to an error, such as an HRESULT, Video Codec, etc."""
|
|
40
|
+
class Player(TypedDict, total=True):
|
|
41
|
+
playerId: 'PlayerId'
|
|
42
|
+
domNodeId: NotRequired['BackendNodeId']
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""CDP Memory Domain Events"""
|
|
2
|
+
from ..types import *
|
|
3
|
+
from .types import *
|
|
4
|
+
from typing import Optional, Dict, Any, Callable, TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ....service import Client
|
|
8
|
+
|
|
9
|
+
class MemoryEvents:
|
|
10
|
+
"""
|
|
11
|
+
Events for the Memory domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Memory events.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
File without changes
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"""CDP Memory Domain Methods"""
|
|
2
|
+
from ..types import *
|
|
3
|
+
from .types import *
|
|
4
|
+
from typing import Optional, Dict, Any, Callable, TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ....service import Client
|
|
8
|
+
|
|
9
|
+
class MemoryMethods:
|
|
10
|
+
"""
|
|
11
|
+
Methods for the Memory domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Memory methods.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
async def get_dom_counters(self, params: None=None,session_id: Optional[str] = None) -> getDOMCountersReturns:
|
|
23
|
+
"""
|
|
24
|
+
Retruns current DOM object counters.
|
|
25
|
+
Args:
|
|
26
|
+
params (None, optional): Parameters for the getDOMCounters method.
|
|
27
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
getDOMCountersReturns: The result of the getDOMCounters call.
|
|
31
|
+
"""
|
|
32
|
+
return await self.client.send(method="Memory.getDOMCounters", params=params,session_id=session_id)
|
|
33
|
+
async def get_dom_counters_for_leak_detection(self, params: None=None,session_id: Optional[str] = None) -> getDOMCountersForLeakDetectionReturns:
|
|
34
|
+
"""
|
|
35
|
+
Retruns DOM object counters after preparing renderer for leak detection.
|
|
36
|
+
Args:
|
|
37
|
+
params (None, optional): Parameters for the getDOMCountersForLeakDetection method.
|
|
38
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
getDOMCountersForLeakDetectionReturns: The result of the getDOMCountersForLeakDetection call.
|
|
42
|
+
"""
|
|
43
|
+
return await self.client.send(method="Memory.getDOMCountersForLeakDetection", params=params,session_id=session_id)
|
|
44
|
+
async def prepare_for_leak_detection(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
45
|
+
"""
|
|
46
|
+
Prepares for leak detection by terminating workers, stopping spellcheckers, dropping non-essential internal caches, running garbage collections, etc.
|
|
47
|
+
Args:
|
|
48
|
+
params (None, optional): Parameters for the prepareForLeakDetection method.
|
|
49
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
Dict[str, Any]: The result of the prepareForLeakDetection call.
|
|
53
|
+
"""
|
|
54
|
+
return await self.client.send(method="Memory.prepareForLeakDetection", params=params,session_id=session_id)
|
|
55
|
+
async def forcibly_purge_java_script_memory(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
56
|
+
"""
|
|
57
|
+
Simulate OomIntervention by purging V8 memory.
|
|
58
|
+
Args:
|
|
59
|
+
params (None, optional): Parameters for the forciblyPurgeJavaScriptMemory method.
|
|
60
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
Dict[str, Any]: The result of the forciblyPurgeJavaScriptMemory call.
|
|
64
|
+
"""
|
|
65
|
+
return await self.client.send(method="Memory.forciblyPurgeJavaScriptMemory", params=params,session_id=session_id)
|
|
66
|
+
async def set_pressure_notifications_suppressed(self, params: Optional[setPressureNotificationsSuppressedParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
67
|
+
"""
|
|
68
|
+
Enable/disable suppressing memory pressure notifications in all processes.
|
|
69
|
+
Args:
|
|
70
|
+
params (setPressureNotificationsSuppressedParameters, optional): Parameters for the setPressureNotificationsSuppressed method.
|
|
71
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
Dict[str, Any]: The result of the setPressureNotificationsSuppressed call.
|
|
75
|
+
"""
|
|
76
|
+
return await self.client.send(method="Memory.setPressureNotificationsSuppressed", params=params,session_id=session_id)
|
|
77
|
+
async def simulate_pressure_notification(self, params: Optional[simulatePressureNotificationParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
78
|
+
"""
|
|
79
|
+
Simulate a memory pressure notification in all processes.
|
|
80
|
+
Args:
|
|
81
|
+
params (simulatePressureNotificationParameters, optional): Parameters for the simulatePressureNotification method.
|
|
82
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
83
|
+
|
|
84
|
+
Returns:
|
|
85
|
+
Dict[str, Any]: The result of the simulatePressureNotification call.
|
|
86
|
+
"""
|
|
87
|
+
return await self.client.send(method="Memory.simulatePressureNotification", params=params,session_id=session_id)
|
|
88
|
+
async def start_sampling(self, params: Optional[startSamplingParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
89
|
+
"""
|
|
90
|
+
Start collecting native memory profile.
|
|
91
|
+
Args:
|
|
92
|
+
params (startSamplingParameters, optional): Parameters for the startSampling method.
|
|
93
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
Dict[str, Any]: The result of the startSampling call.
|
|
97
|
+
"""
|
|
98
|
+
return await self.client.send(method="Memory.startSampling", params=params,session_id=session_id)
|
|
99
|
+
async def stop_sampling(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
100
|
+
"""
|
|
101
|
+
Stop collecting native memory profile.
|
|
102
|
+
Args:
|
|
103
|
+
params (None, optional): Parameters for the stopSampling method.
|
|
104
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
Dict[str, Any]: The result of the stopSampling call.
|
|
108
|
+
"""
|
|
109
|
+
return await self.client.send(method="Memory.stopSampling", params=params,session_id=session_id)
|
|
110
|
+
async def get_all_time_sampling_profile(self, params: None=None,session_id: Optional[str] = None) -> getAllTimeSamplingProfileReturns:
|
|
111
|
+
"""
|
|
112
|
+
Retrieve native memory allocations profile collected since renderer process startup.
|
|
113
|
+
Args:
|
|
114
|
+
params (None, optional): Parameters for the getAllTimeSamplingProfile method.
|
|
115
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
116
|
+
|
|
117
|
+
Returns:
|
|
118
|
+
getAllTimeSamplingProfileReturns: The result of the getAllTimeSamplingProfile call.
|
|
119
|
+
"""
|
|
120
|
+
return await self.client.send(method="Memory.getAllTimeSamplingProfile", params=params,session_id=session_id)
|
|
121
|
+
async def get_browser_sampling_profile(self, params: None=None,session_id: Optional[str] = None) -> getBrowserSamplingProfileReturns:
|
|
122
|
+
"""
|
|
123
|
+
Retrieve native memory allocations profile collected since browser process startup.
|
|
124
|
+
Args:
|
|
125
|
+
params (None, optional): Parameters for the getBrowserSamplingProfile method.
|
|
126
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
127
|
+
|
|
128
|
+
Returns:
|
|
129
|
+
getBrowserSamplingProfileReturns: The result of the getBrowserSamplingProfile call.
|
|
130
|
+
"""
|
|
131
|
+
return await self.client.send(method="Memory.getBrowserSamplingProfile", params=params,session_id=session_id)
|
|
132
|
+
async def get_sampling_profile(self, params: None=None,session_id: Optional[str] = None) -> getSamplingProfileReturns:
|
|
133
|
+
"""
|
|
134
|
+
Retrieve native memory allocations profile collected since last `startSampling` call.
|
|
135
|
+
Args:
|
|
136
|
+
params (None, optional): Parameters for the getSamplingProfile method.
|
|
137
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
138
|
+
|
|
139
|
+
Returns:
|
|
140
|
+
getSamplingProfileReturns: The result of the getSamplingProfile call.
|
|
141
|
+
"""
|
|
142
|
+
return await self.client.send(method="Memory.getSamplingProfile", params=params,session_id=session_id)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""CDP Memory Methods Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.memory.types import DOMCounter
|
|
8
|
+
from cdp.protocol.memory.types import PressureLevel
|
|
9
|
+
from cdp.protocol.memory.types import SamplingProfile
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class setPressureNotificationsSuppressedParameters(TypedDict, total=True):
|
|
16
|
+
suppressed: 'bool'
|
|
17
|
+
"""If true, memory pressure notifications will be suppressed."""
|
|
18
|
+
class simulatePressureNotificationParameters(TypedDict, total=True):
|
|
19
|
+
level: 'PressureLevel'
|
|
20
|
+
"""Memory pressure level of the notification."""
|
|
21
|
+
class startSamplingParameters(TypedDict, total=False):
|
|
22
|
+
samplingInterval: NotRequired['int']
|
|
23
|
+
"""Average number of bytes between samples."""
|
|
24
|
+
suppressRandomness: NotRequired['bool']
|
|
25
|
+
"""Do not randomize intervals between samples."""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class getDOMCountersReturns(TypedDict):
|
|
31
|
+
documents: 'int'
|
|
32
|
+
nodes: 'int'
|
|
33
|
+
jsEventListeners: 'int'
|
|
34
|
+
class getDOMCountersForLeakDetectionReturns(TypedDict):
|
|
35
|
+
counters: 'List[DOMCounter]'
|
|
36
|
+
"""DOM object counters."""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class getAllTimeSamplingProfileReturns(TypedDict):
|
|
44
|
+
profile: 'SamplingProfile'
|
|
45
|
+
class getBrowserSamplingProfileReturns(TypedDict):
|
|
46
|
+
profile: 'SamplingProfile'
|
|
47
|
+
class getSamplingProfileReturns(TypedDict):
|
|
48
|
+
profile: 'SamplingProfile'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""CDP Memory Domain"""
|
|
2
|
+
from typing import TYPE_CHECKING
|
|
3
|
+
from .methods.service import MemoryMethods
|
|
4
|
+
from .events.service import MemoryEvents
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ...service import Client
|
|
8
|
+
|
|
9
|
+
class Memory(MemoryMethods, MemoryEvents):
|
|
10
|
+
"""
|
|
11
|
+
Access the Memory domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Memory domain.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
MemoryMethods.__init__(self, client)
|
|
21
|
+
MemoryEvents.__init__(self, client)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""CDP Memory Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
PressureLevel = Literal['moderate','critical']
|
|
6
|
+
"""Memory pressure level."""
|
|
7
|
+
class SamplingProfileNode(TypedDict, total=True):
|
|
8
|
+
"""Heap profile sample."""
|
|
9
|
+
size: 'float'
|
|
10
|
+
"""Size of the sampled allocation."""
|
|
11
|
+
total: 'float'
|
|
12
|
+
"""Total bytes attributed to this sample."""
|
|
13
|
+
stack: 'List[str]'
|
|
14
|
+
"""Execution stack at the point of allocation."""
|
|
15
|
+
class SamplingProfile(TypedDict, total=True):
|
|
16
|
+
"""Array of heap profile samples."""
|
|
17
|
+
samples: 'List[SamplingProfileNode]'
|
|
18
|
+
modules: 'List[Module]'
|
|
19
|
+
class Module(TypedDict, total=True):
|
|
20
|
+
"""Executable module information"""
|
|
21
|
+
name: 'str'
|
|
22
|
+
"""Name of the module."""
|
|
23
|
+
uuid: 'str'
|
|
24
|
+
"""UUID of the module."""
|
|
25
|
+
baseAddress: 'str'
|
|
26
|
+
"""Base address where the module is loaded into memory. Encoded as a decimal or hexadecimal (0x prefixed) string."""
|
|
27
|
+
size: 'float'
|
|
28
|
+
"""Size of the module in bytes."""
|
|
29
|
+
class DOMCounter(TypedDict, total=True):
|
|
30
|
+
"""DOM object counter data."""
|
|
31
|
+
name: 'str'
|
|
32
|
+
"""Object name. Note: object names should be presumed volatile and clients should not expect the returned names to be consistent across runs."""
|
|
33
|
+
count: 'int'
|
|
34
|
+
"""Object count."""
|
|
File without changes
|
|
File without changes
|