1 2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3<html><head><title>Python: module telemetry.internal.browser.browser</title> 4<meta charset="utf-8"> 5</head><body bgcolor="#f0f0f8"> 6 7<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 8<tr bgcolor="#7799ee"> 9<td valign=bottom> <br> 10<font color="#ffffff" face="helvetica, arial"> <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.browser.html"><font color="#ffffff">browser</font></a>.browser</strong></big></big></font></td 11><td align=right valign=bottom 12><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/browser/browser.py">telemetry/internal/browser/browser.py</a></font></td></tr></table> 13 <p><tt># Copyright 2012 The Chromium Authors. All rights reserved.<br> 14# Use of this source code is governed by a BSD-style license that can be<br> 15# found in the LICENSE file.</tt></p> 16<p> 17<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 18<tr bgcolor="#aa55cc"> 19<td colspan=3 valign=bottom> <br> 20<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 21 22<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 23<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.internal.app.html">telemetry.internal.app</a><br> 24<a href="telemetry.internal.backends.browser_backend.html">telemetry.internal.backends.browser_backend</a><br> 25<a href="telemetry.internal.browser.browser_credentials.html">telemetry.internal.browser.browser_credentials</a><br> 26<a href="catapult_base.cloud_storage.html">catapult_base.cloud_storage</a><br> 27</td><td width="25%" valign=top><a href="telemetry.decorators.html">telemetry.decorators</a><br> 28<a href="telemetry.internal.util.exception_formatter.html">telemetry.internal.util.exception_formatter</a><br> 29<a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br> 30<a href="telemetry.internal.browser.extension_dict.html">telemetry.internal.browser.extension_dict</a><br> 31</td><td width="25%" valign=top><a href="logging.html">logging</a><br> 32<a href="telemetry.core.profiling_controller.html">telemetry.core.profiling_controller</a><br> 33<a href="sys.html">sys</a><br> 34<a href="telemetry.internal.browser.tab_list.html">telemetry.internal.browser.tab_list</a><br> 35</td><td width="25%" valign=top><a href="telemetry.internal.browser.web_contents.html">telemetry.internal.browser.web_contents</a><br> 36</td></tr></table></td></tr></table><p> 37<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 38<tr bgcolor="#ee77aa"> 39<td colspan=3 valign=bottom> <br> 40<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 41 42<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 43<td width="100%"><dl> 44<dt><font face="helvetica, arial"><a href="telemetry.internal.app.html#App">telemetry.internal.app.App</a>(<a href="__builtin__.html#object">__builtin__.object</a>) 45</font></dt><dd> 46<dl> 47<dt><font face="helvetica, arial"><a href="telemetry.internal.browser.browser.html#Browser">Browser</a> 48</font></dt></dl> 49</dd> 50</dl> 51 <p> 52<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 53<tr bgcolor="#ffc8d8"> 54<td colspan=3 valign=bottom> <br> 55<font color="#000000" face="helvetica, arial"><a name="Browser">class <strong>Browser</strong></a>(<a href="telemetry.internal.app.html#App">telemetry.internal.app.App</a>)</font></td></tr> 56 57<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> 58<td colspan=2><tt>A running browser instance that can be controlled in a limited way.<br> 59 <br> 60To create a browser instance, use browser_finder.FindBrowser.<br> 61 <br> 62Be sure to clean up after yourself by calling <a href="#Browser-Close">Close</a>() when you are done with<br> 63the browser. Or better yet:<br> 64 browser_to_create = FindBrowser(options)<br> 65 with browser_to_create.Create(options) as browser:<br> 66 ... do all your operations on browser here<br> </tt></td></tr> 67<tr><td> </td> 68<td width="100%"><dl><dt>Method resolution order:</dt> 69<dd><a href="telemetry.internal.browser.browser.html#Browser">Browser</a></dd> 70<dd><a href="telemetry.internal.app.html#App">telemetry.internal.app.App</a></dd> 71<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 72</dl> 73<hr> 74Methods defined here:<br> 75<dl><dt><a name="Browser-Close"><strong>Close</strong></a>(self)</dt><dd><tt>Closes this browser.</tt></dd></dl> 76 77<dl><dt><a name="Browser-DumpMemory"><strong>DumpMemory</strong></a>(self, timeout<font color="#909090">=90</font>)</dt></dl> 78 79<dl><dt><a name="Browser-GetStackTrace"><strong>GetStackTrace</strong></a>(self)</dt></dl> 80 81<dl><dt><a name="Browser-GetStandardOutput"><strong>GetStandardOutput</strong></a>(self)</dt></dl> 82 83<dl><dt><a name="Browser-GetSystemInfo"><strong>GetSystemInfo</strong></a>(self)</dt><dd><tt>Returns low-level information about the system, if available.<br> 84 <br> 85See the documentation of the SystemInfo class for more details.</tt></dd></dl> 86 87<dl><dt><a name="Browser-SetMemoryPressureNotificationsSuppressed"><strong>SetMemoryPressureNotificationsSuppressed</strong></a>(self, suppressed, timeout<font color="#909090">=90</font>)</dt></dl> 88 89<dl><dt><a name="Browser-SimulateMemoryPressureNotification"><strong>SimulateMemoryPressureNotification</strong></a>(self, pressure_level, timeout<font color="#909090">=90</font>)</dt></dl> 90 91<dl><dt><a name="Browser-__init__"><strong>__init__</strong></a>(self, backend, platform_backend, credentials_path)</dt></dl> 92 93<hr> 94Data descriptors defined here:<br> 95<dl><dt><strong>browser_type</strong></dt> 96</dl> 97<dl><dt><strong>cpu_stats</strong></dt> 98<dd><tt>Returns a dict of cpu statistics for the system.<br> 99{ 'Browser': {<br> 100 'CpuProcessTime': S,<br> 101 'TotalTime': T<br> 102 },<br> 103 'Gpu': {<br> 104 'CpuProcessTime': S,<br> 105 'TotalTime': T<br> 106 },<br> 107 'Renderer': {<br> 108 'CpuProcessTime': S,<br> 109 'TotalTime': T<br> 110 }<br> 111}<br> 112Any of the above keys may be missing on a per-platform basis.</tt></dd> 113</dl> 114<dl><dt><strong>extensions</strong></dt> 115</dl> 116<dl><dt><strong>foreground_tab</strong></dt> 117</dl> 118<dl><dt><strong>memory_stats</strong></dt> 119<dd><tt>Returns a dict of memory statistics for the browser:<br> 120{ 'Browser': {<br> 121 'VM': R,<br> 122 'VMPeak': S,<br> 123 'WorkingSetSize': T,<br> 124 'WorkingSetSizePeak': U,<br> 125 'ProportionalSetSize': V,<br> 126 'PrivateDirty': W<br> 127 },<br> 128 'Gpu': {<br> 129 'VM': R,<br> 130 'VMPeak': S,<br> 131 'WorkingSetSize': T,<br> 132 'WorkingSetSizePeak': U,<br> 133 'ProportionalSetSize': V,<br> 134 'PrivateDirty': W<br> 135 },<br> 136 'Renderer': {<br> 137 'VM': R,<br> 138 'VMPeak': S,<br> 139 'WorkingSetSize': T,<br> 140 'WorkingSetSizePeak': U,<br> 141 'ProportionalSetSize': V,<br> 142 'PrivateDirty': W<br> 143 },<br> 144 'SystemCommitCharge': X,<br> 145 'SystemTotalPhysicalMemory': Y,<br> 146 'ProcessCount': Z,<br> 147}<br> 148Any of the above keys may be missing on a per-platform basis.</tt></dd> 149</dl> 150<dl><dt><strong>profiling_controller</strong></dt> 151</dl> 152<dl><dt><strong>supports_cpu_metrics</strong></dt> 153</dl> 154<dl><dt><strong>supports_extensions</strong></dt> 155</dl> 156<dl><dt><strong>supports_memory_dumping</strong></dt> 157</dl> 158<dl><dt><strong>supports_memory_metrics</strong></dt> 159</dl> 160<dl><dt><strong>supports_overriding_memory_pressure_notifications</strong></dt> 161</dl> 162<dl><dt><strong>supports_power_metrics</strong></dt> 163</dl> 164<dl><dt><strong>supports_system_info</strong></dt> 165</dl> 166<dl><dt><strong>supports_tab_control</strong></dt> 167</dl> 168<dl><dt><strong>tabs</strong></dt> 169</dl> 170<hr> 171Methods inherited from <a href="telemetry.internal.app.html#App">telemetry.internal.app.App</a>:<br> 172<dl><dt><a name="Browser-__enter__"><strong>__enter__</strong></a>(self)</dt></dl> 173 174<dl><dt><a name="Browser-__exit__"><strong>__exit__</strong></a>(self, *args)</dt></dl> 175 176<hr> 177Data descriptors inherited from <a href="telemetry.internal.app.html#App">telemetry.internal.app.App</a>:<br> 178<dl><dt><strong>__dict__</strong></dt> 179<dd><tt>dictionary for instance variables (if defined)</tt></dd> 180</dl> 181<dl><dt><strong>__weakref__</strong></dt> 182<dd><tt>list of weak references to the object (if defined)</tt></dd> 183</dl> 184<dl><dt><strong>app_type</strong></dt> 185</dl> 186<dl><dt><strong>platform</strong></dt> 187</dl> 188</td></tr></table></td></tr></table> 189</body></html>