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

Unified Diff: tools/telemetry/telemetry/page/actions/gesture_action.py

Issue 356243002: Delete gesture_action.py and remove support for JSON attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address review comments. Created 6 years, 5 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/telemetry/telemetry/page/actions/gesture_action.py
diff --git a/tools/telemetry/telemetry/page/actions/gesture_action.py b/tools/telemetry/telemetry/page/actions/gesture_action.py
deleted file mode 100644
index 1f04cff1cc2daa662bf8895d62c37c0a5ac2b360..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/page/actions/gesture_action.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 2013 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.
-
-from telemetry.page.actions import page_action
-from telemetry import decorators
-from telemetry.web_perf import timeline_interaction_record as tir_module
-
-class GestureAction(page_action.PageAction):
- def __init__(self, attributes=None):
- super(GestureAction, self).__init__(attributes)
- if not hasattr(self, 'automatically_record_interaction'):
- self.automatically_record_interaction = True
-
- def RunAction(self, tab):
- interaction_name = 'Gesture_%s' % self.__class__.__name__
- if self.automatically_record_interaction:
- tab.ExecuteJavaScript('console.time("%s");' %
- tir_module.TimelineInteractionRecord.GetJavaScriptMarker(
- interaction_name, [tir_module.IS_SMOOTH]))
- self.RunGesture(tab)
- if self.automatically_record_interaction:
- tab.ExecuteJavaScript('console.timeEnd("%s");' %
- tir_module.TimelineInteractionRecord.GetJavaScriptMarker(
- interaction_name, [tir_module.IS_SMOOTH]))
-
- def RunGesture(self, tab):
- raise NotImplementedError()
-
- @staticmethod
- def GetGestureSourceTypeFromOptions(tab):
- gesture_source_type = tab.browser.synthetic_gesture_source_type
- return 'chrome.gpuBenchmarking.' + gesture_source_type.upper() + '_INPUT'
-
- @staticmethod
- @decorators.Cache
- def IsGestureSourceTypeSupported(tab, gesture_source_type):
- # TODO(dominikg): remove once support for
- # 'chrome.gpuBenchmarking.gestureSourceTypeSupported' has
- # been rolled into reference build.
- if tab.EvaluateJavaScript("""
- typeof chrome.gpuBenchmarking.gestureSourceTypeSupported ===
- 'undefined'"""):
- return (tab.browser.platform.GetOSName() != 'mac' or
- gesture_source_type.lower() != 'touch')
-
- return tab.EvaluateJavaScript("""
- chrome.gpuBenchmarking.gestureSourceTypeSupported(
- chrome.gpuBenchmarking.%s_INPUT)"""
- % (gesture_source_type.upper()))

Powered by Google App Engine
This is Rietveld 408576698