Home | History | Annotate | Download | only in actions

Lines Matching refs:this

2 // Use of this source code is governed by a BSD-style license that can be
10 this.element_ = opt_options.element;
11 this.left_start_ratio_ = opt_options.left_start_ratio;
12 this.top_start_ratio_ = opt_options.top_start_ratio;
13 this.direction_ = opt_options.direction;
14 this.distance_ = opt_options.distance;
15 this.speed_ = opt_options.speed;
17 this.element_ = document.body;
18 this.left_start_ratio_ = 0.5;
19 this.top_start_ratio_ = 0.5;
20 this.direction_ = 'left';
21 this.distance_ = 0;
22 this.speed_ = 800;
34 // This class swipes a page for a specified distance.
36 var self = this;
38 this.beginMeasuringHook = function() {};
39 this.endMeasuringHook = function() {};
41 this.callback_ = opt_callback;
45 this.options_ = new SwipeGestureOptions(opt_options);
46 // Assign this.element_ here instead of constructor, because the constructor
47 // ensures this method will be called after the document is loaded.
48 this.element_ = this.options_.element_;
49 requestAnimationFrame(this.startGesture_.bind(this));
53 this.beginMeasuringHook();
55 var rect = __GestureCommon_GetBoundingVisibleRect(this.options_.element_);
57 rect.left + rect.width * this.options_.left_start_ratio_;
59 rect.top + rect.height * this.options_.top_start_ratio_;
60 chrome.gpuBenchmarking.swipe(this.options_.direction_,
61 this.options_.distance_,
62 this.onGestureComplete_.bind(this),
64 this.options_.speed_);
68 this.endMeasuringHook();
71 if (this.callback_)
72 this.callback_();