com.opera.core.systems.scope.handlers
Class ScopeEventHandler

java.lang.Object
  extended by com.opera.core.systems.scope.handlers.ScopeEventHandler
All Implemented Interfaces:
EventHandler

public class ScopeEventHandler
extends Object
implements EventHandler

Provides an event handler to the Scope protocol.

Author:
Deniz Turkoglu

Field Summary
protected  ScopeServices services
           
 
Constructor Summary
ScopeEventHandler(ScopeServices services)
           
 
Method Summary
 void onActiveWindow(Integer id)
          Changes the window-manager's active window on active window event.
 void onDesktopWindowActivated(DesktopWmProtos.DesktopWindowInfo info)
          Fired when a window becomes active (steals focus).
 void onDesktopWindowClosed(DesktopWmProtos.DesktopWindowInfo info)
          Fired when a window instance is closed.
 void onDesktopWindowLoaded(DesktopWmProtos.DesktopWindowInfo info)
          Fired when loading Finished event.
 void onDesktopWindowShown(DesktopWmProtos.DesktopWindowInfo info)
          Fired when a desktop window is shown at the last possible moment so the window should be fully visible.
 void onDesktopWindowUpdated(DesktopWmProtos.DesktopWindowInfo info)
          Fired when a new window is created or window has incoming changes (such as title change).
 void onHttpResponse(int responseCode)
          Fired when an HTTP response code is received.
 void onMessage(ConsoleLoggerProtos.ConsoleMessage message)
          Fired on new console messages.
 void onOperaIdle()
          Fired when Opera is idle.
 void onQuickMenuClosed(DesktopWmProtos.QuickMenuID menuId)
          Fired when menu closed.
 void onQuickMenuItemPressed(DesktopWmProtos.QuickMenuItemID menuItemID)
          Fired when menu item is pressed.
 void onQuickMenuShown(DesktopWmProtos.QuickMenuInfo menuInfoShown)
          Fired when menu shown.
 void onReadyStateChange(EcmascriptProtos.ReadyStateChange change)
          Fired when the ready state of a document is communicated.
 void onRequest(int windowId)
           
 void onRuntimeStarted(EsdbgProtos.RuntimeInfo info)
          Fired when a new runtime started is received Runtime-started is needed for tracking EcmaScript injections.
 void onRuntimeStopped(Integer id)
          Remove any runtime that has been stopped.
 void onSelftestDone()
          Fired when all selftests are done.
 void onSelftestOutput(SelftestProtos.SelftestOutput output)
          Fired when receiving the output of a selftest.
 void onUpdatedWindow(WmProtos.WindowInfo info)
          Fired when a new window is created or window has incoming changes (such as title change).
 void onWindowClosed(Integer id)
          Handles windows that have been closed.
 void onWindowLoaded(int windowId)
          Fired when a window load is complete.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

services

protected ScopeServices services
Constructor Detail

ScopeEventHandler

public ScopeEventHandler(ScopeServices services)
Method Detail

onActiveWindow

public void onActiveWindow(Integer id)
Changes the window-manager's active window on active window event.

Specified by:
onActiveWindow in interface EventHandler
Parameters:
id - ID of the window that becomes active

onRuntimeStopped

public void onRuntimeStopped(Integer id)
Remove any runtime that has been stopped. This call can be quite late and hence is resolved by cleanup method in onRuntimeStarted.

Specified by:
onRuntimeStopped in interface EventHandler
Parameters:
id - ID of the runtime is stopped

onRequest

public void onRequest(int windowId)
Specified by:
onRequest in interface EventHandler

onWindowClosed

public void onWindowClosed(Integer id)
Handles windows that have been closed. Removes it from the list and removes the runtimes that are associated with it.

Specified by:
onWindowClosed in interface EventHandler
Parameters:
id - ID of the closed window

onWindowLoaded

public void onWindowLoaded(int windowId)
Description copied from interface: EventHandler
Fired when a window load is complete.

Specified by:
onWindowLoaded in interface EventHandler
Parameters:
windowId - ID of the window that is loaded

onOperaIdle

public void onOperaIdle()
Description copied from interface: EventHandler
Fired when Opera is idle.

Specified by:
onOperaIdle in interface EventHandler

onRuntimeStarted

