blob: 4cba6df5b65af6180e3e04f268ba33365f287c46 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module telemetry.internal.backends.chrome.tab_list_backend</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.internal.backends.html"><font color="#ffffff">backends</font></a>.<a href="telemetry.internal.backends.chrome.html"><font color="#ffffff">chrome</font></a>.tab_list_backend</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/backends/chrome/tab_list_backend.py">telemetry/internal/backends/chrome/tab_list_backend.py</a></font></td></tr></table>
<p><tt>#&nbsp;Copyright&nbsp;2013&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
#&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
#&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br>
<a href="telemetry.internal.backends.chrome_inspector.inspector_backend_list.html">telemetry.internal.backends.chrome_inspector.inspector_backend_list</a><br>
</td><td width="25%" valign=top><a href="json.html">json</a><br>
<a href="telemetry.internal.browser.tab.html">telemetry.internal.browser.tab</a><br>
</td><td width="25%" valign=top><a href="telemetry.core.util.html">telemetry.core.util</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="telemetry.core.exceptions.html#Error">telemetry.core.exceptions.Error</a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="telemetry.internal.backends.chrome.tab_list_backend.html#TabUnexpectedResponseException">TabUnexpectedResponseException</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="telemetry.internal.backends.chrome_inspector.inspector_backend_list.html#InspectorBackendList">telemetry.internal.backends.chrome_inspector.inspector_backend_list.InspectorBackendList</a>(<a href="_abcoll.html#Sequence">_abcoll.Sequence</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="telemetry.internal.backends.chrome.tab_list_backend.html#TabListBackend">TabListBackend</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="TabListBackend">class <strong>TabListBackend</strong></a>(<a href="telemetry.internal.backends.chrome_inspector.inspector_backend_list.html#InspectorBackendList">telemetry.internal.backends.chrome_inspector.inspector_backend_list.InspectorBackendList</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;dynamic&nbsp;sequence&nbsp;of&nbsp;tab.Tabs&nbsp;in&nbsp;UI&nbsp;order.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="telemetry.internal.backends.chrome.tab_list_backend.html#TabListBackend">TabListBackend</a></dd>
<dd><a href="telemetry.internal.backends.chrome_inspector.inspector_backend_list.html#InspectorBackendList">telemetry.internal.backends.chrome_inspector.inspector_backend_list.InspectorBackendList</a></dd>
<dd><a href="_abcoll.html#Sequence">_abcoll.Sequence</a></dd>
<dd><a href="_abcoll.html#Sized">_abcoll.Sized</a></dd>
<dd><a href="_abcoll.html#Iterable">_abcoll.Iterable</a></dd>
<dd><a href="_abcoll.html#Container">_abcoll.Container</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="TabListBackend-ActivateTab"><strong>ActivateTab</strong></a>(self, tab_id, timeout<font color="#909090">=30</font>)</dt><dd><tt>Activates&nbsp;the&nbsp;tab&nbsp;with&nbsp;the&nbsp;given&nbsp;debugger_url.<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;devtools_http.DevToolsClientConnectionError<br>
&nbsp;&nbsp;devtools_client_backend.TabNotFoundError<br>
&nbsp;&nbsp;<a href="#TabUnexpectedResponseException">TabUnexpectedResponseException</a></tt></dd></dl>
<dl><dt><a name="TabListBackend-CloseTab"><strong>CloseTab</strong></a>(self, tab_id, timeout<font color="#909090">=300</font>)</dt><dd><tt>Closes&nbsp;the&nbsp;tab&nbsp;with&nbsp;the&nbsp;given&nbsp;debugger_url.<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;devtools_http.DevToolsClientConnectionError<br>
&nbsp;&nbsp;devtools_client_backend.TabNotFoundError<br>
&nbsp;&nbsp;<a href="#TabUnexpectedResponseException">TabUnexpectedResponseException</a><br>
&nbsp;&nbsp;exceptions.TimeoutException</tt></dd></dl>
<dl><dt><a name="TabListBackend-CreateWrapper"><strong>CreateWrapper</strong></a>(self, inspector_backend)</dt></dl>
<dl><dt><a name="TabListBackend-Get"><strong>Get</strong></a>(self, index, ret)</dt><dd><tt>Returns&nbsp;self[index]&nbsp;if&nbsp;it&nbsp;exists,&nbsp;or&nbsp;ret&nbsp;if&nbsp;index&nbsp;is&nbsp;out&nbsp;of&nbsp;bounds.</tt></dd></dl>
<dl><dt><a name="TabListBackend-New"><strong>New</strong></a>(self, timeout)</dt><dd><tt>Makes&nbsp;a&nbsp;new&nbsp;tab.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;A&nbsp;Tab&nbsp;object.<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;devtools_http.DevToolsClientConnectionError</tt></dd></dl>
<dl><dt><a name="TabListBackend-ShouldIncludeContext"><strong>ShouldIncludeContext</strong></a>(self, context)</dt></dl>
<dl><dt><a name="TabListBackend-__init__"><strong>__init__</strong></a>(self, browser_backend)</dt></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__abstractmethods__</strong> = frozenset([])</dl>
<hr>
Methods inherited from <a href="telemetry.internal.backends.chrome_inspector.inspector_backend_list.html#InspectorBackendList">telemetry.internal.backends.chrome_inspector.inspector_backend_list.InspectorBackendList</a>:<br>
<dl><dt><a name="TabListBackend-GetBackendFromContextId"><strong>GetBackendFromContextId</strong></a>(self, context_id)</dt></dl>
<dl><dt><a name="TabListBackend-GetContextInfo"><strong>GetContextInfo</strong></a>(self, context_id)</dt></dl>
<dl><dt><a name="TabListBackend-GetTabById"><strong>GetTabById</strong></a>(self, identifier)</dt></dl>
<dl><dt><a name="TabListBackend-IterContextIds"><strong>IterContextIds</strong></a>(self)</dt></dl>
<dl><dt><a name="TabListBackend-__getitem__"><strong>__getitem__</strong></a>(self, index)</dt><dd><tt>#&nbsp;TODO(nednguyen):&nbsp;Remove&nbsp;this&nbsp;method&nbsp;and&nbsp;turn&nbsp;inspector_backend_list&nbsp;API&nbsp;to<br>
#&nbsp;dictionary-like&nbsp;API&nbsp;(crbug.com/398467)</tt></dd></dl>
<dl><dt><a name="TabListBackend-__iter__"><strong>__iter__</strong></a>(self)</dt></dl>
<dl><dt><a name="TabListBackend-__len__"><strong>__len__</strong></a>(self)</dt></dl>
<hr>
Data descriptors inherited from <a href="telemetry.internal.backends.chrome_inspector.inspector_backend_list.html#InspectorBackendList">telemetry.internal.backends.chrome_inspector.inspector_backend_list.InspectorBackendList</a>:<br>
<dl><dt><strong>app</strong></dt>
</dl>
<hr>
Methods inherited from <a href="_abcoll.html#Sequence">_abcoll.Sequence</a>:<br>
<dl><dt><a name="TabListBackend-__contains__"><strong>__contains__</strong></a>(self, value)</dt></dl>
<dl><dt><a name="TabListBackend-__reversed__"><strong>__reversed__</strong></a>(self)</dt></dl>
<dl><dt><a name="TabListBackend-count"><strong>count</strong></a>(self, value)</dt><dd><tt>S.<a href="#TabListBackend-count">count</a>(value)&nbsp;-&gt;&nbsp;integer&nbsp;--&nbsp;return&nbsp;number&nbsp;of&nbsp;occurrences&nbsp;of&nbsp;value</tt></dd></dl>
<dl><dt><a name="TabListBackend-index"><strong>index</strong></a>(self, value)</dt><dd><tt>S.<a href="#TabListBackend-index">index</a>(value)&nbsp;-&gt;&nbsp;integer&nbsp;--&nbsp;return&nbsp;first&nbsp;index&nbsp;of&nbsp;value.<br>
Raises&nbsp;ValueError&nbsp;if&nbsp;the&nbsp;value&nbsp;is&nbsp;not&nbsp;present.</tt></dd></dl>
<hr>
Class methods inherited from <a href="_abcoll.html#Sized">_abcoll.Sized</a>:<br>
<dl><dt><a name="TabListBackend-__subclasshook__"><strong>__subclasshook__</strong></a>(cls, C)<font color="#909090"><font face="helvetica, arial"> from <a href="abc.html#ABCMeta">abc.ABCMeta</a></font></font></dt></dl>
<hr>
Data descriptors inherited from <a href="_abcoll.html#Sized">_abcoll.Sized</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="_abcoll.html#Sized">_abcoll.Sized</a>:<br>
<dl><dt><strong>__metaclass__</strong> = &lt;class 'abc.ABCMeta'&gt;<dd><tt>Metaclass&nbsp;for&nbsp;defining&nbsp;Abstract&nbsp;Base&nbsp;Classes&nbsp;(ABCs).<br>
&nbsp;<br>
Use&nbsp;this&nbsp;metaclass&nbsp;to&nbsp;create&nbsp;an&nbsp;ABC.&nbsp;&nbsp;An&nbsp;ABC&nbsp;can&nbsp;be&nbsp;subclassed<br>
directly,&nbsp;and&nbsp;then&nbsp;acts&nbsp;as&nbsp;a&nbsp;mix-in&nbsp;class.&nbsp;&nbsp;You&nbsp;can&nbsp;also&nbsp;register<br>
unrelated&nbsp;concrete&nbsp;classes&nbsp;(even&nbsp;built-in&nbsp;classes)&nbsp;and&nbsp;unrelated<br>
ABCs&nbsp;as&nbsp;'virtual&nbsp;subclasses'&nbsp;--&nbsp;these&nbsp;and&nbsp;their&nbsp;descendants&nbsp;will<br>
be&nbsp;considered&nbsp;subclasses&nbsp;of&nbsp;the&nbsp;registering&nbsp;ABC&nbsp;by&nbsp;the&nbsp;built-in<br>
issubclass()&nbsp;function,&nbsp;but&nbsp;the&nbsp;registering&nbsp;ABC&nbsp;won't&nbsp;show&nbsp;up&nbsp;in<br>
their&nbsp;MRO&nbsp;(Method&nbsp;Resolution&nbsp;Order)&nbsp;nor&nbsp;will&nbsp;method<br>
implementations&nbsp;defined&nbsp;by&nbsp;the&nbsp;registering&nbsp;ABC&nbsp;be&nbsp;callable&nbsp;(not<br>
even&nbsp;via&nbsp;super()).</tt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="TabUnexpectedResponseException">class <strong>TabUnexpectedResponseException</strong></a>(<a href="telemetry.core.exceptions.html#Error">telemetry.core.exceptions.Error</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="telemetry.internal.backends.chrome.tab_list_backend.html#TabUnexpectedResponseException">TabUnexpectedResponseException</a></dd>
<dd><a href="telemetry.core.exceptions.html#Error">telemetry.core.exceptions.Error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods inherited from <a href="telemetry.core.exceptions.html#Error">telemetry.core.exceptions.Error</a>:<br>
<dl><dt><a name="TabUnexpectedResponseException-AddDebuggingMessage"><strong>AddDebuggingMessage</strong></a>(self, msg)</dt><dd><tt>Adds&nbsp;a&nbsp;message&nbsp;to&nbsp;the&nbsp;description&nbsp;of&nbsp;the&nbsp;exception.<br>
&nbsp;<br>
Many&nbsp;Telemetry&nbsp;exceptions&nbsp;arise&nbsp;from&nbsp;failures&nbsp;in&nbsp;another&nbsp;application.&nbsp;These<br>
failures&nbsp;are&nbsp;difficult&nbsp;to&nbsp;pinpoint.&nbsp;This&nbsp;method&nbsp;allows&nbsp;Telemetry&nbsp;classes&nbsp;to<br>
append&nbsp;useful&nbsp;debugging&nbsp;information&nbsp;to&nbsp;the&nbsp;exception.&nbsp;This&nbsp;method&nbsp;also&nbsp;logs<br>
information&nbsp;about&nbsp;the&nbsp;location&nbsp;from&nbsp;where&nbsp;it&nbsp;was&nbsp;called.</tt></dd></dl>
<dl><dt><a name="TabUnexpectedResponseException-__init__"><strong>__init__</strong></a>(self, msg<font color="#909090">=''</font>)</dt></dl>
<dl><dt><a name="TabUnexpectedResponseException-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<hr>
Data descriptors inherited from <a href="telemetry.core.exceptions.html#Error">telemetry.core.exceptions.Error</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#TabUnexpectedResponseException-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="TabUnexpectedResponseException-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#TabUnexpectedResponseException-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>
<dl><dt><a name="TabUnexpectedResponseException-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#TabUnexpectedResponseException-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
<dl><dt><a name="TabUnexpectedResponseException-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#TabUnexpectedResponseException-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
<dl><dt><a name="TabUnexpectedResponseException-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#TabUnexpectedResponseException-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
<dl><dt><a name="TabUnexpectedResponseException-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
<dl><dt><a name="TabUnexpectedResponseException-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#TabUnexpectedResponseException-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
<dl><dt><a name="TabUnexpectedResponseException-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#TabUnexpectedResponseException-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>
<dl><dt><a name="TabUnexpectedResponseException-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
<dl><dt><a name="TabUnexpectedResponseException-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table></td></tr></table>
</body></html>