Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / platform / exported / WebScrollbarThemeClientImpl.h
blob295ce72db39beed584dfc9641ba11e1b21b76703
1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #ifndef WebScrollbarThemeClientImpl_h
27 #define WebScrollbarThemeClientImpl_h
29 #include "platform/PlatformExport.h"
30 #include "platform/scroll/ScrollbarThemeClient.h"
31 #include "public/platform/WebScrollbar.h"
32 #include "wtf/Noncopyable.h"
34 namespace blink {
36 // Adapts a WebScrollbar to the ScrollbarThemeClient interface
37 class PLATFORM_EXPORT WebScrollbarThemeClientImpl : public ScrollbarThemeClient {
38 WTF_MAKE_NONCOPYABLE(WebScrollbarThemeClientImpl);
39 public:
40 // Caller must retain ownership of this pointer and ensure that its lifetime
41 // exceeds this instance.
42 WebScrollbarThemeClientImpl(WebScrollbar*);
43 ~WebScrollbarThemeClientImpl() override;
45 // Implement ScrollbarThemeClient interface
46 int x() const override;
47 int y() const override;
48 int width() const override;
49 int height() const override;
50 IntSize size() const override;
51 IntPoint location() const override;
52 Widget* parent() const override;
53 Widget* root() const override;
54 void setFrameRect(const IntRect&) override;
55 IntRect frameRect() const override;
56 void invalidate() override;
57 void invalidateRect(const IntRect&) override;
58 ScrollbarOverlayStyle scrollbarOverlayStyle() const override;
59 void getTickmarks(Vector<IntRect>&) const override;
60 bool isScrollableAreaActive() const override;
61 IntPoint convertFromContainingWindow(const IntPoint&) override;
62 bool isCustomScrollbar() const override;
63 ScrollbarOrientation orientation() const override;
64 bool isLeftSideVerticalScrollbar() const override;
65 int value() const override;
66 float currentPos() const override;
67 int visibleSize() const override;
68 int totalSize() const override;
69 int maximum() const override;
70 ScrollbarControlSize controlSize() const override;
71 ScrollbarPart pressedPart() const override;
72 ScrollbarPart hoveredPart() const override;
73 void styleChanged() override;
74 void visibilityChanged() override;
75 bool enabled() const override;
76 void setEnabled(bool) override;
77 bool isOverlayScrollbar() const override;
78 bool isAlphaLocked() const override;
79 void setIsAlphaLocked(bool) override;
80 float elasticOverscroll() const override;
81 void setElasticOverscroll(float) override;
82 DisplayItemClient displayItemClient() const override;
83 String debugName() const override;
85 private:
86 WebScrollbar* m_scrollbar;
89 } // namespace blink
91 #endif // WebScrollbarThemeClientImpl_h