public void onRuntimeStarted(EsdbgProtos.RuntimeInfo info)
Description copied from interface: EventHandler
Fired when a new runtime started is received Runtime-started is needed for tracking EcmaScript injections.

Specified by:
onRuntimeStarted in interface EventHandler
Parameters:
info - information on the runtime that was started

onUpdatedWindow

public void onUpdatedWindow(WmProtos.WindowInfo info)
Description copied from interface: EventHandler
Fired when a new window is created or window has incoming changes (such as title change).

Specified by:
onUpdatedWindow in interface EventHandler
Parameters:
info - information about the window

onMessage

public void onMessage(ConsoleLoggerProtos.ConsoleMessage message)
Description copied from interface: EventHandler
Fired on new console messages.

Specified by:
onMessage in interface EventHandler
Parameters:
message - the incoming message

onHttpResponse

public void onHttpResponse(int responseCode)
Description copied from interface: EventHandler
Fired when an HTTP response code is received.

Specified by:
onHttpResponse in interface EventHandler
Parameters:
responseCode - the response code

onReadyStateChange

public void onReadyStateChange(EcmascriptProtos.ReadyStateChange change)
Description copied from interface: EventHandler
Fired when the ready state of a document is communicated.

Specified by:
onReadyStateChange in interface EventHandler
Parameters:
change - the ready state change

onDesktopWindowShown

public void onDesktopWindowShown(DesktopWmProtos.DesktopWindowInfo info)
Description copied from interface: EventHandler
Fired when a desktop window is shown at the last possible moment so the window should be fully visible.

Specified by:
onDesktopWindowShown in interface EventHandler
Parameters:
info - information about the window

onDesktopWindowUpdated

public void onDesktopWindowUpdated(DesktopWmProtos.DesktopWindowInfo info)
Description copied from interface: EventHandler
Fired when a new window is created or window has incoming changes (such as title change).

Specified by:
onDesktopWindowUpdated in interface EventHandler
Parameters:
info - information about the window that is updated

onDesktopWindowActivated

public void onDesktopWindowActivated(DesktopWmProtos.DesktopWindowInfo info)
Description copied from interface: EventHandler
Fired when a window becomes active (steals focus).

Specified by:
onDesktopWindowActivated in interface EventHandler
Parameters:
info - information about the window that is activated

onDesktopWindowClosed

public void onDesktopWindowClosed(DesktopWmProtos.DesktopWindowInfo info)
Description copied from interface: EventHandler
Fired when a window instance is closed.

Specified by:
onDesktopWindowClosed in interface EventHandler
Parameters:
info - information about the window that is closed

onDesktopWindowLoaded

public void onDesktopWindowLoaded(DesktopWmProtos.DesktopWindowInfo info)
Description copied from interface: EventHandler
Fired when loading Finished event.

Specified by:
onDesktopWindowLoaded in interface EventHandler
Parameters:
info - information about the window that is loaded

onQuickMenuShown

public void onQuickMenuShown(DesktopWmProtos.QuickMenuInfo menuInfoShown)
Description copied from interface: EventHandler
Fired when menu shown.

Specified by:
onQuickMenuShown in interface EventHandler
Parameters:
menuInfoShown - menu information of the recently appeared menu

onQuickMenuClosed

public void onQuickMenuClosed(DesktopWmProtos.QuickMenuID menuId)
Description copied from interface: EventHandler
Fired when menu closed.

Specified by:
onQuickMenuClosed in interface EventHandler
Parameters:
menuId - ID of the recently closed menu

onQuickMenuItemPressed

public void onQuickMenuItemPressed(DesktopWmProtos.QuickMenuItemID menuItemID)
Description copied from interface: EventHandler
Fired when menu item is pressed.

Specified by:
onQuickMenuItemPressed in interface EventHandler
Parameters:
menuItemID - ID of the menu item that was pressed

onSelftestOutput

public void onSelftestOutput(SelftestProtos.SelftestOutput output)
Description copied from interface: EventHandler
Fired when receiving the output of a selftest.

Specified by:
onSelftestOutput in interface EventHandler
Parameters:
output - the output of the selftest

onSelftestDone

public void onSelftestDone()
Description copied from interface: EventHandler
Fired when all selftests are done.

Specified by:
onSelftestDone in interface EventHandler


Copyright © 2012. All Rights Reserved.