BackingStoreClient.h [plain text]
#ifndef BackingStoreClient_h
#define BackingStoreClient_h
#include "BlackBerryPlatformMisc.h"
#include "WebPage_p.h"
#include <wtf/Vector.h>
namespace WebCore {
class FloatPoint;
class Frame;
class IntPoint;
class IntSize;
class IntRect;
}
namespace BlackBerry {
namespace WebKit {
class BackingStore;
class WebPagePrivate;
class BackingStoreClient {
public:
static BackingStoreClient* create(WebCore::Frame*, WebCore::Frame* parentFrame, WebPage* parentPage);
~BackingStoreClient();
BackingStore* backingStore() const { return m_backingStore; }
WebCore::Frame* frame() const { return m_frame; }
bool isMainFrame() const { return m_frame == m_webPage->d->m_mainFrame; }
WebCore::IntPoint scrollPosition() const;
WebCore::IntPoint maximumScrollPosition() const;
void setScrollPosition(const WebCore::IntPoint&);
WebCore::IntPoint transformedScrollPosition() const;
WebCore::IntPoint transformedMaximumScrollPosition() const;
WebCore::IntSize actualVisibleSize() const;
WebCore::IntSize transformedActualVisibleSize() const;
WebCore::IntSize viewportSize() const;
WebCore::IntSize transformedViewportSize() const;
WebCore::IntRect visibleContentsRect() const;
WebCore::IntSize contentsSize() const;
bool isLoading() const;
WebPagePrivate::LoadState loadState() const;
bool isFocused() const;
bool isClientGeneratedScroll() const;
void setIsClientGeneratedScroll(bool);
bool isScrollNotificationSuppressed() const;
void setIsScrollNotificationSuppressed(bool);
void checkOriginOfCurrentScrollOperation();
private:
BackingStoreClient(WebCore::Frame*, WebPage* parentPage);
WebCore::Frame* m_frame;
WebPage* m_webPage;
BackingStore* m_backingStore;
bool m_isClientGeneratedScroll;
bool m_isScrollNotificationSuppressed;
DISABLE_COPY(BackingStoreClient)
};
}
}
#endif // BackingStoreClient_h