Add signalSyncPoint to the WebGraphicsContext3D command buffer impls.
[chromium-blink-merge.git] / cc / test / fake_web_scrollbar_theme_geometry.h
blobdc814ed11bd4832b1e0119ad46ac82e0058eb200
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_TEST_FAKE_WEB_SCROLLBAR_THEME_GEOMETRY_H_
6 #define CC_TEST_FAKE_WEB_SCROLLBAR_THEME_GEOMETRY_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemeGeometry.h"
11 namespace cc {
13 class FakeWebScrollbarThemeGeometry : public WebKit::WebScrollbarThemeGeometry {
14 public:
15 static scoped_ptr<WebKit::WebScrollbarThemeGeometry> Create(bool has_thumb) {
16 return scoped_ptr<WebKit::WebScrollbarThemeGeometry>(
17 new FakeWebScrollbarThemeGeometry(has_thumb));
20 // WebScrollbarThemeGeometry implementation.
21 virtual WebKit::WebScrollbarThemeGeometry* clone() const OVERRIDE;
22 virtual int thumbPosition(WebKit::WebScrollbar* scrollbar) OVERRIDE;
23 virtual int thumbLength(WebKit::WebScrollbar* scrollbar) OVERRIDE;
24 virtual int trackPosition(WebKit::WebScrollbar* scrollbar) OVERRIDE;
25 virtual int trackLength(WebKit::WebScrollbar* scrollbar) OVERRIDE;
26 virtual bool hasButtons(WebKit::WebScrollbar* scrollbar) OVERRIDE;
27 virtual bool hasThumb(WebKit::WebScrollbar* scrollbar) OVERRIDE;
28 virtual WebKit::WebRect trackRect(WebKit::WebScrollbar* scrollbar) OVERRIDE;
29 virtual WebKit::WebRect thumbRect(WebKit::WebScrollbar* scrollbar) OVERRIDE;
30 virtual int minimumThumbLength(WebKit::WebScrollbar* scrollbar) OVERRIDE;
31 virtual int scrollbarThickness(WebKit::WebScrollbar* scrollbar) OVERRIDE;
32 virtual WebKit::WebRect backButtonStartRect(WebKit::WebScrollbar* scrollbar)
33 OVERRIDE;
34 virtual WebKit::WebRect backButtonEndRect(WebKit::WebScrollbar* scrollbar)
35 OVERRIDE;
36 virtual WebKit::WebRect forwardButtonStartRect(
37 WebKit::WebScrollbar* scrollbar) OVERRIDE;
38 virtual WebKit::WebRect forwardButtonEndRect(WebKit::WebScrollbar* scrollbar)
39 OVERRIDE;
40 virtual WebKit::WebRect constrainTrackRectToTrackPieces(
41 WebKit::WebScrollbar* scrollbar,
42 const WebKit::WebRect& rect) OVERRIDE;
43 virtual void splitTrack(WebKit::WebScrollbar* scrollbar,
44 const WebKit::WebRect& track,
45 WebKit::WebRect& start_track,
46 WebKit::WebRect& thumb,
47 WebKit::WebRect& end_track) OVERRIDE;
49 protected:
50 explicit FakeWebScrollbarThemeGeometry(bool has_thumb)
51 : has_thumb_(has_thumb) {}
52 bool has_thumb_;
55 } // namespace cc
57 #endif // CC_TEST_FAKE_WEB_SCROLLBAR_THEME_GEOMETRY_H_