summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_web_scrollbar.h
blob: 20565a36fd929048eedddbe52ceb22912bc13ed5 (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
// Copyright 2012 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_TEST_FAKE_WEB_SCROLLBAR_H_
#define CC_TEST_FAKE_WEB_SCROLLBAR_H_

#include "base/memory/scoped_ptr.h"
#include <public/WebScrollbar.h>

namespace cc {

class FakeWebScrollbar : public WebKit::WebScrollbar {
 public:
  static scoped_ptr<FakeWebScrollbar> Create() {
    return make_scoped_ptr(new FakeWebScrollbar());
  }

  void setOverlay(bool isOverlay);

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

 private:
  FakeWebScrollbar();

  bool m_isOverlay;
};

}  // namespace cc

#endif  // CC_TEST_FAKE_WEB_SCROLLBAR_H_