blob: be43fdb3dd277d69df45fe2be3e23c4006b8b628 (
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
|
// 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_GEOMETRY_H_
#define CC_INPUT_PINCH_ZOOM_SCROLLBAR_GEOMETRY_H_
#include "cc/base/cc_export.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemeGeometry.h"
using WebKit::WebScrollbar;
using WebKit::WebRect;
using WebKit::WebScrollbarThemeGeometry;
namespace cc {
class PinchZoomScrollbarGeometry : public WebScrollbarThemeGeometry {
public:
virtual ~PinchZoomScrollbarGeometry() {}
static const int kTrackWidth;
// Implement WebScrollbarThemeGeometry interface.
virtual WebScrollbarThemeGeometry* clone() const;
virtual int thumbPosition(WebScrollbar* scrollbar);
virtual int thumbLength(WebScrollbar* scrollbar);
virtual int trackPosition(WebScrollbar* scrollbar);
virtual int trackLength(WebScrollbar* scrollbar);
virtual bool hasButtons(WebScrollbar* scrollbar);
virtual bool hasThumb(WebScrollbar* scrollbar);
virtual WebRect trackRect(WebScrollbar* scrollbar);
virtual WebRect thumbRect(WebScrollbar* scrollbar);
virtual int minimumThumbLength(WebScrollbar* scrollbar);
virtual int scrollbarThickness(WebScrollbar* scrollbar);
virtual WebRect backButtonStartRect(WebScrollbar* scrollbar);
virtual WebRect backButtonEndRect(WebScrollbar* scrollbar);
virtual WebRect forwardButtonStartRect(WebScrollbar* scrollbar);
virtual WebRect forwardButtonEndRect(WebScrollbar* scrollbar);
virtual WebRect constrainTrackRectToTrackPieces(WebScrollbar* scrollbar,
const WebRect& trackRect);
virtual void splitTrack(
WebScrollbar* scrollbar, const WebRect& track, WebRect& start_track,
WebRect& thumb, WebRect& end_track);
};
} // namespace WebKit
#endif // CC_INPUT_PINCH_ZOOM_SCROLLBAR_GEOMETRY_H_
|