We want to be able to work with windows on a higher level than before. One important goal is to opt-in on the messages you get instead of being flooded.
This protocol will prevent a lot of flooding from the other services, but it will on the other hand flood a bit itself. There is no way to stop it from sending OnWindowActivated messages for example.
When Opera Dragonfly is used to debug on the desktop, it probably doesn't want to use this service at all, but just have the filters automatically set to include the active window. We might cater for this later. The way to do it with the current protocol would be to retrieve the active window and put that in the include filter manually. However the active window might have changed by the time Opera Dragonfly gets to do that. Additionally, we would like Opera Dragonfly to start with a certain DOM node selected. I see no other way than adding some C++ hooks to do this when debugging locally.
Request the currently active window.
The default WindowFilter used to be includePatternList "*". After this command was introduced, the default filter is includeIDList 0 (unknown).
The filtering mechanism works by taking the appropriate window-id of the message and checks it:If the INCLUDE filter contains the window-id, or a window that has opened the window, and the window-id is not in the EXCLUDE filter, then send the message. Otherwise, discard the message
includeIDList and excludeIDList appends to the existing filter. This is true whether these occur in the same ModifyFilter command or occur in different ModifyFilter commands. If the clearFilter flag is present, the filter will cleared before the includeIDList and excludeIDList appends to the filter.
TODO: Perhaps WindowFilter should work on window types as well?
Sent whenever the active window is changed.
Sent when a window is closed.
Sent whenever a window has finished loading. This event happens after external resources are loaded. Note: if the page uses scripting to dynamically change the page or load more data, this event may occur multiple times for the same window.
Sent every time there is a new window, or some window information changed.