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

Unified Diff: third_party/WebKit/Source/core/paint/ScrollbarManager.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
Index: third_party/WebKit/Source/core/paint/ScrollbarManager.h
diff --git a/third_party/WebKit/Source/core/paint/ScrollbarManager.h b/third_party/WebKit/Source/core/paint/ScrollbarManager.h
deleted file mode 100644
index 09dac5b1349693cf1ad31b006eeb7abf0c6d846d..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/paint/ScrollbarManager.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2016 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 ScrollbarManager_h
-#define ScrollbarManager_h
-
-#include "core/CoreExport.h"
-#include "platform/scroll/ScrollableArea.h"
-
-namespace blink {
-
-class CORE_EXPORT ScrollbarManager {
- DISALLOW_NEW();
-
- // Helper class to manage the life cycle of Scrollbar objects.
- public:
- ScrollbarManager(ScrollableArea&);
-
- void Dispose();
-
- Scrollbar* HorizontalScrollbar() const {
- return h_bar_is_attached_ ? h_bar_.Get() : nullptr;
- }
- Scrollbar* VerticalScrollbar() const {
- return v_bar_is_attached_ ? v_bar_.Get() : nullptr;
- }
- bool HasHorizontalScrollbar() const { return HorizontalScrollbar(); }
- bool HasVerticalScrollbar() const { return VerticalScrollbar(); }
-
- // These functions are used to create/destroy scrollbars.
- virtual void SetHasHorizontalScrollbar(bool has_scrollbar) = 0;
- virtual void SetHasVerticalScrollbar(bool has_scrollbar) = 0;
-
- DECLARE_VIRTUAL_TRACE();
-
- protected:
- // TODO(ymalik): This can be made non-virtual since there's a lot of
- // common code in subclasses.
- virtual Scrollbar* CreateScrollbar(ScrollbarOrientation) = 0;
- virtual void DestroyScrollbar(ScrollbarOrientation) = 0;
-
- protected:
- Member<ScrollableArea> scrollable_area_;
-
- // The scrollbars associated with m_scrollableArea. Both can nullptr.
- Member<Scrollbar> h_bar_;
- Member<Scrollbar> v_bar_;
-
- unsigned h_bar_is_attached_ : 1;
- unsigned v_bar_is_attached_ : 1;
-};
-
-} // namespace blink
-
-#endif // ScrollbarManager_h

Powered by Google App Engine
This is Rietveld 408576698