Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: tools/telemetry/telemetry/internal/browser/browser.py

Issue 1224083015: [telemetry] Add support for requesting memory dumps via DevTools API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final adjustments Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 6
7 from telemetry.core import exceptions 7 from telemetry.core import exceptions
8 from telemetry.core import local_server 8 from telemetry.core import local_server
9 from telemetry.core import memory_cache_http_server 9 from telemetry.core import memory_cache_http_server
10 from telemetry.core import profiling_controller 10 from telemetry.core import profiling_controller
11 from telemetry import decorators 11 from telemetry import decorators
12 from telemetry.internal import app 12 from telemetry.internal import app
13 from telemetry.internal.backends import browser_backend 13 from telemetry.internal.backends import browser_backend
14 from telemetry.internal.browser import browser_credentials 14 from telemetry.internal.browser import browser_credentials
15 from telemetry.internal.browser import extension_dict 15 from telemetry.internal.browser import extension_dict
16 from telemetry.internal.browser import tab_list 16 from telemetry.internal.browser import tab_list
17 from telemetry.internal.browser import web_contents
17 18
18 19
19 class Browser(app.App): 20 class Browser(app.App):
20 """A running browser instance that can be controlled in a limited way. 21 """A running browser instance that can be controlled in a limited way.
21 22
22 To create a browser instance, use browser_finder.FindBrowser. 23 To create a browser instance, use browser_finder.FindBrowser.
23 24
24 Be sure to clean up after yourself by calling Close() when you are done with 25 Be sure to clean up after yourself by calling Close() when you are done with
25 the browser. Or better yet: 26 the browser. Or better yet:
26 browser_to_create = FindBrowser(options) 27 browser_to_create = FindBrowser(options)
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 275
275 @property 276 @property
276 def supports_system_info(self): 277 def supports_system_info(self):
277 return self._browser_backend.supports_system_info 278 return self._browser_backend.supports_system_info
278 279
279 def GetSystemInfo(self): 280 def GetSystemInfo(self):
280 """Returns low-level information about the system, if available. 281 """Returns low-level information about the system, if available.
281 282
282 See the documentation of the SystemInfo class for more details.""" 283 See the documentation of the SystemInfo class for more details."""
283 return self._browser_backend.GetSystemInfo() 284 return self._browser_backend.GetSystemInfo()
285
286 @property
287 def supports_memory_dumping(self):
288 return self._browser_backend.supports_memory_dumping
289
290 def DumpMemory(self, timeout=web_contents.DEFAULT_WEB_CONTENTS_TIMEOUT):
291 return self._browser_backend.DumpMemory(timeout)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698