public class ScopeWindowManager extends AbstractService implements WindowManager
| Modifier and Type | Field and Description |
|---|---|
static String |
CLOSE_ALL_PAGES_ACTION |
static org.apache.commons.jxpath.CompiledExpression |
WINDOW_FINDER_EXPRESSION |
servicesSERVICE_NAME| Constructor and Description |
|---|
ScopeWindowManager(ScopeServices services) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWindow(WmProtos.WindowInfo info) |
void |
clearFilter() |
void |
closeAllWindows()
Closes all open windows, including dialogues, by iterating through them and calling
WindowManager.closeWindow(int) on each of them if version 2.1 or greater of the Window Manager service is
available. |
void |
closeWindow(int windowId)
Requests the closing of a specific window.
|
void |
createWindow() |
void |
filterActiveWindow()
Filter only the active window so we don't get messages from other windows (like thread
messages).
|
void |
filterWindow(Integer windowId) |
void |
findDriverWindow()
Find a window suitable for driving, find the active window, if it is not a normal window, find
the first normal window via JXPath.
|
int |
getActiveWindowId() |
AtomicInteger |
getLastHttpResponseCode() |
int |
getOpenWindowCount() |
List<Integer> |
getWindowHandles() |
void |
init()
Get the list of all windows, then find a driver window (which needs to be 'normal' window)
after that set the active window to that window.
|
void |
openUrl(int windowId,
String url) |
void |
removeWindow(Integer windowId) |
void |
resetWindowsList() |
void |
setActiveWindow(String title) |
void |
setActiveWindowId(Integer windowId)
Sets the active window if the window is of type 'normal' discards any other window such as
'dialog' or 'unknown'.
|
buildPayload, executeMessage, executeMessage, executeMessage, getServiceName, getServiceVersion, isVersionInRange, sleep, toString, xpathIterator, xpathPointerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetServiceName, getServiceVersionpublic static final String CLOSE_ALL_PAGES_ACTION
public static final org.apache.commons.jxpath.CompiledExpression WINDOW_FINDER_EXPRESSION
public ScopeWindowManager(ScopeServices services)
public AtomicInteger getLastHttpResponseCode()
getLastHttpResponseCode in interface WindowManagerpublic int getOpenWindowCount()
getOpenWindowCount in interface WindowManagerpublic void setActiveWindowId(Integer windowId)
WindowManagersetActiveWindowId in interface WindowManagerpublic int getActiveWindowId()
getActiveWindowId in interface WindowManagerpublic void addWindow(WmProtos.WindowInfo info)
addWindow in interface WindowManagerpublic void removeWindow(Integer windowId)
removeWindow in interface WindowManagerpublic void init()
public void findDriverWindow()
WindowManagerfindDriverWindow in interface WindowManagerpublic void filterActiveWindow()
filterActiveWindow in interface WindowManagerpublic void setActiveWindow(String title)
setActiveWindow in interface WindowManagerpublic void createWindow()
createWindow in interface WindowManagerpublic List<Integer> getWindowHandles()
getWindowHandles in interface WindowManagerpublic void resetWindowsList()
resetWindowsList in interface WindowManagerpublic void clearFilter()
clearFilter in interface WindowManagerpublic void filterWindow(Integer windowId)
filterWindow in interface WindowManagerpublic void openUrl(int windowId,
String url)
openUrl in interface WindowManagerpublic void closeWindow(int windowId)
WindowManagerOperaIntervals.WINDOW_CLOSE_TIMEOUT timeout.closeWindow in interface WindowManagerpublic void closeAllWindows()
WindowManagerWindowManager.closeWindow(int) on each of them if version 2.1 or greater of the Window Manager service is
available. This method deviates from WindowManager.closeWindow(int) and will if not attempt to use
Opera's action system to close the windows and dialogues.
This method is normally blocking, and will not return until the window has been closed or until
it hits the OperaIntervals.WINDOW_CLOSE_TIMEOUT
timeout. However, note that using the action system is slower than Scope, and that it is also
notoriously unreliable. We cannot guarantee that this method will be blocking if the action
mechanism is used.closeAllWindows in interface WindowManagerCopyright © 2013. All Rights Reserved.