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

Unified Diff: tools/telemetry/telemetry/core/app.py

Issue 675613003: Moving some functions from browser to app. Adding function prototypes to app backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/backends/app_backend.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/app.py
diff --git a/tools/telemetry/telemetry/core/app.py b/tools/telemetry/telemetry/core/app.py
index 1c032cc64e286201613d2a3d9f6c7b1a87b189a7..8831911310db32037b95f4cc8e38d8ff51ab39e6 100644
--- a/tools/telemetry/telemetry/core/app.py
+++ b/tools/telemetry/telemetry/core/app.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+
class App(object):
""" A running application instance that can be controlled in a limited way.
@@ -17,8 +18,24 @@ class App(object):
self._platform_backend = platform_backend
@property
+ def app_type(self):
+ return self._app_backend.app_type
+
+ @property
def platform(self):
return self._platform_backend.platform
+ def __enter__(self):
+ return self
+
+ def __exit__(self, *args):
+ self.Close()
+
def Close(self):
raise NotImplementedError()
+
+ def GetStandardOutput(self):
+ return self._app_backend.GetStandardOutput()
+
+ def GetStackTrace(self):
+ return self._app_backend.GetStackTrace()
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/backends/app_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698