summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni/WebHistory.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/jni/WebHistory.h')
-rw-r--r--WebKit/android/jni/WebHistory.h35
1 files changed, 10 insertions, 25 deletions
diff --git a/WebKit/android/jni/WebHistory.h b/WebKit/android/jni/WebHistory.h
index 8d545ca..baba1fd 100644
--- a/WebKit/android/jni/WebHistory.h
+++ b/WebKit/android/jni/WebHistory.h
@@ -26,14 +26,12 @@
#ifndef ANDROID_WEBKIT_WEBHISTORY_H
#define ANDROID_WEBKIT_WEBHISTORY_H
+#include "AndroidWebHistoryBridge.h"
+
#include <jni.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
-namespace WebCore {
- class HistoryItem;
-}
-
namespace android {
class AutoJObject;
@@ -49,33 +47,20 @@ public:
// there are two scale factors saved with each history item. mScale reflects the
// viewport scale factor, default to 100 means 100%. mScreenWidthScale records
// the scale factor for the screen width used to wrap the text paragraph.
-class WebHistoryItem : public WTF::RefCounted<WebHistoryItem> {
+class WebHistoryItem : public WebCore::AndroidWebHistoryBridge {
public:
WebHistoryItem(WebHistoryItem* parent)
- : mParent(parent)
- , mObject(NULL)
- , mScale(100)
- , mScreenWidthScale(100)
- , mActive(false)
- , mHistoryItem(NULL) {}
+ : WebCore::AndroidWebHistoryBridge()
+ , m_parent(parent)
+ , m_object(NULL) { }
WebHistoryItem(JNIEnv*, jobject, WebCore::HistoryItem*);
~WebHistoryItem();
void updateHistoryItem(WebCore::HistoryItem* item);
- void setScale(int s) { mScale = s; }
- void setScreenWidthScale(int s) { mScreenWidthScale = s; }
- void setActive() { mActive = true; }
- void setParent(WebHistoryItem* parent) { mParent = parent; }
- WebHistoryItem* parent() { return mParent.get(); }
- int scale() { return mScale; }
- int screenWidthScale() { return mScreenWidthScale; }
- WebCore::HistoryItem* historyItem() { return mHistoryItem; }
+ void setParent(WebHistoryItem* parent) { m_parent = parent; }
+ WebHistoryItem* parent() const { return m_parent.get(); }
private:
- RefPtr<WebHistoryItem> mParent;
- jobject mObject;
- int mScale;
- int mScreenWidthScale;
- bool mActive;
- WebCore::HistoryItem* mHistoryItem;
+ RefPtr<WebHistoryItem> m_parent;
+ jobject m_object;
};
};