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

Unified Diff: third_party/WebKit/Source/WebKit/chromium/src/WebScrollbarImpl.h

Issue 7538006: Pepper and WebKit API change to support a plugin knowing if a scrollbar is an overlay one. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Make scrollbars appear when chrome becomes active Created 9 years, 4 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/WebKit/chromium/src/WebScrollbarImpl.h
===================================================================
--- third_party/WebKit/Source/WebKit/chromium/src/WebScrollbarImpl.h (revision 92488)
+++ third_party/WebKit/Source/WebKit/chromium/src/WebScrollbarImpl.h (working copy)
@@ -31,24 +31,39 @@
#ifndef WebScrollbarImpl_h
#define WebScrollbarImpl_h
-#include "ScrollableArea.h"
#include "WebScrollbar.h"
#include <wtf/RefPtr.h>
+#include <wtf/Vector.h>
namespace WebCore {
+class IntPoint;
+class IntRect;
class Scrollbar;
}
namespace WebKit {
-class WebScrollbarImpl : public WebScrollbar,
- public WebCore::ScrollableArea {
+class ScrollbarGroup;
+
+class WebScrollbarImpl : public WebScrollbar {
public:
- WebScrollbarImpl(WebScrollbarClient*, Orientation orientation);
+ WebScrollbarImpl(Orientation,
+ ScrollbarGroup*,
+ WebScrollbarClient*);
~WebScrollbarImpl();
+ void setScrollOffset(int scrollOffset);
+ void invalidateScrollbarRect(const WebCore::IntRect&);
+ void getTickmarks(Vector<WebCore::IntRect>&) const;
+ WebCore::IntPoint convertFromContainingViewToScrollbar(const WebCore::IntPoint& parentPoint) const;
+ void scrollbarStyleChanged();
+
+ int scrollOffset() { return m_scrollOffset; }
+ WebCore::Scrollbar* scrollbar() { return m_scrollbar.get(); }
+
// WebKit::WebScrollbar methods
+ virtual bool isOverlay();
virtual void setLocation(const WebRect&);
virtual int value() const;
virtual void setValue(int position);
@@ -57,24 +72,6 @@
virtual void paint(WebCanvas*, const WebRect&);
virtual bool handleInputEvent(const WebInputEvent&);
- // WebCore::ScrollableArea methods
- virtual int scrollSize(WebCore::ScrollbarOrientation) const;
- virtual int scrollPosition(WebCore::Scrollbar*) const;
- virtual void setScrollOffset(const WebCore::IntPoint&);
- virtual void invalidateScrollbarRect(WebCore::Scrollbar*, const WebCore::IntRect&);
- virtual void invalidateScrollCornerRect(const WebCore::IntRect&);
- virtual bool isActive() const;
- virtual ScrollableArea* enclosingScrollableArea() const;
- virtual WebCore::IntRect scrollCornerRect() const { return WebCore::IntRect(); }
- virtual bool isScrollCornerVisible() const;
- virtual void getTickmarks(Vector<WebCore::IntRect>&) const;
- virtual WebCore::Scrollbar* horizontalScrollbar() const;
- virtual WebCore::Scrollbar* verticalScrollbar() const;
- virtual int visibleHeight() const;
- virtual int visibleWidth() const;
- virtual WebCore::IntSize contentsSize() const;
- virtual WebCore::IntSize overhangAmount() const;
-
private:
bool onMouseDown(const WebInputEvent& event);
bool onMouseUp(const WebInputEvent& event);
@@ -83,6 +80,7 @@
bool onMouseWheel(const WebInputEvent& event);
bool onKeyDown(const WebInputEvent& event);
+ ScrollbarGroup* m_group;
WebScrollbarClient* m_client;
int m_scrollOffset;

Powered by Google App Engine
This is Rietveld 408576698