summaryrefslogtreecommitdiffstats
path: root/cc/input/pinch_zoom_scrollbar.h
blob: 2aa6005fc0ae470039dee201374c929af7b6c43e (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
47
48
49
50
51
52
// 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 CC_INPUT_PINCH_ZOOM_SCROLLBAR_H_
#define CC_INPUT_PINCH_ZOOM_SCROLLBAR_H_

#include "cc/base/cc_export.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h"

namespace cc {

class LayerTreeHost;

class PinchZoomScrollbar : public WebKit::WebScrollbar {
 public:
  static const float kDefaultOpacity;
  static const float kFadeDurationInSeconds;

  PinchZoomScrollbar(
      WebKit::WebScrollbar::Orientation orientation,
      LayerTreeHost* owner);
  virtual ~PinchZoomScrollbar() {}

  // Implement WebKit::WebScrollbar.
  virtual bool isOverlay() const;
  virtual int value() const;
  virtual WebKit::WebPoint location() const;
  virtual WebKit::WebSize size() const;
  virtual bool enabled() const;
  virtual int maximum() const;
  virtual int totalSize() const;
  virtual bool isScrollViewScrollbar() const;
  virtual bool isScrollableAreaActive() const;
  virtual void getTickmarks(WebKit::WebVector<WebKit::WebRect>&) const {}
  virtual WebKit::WebScrollbar::ScrollbarControlSize controlSize() const;
  virtual WebKit::WebScrollbar::ScrollbarPart pressedPart() const;
  virtual WebKit::WebScrollbar::ScrollbarPart hoveredPart() const;
  virtual WebKit::WebScrollbar::ScrollbarOverlayStyle
      scrollbarOverlayStyle() const;
  virtual bool isCustomScrollbar() const;
  virtual WebKit::WebScrollbar::Orientation orientation() const;

 private:
  WebKit::WebScrollbar::Orientation orientation_;
  LayerTreeHost* owner_;

  DISALLOW_COPY_AND_ASSIGN(PinchZoomScrollbar);
};  // class PinchZoomScrollbar

}  // namespace cc
#endif  // CC_INPUT_PINCH_ZOOM_SCROLLBAR_H_