forked from llimllib/chrome-control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApplicationCache.py
69 lines (51 loc) · 2.14 KB
/
ApplicationCache.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from enum import Enum
from typing import Any, List
from base import ChromeCommand
import Page
class ApplicationCacheResource:
"""Detailed application cache resource information."""
def __init__(self, url: str, size: int, type: str):
# Resource url.
self.url = url
# Resource size.
self.size = size
# Resource type.
self.type = type
class ApplicationCache:
"""Detailed application cache information."""
def __init__(self, manifestURL: str, size: float, creationTime: float, updateTime: float, resources: List):
# Manifest URL.
self.manifestURL = manifestURL
# Application cache size.
self.size = size
# Application cache creation time.
self.creationTime = creationTime
# Application cache update time.
self.updateTime = updateTime
# Application cache resources.
self.resources = resources
class FrameWithManifest:
"""Frame identifier - manifest URL pair."""
def __init__(self, frameId: "Page.FrameId", manifestURL: str, status: int):
# Frame identifier.
self.frameId = frameId
# Manifest URL.
self.manifestURL = manifestURL
# Application cache status.
self.status = status
class getFramesWithManifests(ChromeCommand):
"""Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache."""
def __init__(self): pass
class enable(ChromeCommand):
"""Enables application cache domain notifications."""
def __init__(self): pass
class getManifestForFrame(ChromeCommand):
"""Returns manifest URL for document in the given frame."""
def __init__(self, frameId: "Page.FrameId"):
# Identifier of the frame containing document whose manifest is retrieved.
self.frameId = frameId
class getApplicationCacheForFrame(ChromeCommand):
"""Returns relevant application cache data for the document in given frame."""
def __init__(self, frameId: "Page.FrameId"):
# Identifier of the frame containing document whose application cache is retrieved.
self.frameId = frameId