Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.h

Issue 2836813002: Move ScrollbarManager from core to platform and use as Scrollbar parent (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/FrameView.h
diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h
index 061869d708f1de0111c96ba48d060c4c8b146b51..eb6b8665948765e2845f4c387f27a2ae2277f1b4 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.h
+++ b/third_party/WebKit/Source/core/frame/FrameView.h
@@ -39,7 +39,6 @@
#include "core/paint/ObjectPaintProperties.h"
#include "core/paint/PaintInvalidationCapableScrollableArea.h"
#include "core/paint/PaintPhase.h"
-#include "core/paint/ScrollbarManager.h"
#include "core/plugins/PluginView.h"
#include "platform/FrameViewBase.h"
#include "platform/RuntimeEnabledFeatures.h"
@@ -52,6 +51,7 @@
#include "platform/graphics/GraphicsLayerClient.h"
#include "platform/scroll/ScrollTypes.h"
#include "platform/scroll/Scrollbar.h"
+#include "platform/scroll/ScrollbarManager.h"
#include "platform/wtf/Allocator.h"
#include "platform/wtf/AutoReset.h"
#include "platform/wtf/Forward.h"
@@ -103,6 +103,7 @@ typedef unsigned long long DOMTimeStamp;
class CORE_EXPORT FrameView final
: public FrameViewBase,
+ public ScrollbarManager,
public FrameOrPlugin,
public PaintInvalidationCapableScrollableArea {
USING_GARBAGE_COLLECTED_MIXIN(FrameView);
@@ -485,15 +486,6 @@ class CORE_EXPORT FrameView final
void AddScrollbar(Scrollbar*);
const ScrollbarsSet* Scrollbars() const { return &scrollbars_; }
- // If the scroll view does not use a native widget, then it will have
- // cross-platform Scrollbars. These functions can be used to obtain those
- // scrollbars.
- Scrollbar* HorizontalScrollbar() const override {
- return scrollbar_manager_.HorizontalScrollbar();
- }
- Scrollbar* VerticalScrollbar() const override {
- return scrollbar_manager_.VerticalScrollbar();
- }
LayoutScrollbarPart* ScrollCorner() const override { return scroll_corner_; }
void PositionScrollbarLayers();
@@ -542,6 +534,10 @@ class CORE_EXPORT FrameView final
VerticalScrollbarMode() != kScrollbarAlwaysOff;
}
+ void SetHasHorizontalScrollbar(bool) override;
+ void SetHasVerticalScrollbar(bool) override;
+ void DestroyScrollbar(ScrollbarOrientation) override;
+
// The visible content rect has a location that is the scrolled offset of
// the document. The width and height are the layout viewport width and
// height. By default the scrollbars themselves are excluded from this
@@ -875,25 +871,6 @@ class CORE_EXPORT FrameView final
void InvalidateTreeIfNeeded(const PaintInvalidationState&);
private:
- explicit FrameView(LocalFrame&);
- class ScrollbarManager : public blink::ScrollbarManager {
- DISALLOW_NEW();
-
- // Helper class to manage the life cycle of Scrollbar objects.
- public:
- ScrollbarManager(FrameView& scroller) : blink::ScrollbarManager(scroller) {}
-
- void SetHasHorizontalScrollbar(bool has_scrollbar) override;
- void SetHasVerticalScrollbar(bool has_scrollbar) override;
-
- // TODO(ymalik): This should be hidden and all calls should go through
- // setHas*Scrollbar functions above.
- Scrollbar* CreateScrollbar(ScrollbarOrientation) override;
-
- protected:
- void DestroyScrollbar(ScrollbarOrientation) override;
- };
-
void UpdateScrollOffset(const ScrollOffset&, ScrollType) override;
void UpdateScrollbarEnabledState();
@@ -1183,9 +1160,6 @@ class CORE_EXPORT FrameView final
HeapLinkedHashSet<WeakMember<ScrollableArea>>;
AnchoringAdjustmentQueue anchoring_adjustment_queue_;
- // ScrollbarManager holds the Scrollbar instances.
- ScrollbarManager scrollbar_manager_;
-
bool needs_scrollbars_update_;
bool suppress_adjust_view_size_;
bool allows_layout_invalidation_after_layout_clean_;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698