Bug 1769547 - Do not MOZ_CRASH() on missing process r=nika
[gecko.git] / widget / ScrollbarDrawingAndroid.h
blobc4e54b6b2aed0fec53043f1c1be731688b81c6ae
1 /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_widget_ScrollbarDrawingAndroid_h
7 #define mozilla_widget_ScrollbarDrawingAndroid_h
9 #include "nsITheme.h"
10 #include "ScrollbarDrawing.h"
12 namespace mozilla::widget {
14 class ScrollbarDrawingAndroid final : public ScrollbarDrawing {
15 public:
16 ScrollbarDrawingAndroid() : ScrollbarDrawing(Kind::Android) {}
17 virtual ~ScrollbarDrawingAndroid() = default;
19 LayoutDeviceIntSize GetMinimumWidgetSize(nsPresContext*,
20 StyleAppearance aAppearance,
21 nsIFrame* aFrame) override;
23 ScrollbarSizes GetScrollbarSizes(nsPresContext*, StyleScrollbarWidth,
24 Overlay) override;
26 template <typename PaintBackendData>
27 void DoPaintScrollbarThumb(PaintBackendData&, const LayoutDeviceRect& aRect,
28 ScrollbarKind, nsIFrame* aFrame,
29 const ComputedStyle& aStyle,
30 const EventStates& aElementState,
31 const EventStates& aDocumentState, const Colors&,
32 const DPIRatio&);
33 bool PaintScrollbarThumb(DrawTarget&, const LayoutDeviceRect& aRect,
34 ScrollbarKind, nsIFrame* aFrame,
35 const ComputedStyle& aStyle,
36 const EventStates& aElementState,
37 const EventStates& aDocumentState, const Colors&,
38 const DPIRatio&) override;
39 bool PaintScrollbarThumb(WebRenderBackendData&, const LayoutDeviceRect& aRect,
40 ScrollbarKind, nsIFrame* aFrame,
41 const ComputedStyle& aStyle,
42 const EventStates& aElementState,
43 const EventStates& aDocumentState, const Colors&,
44 const DPIRatio&) override;
46 void RecomputeScrollbarParams() override;
48 bool ShouldDrawScrollbarButtons() override { return false; }
51 } // namespace mozilla::widget
53 #endif