summaryrefslogtreecommitdiff
path: root/chromium/content/browser/renderer_host/input/tap_suppression_controller_client.h
blob: 821f546792005d31f274807f1e897780417bd735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// 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.

#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_CLIENT_H_
#define CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_CLIENT_H_

namespace content {

// This class provides an interface for callbacks made by
// TapSuppressionController.
class TapSuppressionControllerClient {
 public:
  virtual ~TapSuppressionControllerClient() {}

  // Derived classes should implement this function to return the maximum time
  // they allow between a GestureFlingCancel and its corresponding tap down.
  virtual int MaxCancelToDownTimeInMs() = 0;

  // Derived classes should implement this function to return the maximum time
  // they allow between a single tap's down and up events.
  virtual int MaxTapGapTimeInMs() = 0;

  // Called whenever the deferred tap down (if saved) should be dropped totally.
  virtual void DropStashedTapDown() = 0;

  // Called whenever the deferred tap down (if saved) should be forwarded to the
  // renderer. In this case, the tap down should go back to normal path it was
  // on before being deferred.
  virtual void ForwardStashedTapDownForDeferral() = 0;

  // Called whenever the deferred tap down (if saved) should be forwarded to the
  // renderer. In this case, the tap down should skip deferral filter, because
  // it is handled here, and there is no need to delay it more.
  virtual void ForwardStashedTapDownSkipDeferral() = 0;

 protected:
  TapSuppressionControllerClient() {}

 private:
  DISALLOW_COPY_AND_ASSIGN(TapSuppressionControllerClient);
};

}  // namespace content

#endif  // CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_CLIENT_H_