Index: tools/telemetry/telemetry/core/app.py |
diff --git a/tools/telemetry/telemetry/core/app.py b/tools/telemetry/telemetry/core/app.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..35b44d262023c0f1e0ed9c1feae6e467a316cc45 |
--- /dev/null |
+++ b/tools/telemetry/telemetry/core/app.py |
@@ -0,0 +1,24 @@ |
+# Copyright 2012 The Chromium Authors. All rights reserved. |
+# 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. |
+ |
+ Be sure to clean up after yourself by calling Close() when you are done with |
+ the app. Or better yet: |
+ with possible_app.Create() as app: |
+ ... do all your operations on app here |
+ """ |
+ def __init__(self, app_backend, platform_backend): |
+ assert platform_backend.platform != None |
+ |
+ self._app_backend = app_backend |
+ self._platform_backend = platform_backend |
+ |
+ @property |
+ def platform(self): |
+ return self._platform_backend.platform |
+ |
+ def Close(self): |
+ raise NotImplementedError() |