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

Unified Diff: tools/chrome_remote_control/chrome_remote_control/android_platform.py

Issue 11187036: Android: start upstreaming some of our perf tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: tools/chrome_remote_control/chrome_remote_control/android_platform.py
diff --git a/tools/chrome_remote_control/chrome_remote_control/android_platform.py b/tools/chrome_remote_control/chrome_remote_control/android_platform.py
new file mode 100644
index 0000000000000000000000000000000000000000..7a7feb1baa43a934641179d0cb515b6cf4908982
--- /dev/null
+++ b/tools/chrome_remote_control/chrome_remote_control/android_platform.py
@@ -0,0 +1,30 @@
+# Copyright (c) 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.
+
+import os
+import sys
+
+# Get build/android scripts into our path.
+sys.path.append(
+ os.path.abspath(
+ os.path.join(os.path.dirname(__file__),
+ '../../../build/android')))
+try:
+ from pylib import surface_stats_collector # pylint: disable=F0401
+except Exception:
+ surface_stats_collector = None
+
+
+class AndroidPlatform(object):
+ def __init__(self, adb, window_package, window_activity):
+ super(AndroidPlatform, self).__init__()
+ self._surface_collector = surface_stats_collector.SurfaceStatsCollector(
+ adb, window_package, window_activity)
+
+ def StartSurfaceCollector(self):
+ self._surface_collector.Start()
+
+ def StopSurfaceCollector(self):
+ self._surface_collector.PrintPerfResults('')
+ self._surface_collector.Stop()

Powered by Google App Engine
This is Rietveld 408576698