summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebCore/history/HistoryItem.cpp42
-rw-r--r--WebCore/history/HistoryItem.h4
-rw-r--r--WebKit/mac/History/WebHistoryItem.mm2
-rw-r--r--WebKit/mac/History/WebHistoryItemInternal.h2
4 files changed, 10 insertions, 40 deletions
diff --git a/WebCore/history/HistoryItem.cpp b/WebCore/history/HistoryItem.cpp
index efd7078..2ca29e3 100644
--- a/WebCore/history/HistoryItem.cpp
+++ b/WebCore/history/HistoryItem.cpp
@@ -36,15 +36,11 @@
namespace WebCore {
-#ifdef ANDROID_HISTORY_CLIENT
-void (*notifyHistoryItemChanged)(HistoryItem*);
-#else
-static void defaultNotifyHistoryItemChanged()
+static void defaultNotifyHistoryItemChanged(HistoryItem*)
{
}
-void (*notifyHistoryItemChanged)() = defaultNotifyHistoryItemChanged;
-#endif
+void (*notifyHistoryItemChanged)(HistoryItem*) = defaultNotifyHistoryItemChanged;
HistoryItem::HistoryItem()
: m_lastVisitedTime(0)
@@ -202,9 +198,7 @@ const String& HistoryItem::parent() const
void HistoryItem::setAlternateTitle(const String& alternateTitle)
{
m_displayTitle = alternateTitle;
-#ifndef ANDROID_HISTORY_CLIENT
- notifyHistoryItemChanged();
-#endif
+ notifyHistoryItemChanged(this);
}
void HistoryItem::setURLString(const String& urlString)
@@ -215,11 +209,7 @@ void HistoryItem::setURLString(const String& urlString)
iconDatabase()->retainIconForPageURL(m_urlString);
}
-#ifdef ANDROID_HISTORY_CLIENT
notifyHistoryItemChanged(this);
-#else
- notifyHistoryItemChanged();
-#endif
}
void HistoryItem::setURL(const KURL& url)
@@ -232,41 +222,25 @@ void HistoryItem::setURL(const KURL& url)
void HistoryItem::setOriginalURLString(const String& urlString)
{
m_originalURLString = urlString;
-#ifdef ANDROID_HISTORY_CLIENT
notifyHistoryItemChanged(this);
-#else
- notifyHistoryItemChanged();
-#endif
}
void HistoryItem::setReferrer(const String& referrer)
{
m_referrer = referrer;
-#ifdef ANDROID_HISTORY_CLIENT
notifyHistoryItemChanged(this);
-#else
- notifyHistoryItemChanged();
-#endif
}
void HistoryItem::setTitle(const String& title)
{
m_title = title;
-#ifdef ANDROID_HISTORY_CLIENT
notifyHistoryItemChanged(this);
-#else
- notifyHistoryItemChanged();
-#endif
}
void HistoryItem::setTarget(const String& target)
{
m_target = target;
-#ifdef ANDROID_HISTORY_CLIENT
notifyHistoryItemChanged(this);
-#else
- notifyHistoryItemChanged();
-#endif
}
void HistoryItem::setParent(const String& parent)
@@ -382,7 +356,7 @@ void HistoryItem::clearScrollPoint()
void HistoryItem::setDocumentState(const Vector<String>& state)
{
m_documentState = state;
-#ifdef ANDROID_HISTORY_CLIENT
+#if PLATFORM(ANDROID)
notifyHistoryItemChanged(this);
#endif
}
@@ -395,7 +369,7 @@ const Vector<String>& HistoryItem::documentState() const
void HistoryItem::clearDocumentState()
{
m_documentState.clear();
-#ifdef ANDROID_HISTORY_CLIENT
+#if PLATFORM(ANDROID)
notifyHistoryItemChanged(this);
#endif
}
@@ -408,7 +382,7 @@ bool HistoryItem::isTargetItem() const
void HistoryItem::setIsTargetItem(bool flag)
{
m_isTargetItem = flag;
-#ifdef ANDROID_HISTORY_CLIENT
+#if PLATFORM(ANDROID)
notifyHistoryItemChanged(this);
#endif
}
@@ -417,7 +391,7 @@ void HistoryItem::addChildItem(PassRefPtr<HistoryItem> child)
{
ASSERT(!childItemWithTarget(child->target()));
m_children.append(child);
-#ifdef ANDROID_HISTORY_CLIENT
+#if PLATFORM(ANDROID)
notifyHistoryItemChanged(this);
#endif
}
@@ -498,7 +472,7 @@ void HistoryItem::setFormInfoFromRequest(const ResourceRequest& request)
m_formData = 0;
m_formContentType = String();
}
-#ifdef ANDROID_HISTORY_CLIENT
+#if PLATFORM(ANDROID)
notifyHistoryItemChanged(this);
#endif
}
diff --git a/WebCore/history/HistoryItem.h b/WebCore/history/HistoryItem.h
index d153a1f..e0cade0 100644
--- a/WebCore/history/HistoryItem.h
+++ b/WebCore/history/HistoryItem.h
@@ -58,11 +58,7 @@ struct ResourceRequest;
typedef Vector<RefPtr<HistoryItem> > HistoryItemVector;
-#ifdef ANDROID_HISTORY_CLIENT
extern void (*notifyHistoryItemChanged)(HistoryItem*);
-#else
-extern void (*notifyHistoryItemChanged)();
-#endif
enum VisitCountBehavior {
IncreaseVisitCount,
diff --git a/WebKit/mac/History/WebHistoryItem.mm b/WebKit/mac/History/WebHistoryItem.mm
index 3ed4e1f..91bc610 100644
--- a/WebKit/mac/History/WebHistoryItem.mm
+++ b/WebKit/mac/History/WebHistoryItem.mm
@@ -84,7 +84,7 @@ static HistoryItemMap& historyItemWrappers()
return historyItemWrappers;
}
-void WKNotifyHistoryItemChanged()
+void WKNotifyHistoryItemChanged(HistoryItem*)
{
[[NSNotificationCenter defaultCenter]
postNotificationName:WebHistoryItemChangedNotification object:nil userInfo:nil];
diff --git a/WebKit/mac/History/WebHistoryItemInternal.h b/WebKit/mac/History/WebHistoryItemInternal.h
index 787eb05..d324682 100644
--- a/WebKit/mac/History/WebHistoryItemInternal.h
+++ b/WebKit/mac/History/WebHistoryItemInternal.h
@@ -37,7 +37,7 @@ namespace WebCore {
WebCore::HistoryItem* core(WebHistoryItem *item);
WebHistoryItem *kit(WebCore::HistoryItem* item);
-extern void WKNotifyHistoryItemChanged();
+extern void WKNotifyHistoryItemChanged(WebCore::HistoryItem*);
@interface WebHistoryItem (WebInternal)