Created
March 8, 2019 11:22
-
-
Save ochameau/bcd8f766cee658f68f6d0200176366ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RemoteAgent | |
=> TabObserver() | |
emits: | |
- open => Targets.connect(tab.linkedBrowser) | |
- close => Targets.disconnect(tab.linkedBrowser) | |
=> HttpServer() | |
Handlers: | |
=> TargetListHandler(Targets) | |
=> ProtocolHandler(Targets) | |
=> VersionHandler(Targets) | |
methods: | |
- register() = HttpServer.registerPathHandler | |
=> Targets() | |
methods: | |
- connect => new Target(Targets, browser-element) | |
- disconnect => target.disconnect() | |
=> Target(Targets, browser-element) | |
=> TargetListener(Target) | |
methods: | |
- listen: | |
=> SocketListener() | |
emits: | |
accepted => TargetListener.onConnectionAccepted("accepted", WebSocketTransport, SocketListener) | |
- onSocketAccepted: | |
=> Connection(id, WebSocketTransport) | |
methods: | |
- registerSession(Session) | |
- onPacket(packet) => Session.onMessage(packet) based on sessionID | |
- send(packet) => WebSocketTransport.send(packet) | |
=> Session(Connection, Target) | |
=> Domains(Session, modules) | |
methods | |
- get => instanciate domain: new Cls(Session, Target) | |
methods: | |
- onMessage => Call related domain method and reply via Connection.send() -or- MessageManager.sendAsyncMessage | |
- receiveMessage => Connection.send() | |
- onEvent => Connection.send() | |
=> ContentProcessSession(MessageManager, Window, DocShell) (instantiated in the content process via a frame script) | |
=> Domains(ContentProcessSession, modules) | |
methods: | |
- receiveMessage => Call related domain method and reply via MessageManager.sendAsyncMessage | |
- onEvent => forward the event via MessageManager.sendAsyncMessage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment