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

Unified Diff: tools/telemetry/telemetry/internal/actions/scroll_bounce.js

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/internal/actions/scroll_bounce.js
diff --git a/tools/telemetry/telemetry/internal/actions/scroll_bounce.js b/tools/telemetry/telemetry/internal/actions/scroll_bounce.js
deleted file mode 100644
index b41383c096ddd859695f487cd89308371e55134f..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/actions/scroll_bounce.js
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2014 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.
-
-'use strict';
-
-(function() {
- function supportedByBrowser() {
- return !!(window.chrome &&
- chrome.gpuBenchmarking &&
- chrome.gpuBenchmarking.scrollBounce);
- }
-
- function ScrollBounceAction(opt_callback) {
- var self = this;
-
- this.beginMeasuringHook = function() {}
- this.endMeasuringHook = function() {}
-
- this.callback_ = opt_callback;
- }
-
- ScrollBounceAction.prototype.start = function(options) {
- this.options_ = options;
- // Assign this.element_ here instead of constructor, because the constructor
- // ensures this method will be called after the document is loaded.
- this.element_ = this.options_.element;
- requestAnimationFrame(this.startGesture_.bind(this));
- };
-
- ScrollBounceAction.prototype.startGesture_ = function() {
- this.beginMeasuringHook();
-
- var rect = __GestureCommon_GetBoundingVisibleRect(this.options_.element);
- var start_left =
- rect.left + rect.width * this.options_.left_start_ratio;
- var start_top =
- rect.top + rect.height * this.options_.top_start_ratio;
- chrome.gpuBenchmarking.scrollBounce(this.options_.direction,
- this.options_.distance,
- this.options_.overscroll,
- this.options_.repeat_count,
- this.onGestureComplete_.bind(this),
- start_left, start_top,
- this.options_.speed);
- };
-
- ScrollBounceAction.prototype.onGestureComplete_ = function() {
- this.endMeasuringHook();
-
- // We're done.
- if (this.callback_)
- this.callback_();
- };
-
- window.__ScrollBounceAction = ScrollBounceAction;
- window.__ScrollBounceAction_SupportedByBrowser = supportedByBrowser;
-})();
« no previous file with comments | « tools/telemetry/telemetry/internal/actions/scroll.py ('k') | tools/telemetry/telemetry/internal/actions/scroll_bounce.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698