Changeset 71089 in webkit
- Timestamp:
- Nov 1, 2010 6:15:18 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r71081 r71089 1 2010-11-01 Juha Savolainen <juha.savolainen@weego.fi> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Initial implementation of QWKHistoryItem. 6 https://bugs.webkit.org/show_bug.cgi?id=48620 7 8 The QWkHistoryItem represents one item in the history of QWKPage. 9 10 * UIProcess/API/qt/qwkhistory.cpp: 11 (QWKHistoryItemPrivate::QWKHistoryItemPrivate): 12 (QWKHistoryItem::QWKHistoryItem): 13 (QWKHistoryItem::~QWKHistoryItem): 14 (QWKHistoryItem::title): The page title 15 (QWKHistoryItem::url): The URL of the page. 16 (QWKHistoryItem::originalUrl): The URL used to access the page. 17 * UIProcess/API/qt/qwkhistory.h: 18 * UIProcess/API/qt/qwkhistory_p.h: 19 * WebKit2.pro: Added WKBackForwardListItem.h and WKBackForwardListItem.cpp 20 1 21 2010-11-01 Anders Carlsson <andersca@apple.com> 2 22 -
trunk/WebKit2/UIProcess/API/qt/qwkhistory.cpp
r70218 r71089 27 27 28 28 #include "WKBackForwardList.h" 29 #include "WKBackForwardListItem.h" 30 #include "WKStringQt.h" 31 #include "WKURL.h" 32 #include "WKURLQt.h" 29 33 #include "WebBackForwardList.h" 30 34 #include "qwkhistory_p.h" 35 #include <QString> 36 #include <QUrl> 37 #include <WebKit2/WKRetainPtr.h> 31 38 32 39 using namespace WebKit; 40 41 QWKHistoryItemPrivate::QWKHistoryItemPrivate(WKBackForwardListItemRef listItem) 42 : m_backForwardListItem(listItem) 43 { 44 } 45 46 QWKHistoryItem::QWKHistoryItem() 47 { 48 } 49 50 QWKHistoryItem::~QWKHistoryItem() 51 { 52 } 53 54 QString QWKHistoryItem::title() const 55 { 56 if (!d->m_backForwardListItem) 57 return QString(); 58 WKRetainPtr<WKStringRef> title = WKBackForwardListItemCopyTitle(d->m_backForwardListItem.get()); 59 return WKStringCopyQString(title.get()); 60 } 61 62 QUrl QWKHistoryItem::url() const 63 { 64 if (!d->m_backForwardListItem) 65 return QUrl(); 66 WKRetainPtr<WKURLRef> url = WKBackForwardListItemCopyURL(d->m_backForwardListItem.get()); 67 return WKURLCopyQUrl(url.get()); 68 } 69 70 QUrl QWKHistoryItem::originalUrl() const 71 { 72 if (!d->m_backForwardListItem) 73 return QUrl(); 74 WKRetainPtr<WKURLRef> url = WKBackForwardListItemCopyOriginalURL(d->m_backForwardListItem.get()); 75 return WKURLCopyQUrl(url.get()); 76 } 33 77 34 78 QWKHistoryPrivate::QWKHistoryPrivate(WebKit::WebBackForwardList* list) -
trunk/WebKit2/UIProcess/API/qt/qwkhistory.h
r70218 r71089 30 30 31 31 class QWKHistoryPrivate; 32 class QWKHistoryItemPrivate; 33 class QUrl; 34 class QString; 32 35 33 36 namespace WebKit { 34 37 class WebBackForwardList; 35 38 } 39 40 class QWEBKIT_EXPORT QWKHistoryItem { 41 public: 42 ~QWKHistoryItem(); 43 QString title() const; 44 QUrl url() const; 45 QUrl originalUrl() const; 46 47 private: 48 QWKHistoryItem(); 49 50 QWKHistoryItemPrivate* d; 51 52 friend class QWKHistory; 53 friend class QWKHistoryItemPrivate; 54 }; 36 55 37 56 class QWEBKIT_EXPORT QWKHistory : public QObject { -
trunk/WebKit2/UIProcess/API/qt/qwkhistory_p.h
r70218 r71089 27 27 28 28 #include "qwebkitglobal.h" 29 #include <WebKit2/WKBase.h> 30 #include <WebKit2/WKRetainPtr.h> 31 #include <wtf/PassRefPtr.h> 29 32 30 33 namespace WebKit { … … 33 36 34 37 class QWKHistory; 38 39 class QWEBKIT_EXPORT QWKHistoryItemPrivate { 40 private: 41 QWKHistoryItemPrivate(WKBackForwardListItemRef listItem); 42 43 WKRetainPtr<WKBackForwardListItemRef> m_backForwardListItem; 44 45 friend class QWKHistory; 46 friend class QWKHistoryItem; 47 }; 35 48 36 49 class QWEBKIT_EXPORT QWKHistoryPrivate { -
trunk/WebKit2/WebKit2.pro
r71041 r71089 231 231 UIProcess/API/C/WKAPICast.h \ 232 232 UIProcess/API/C/WKBackForwardList.h \ 233 UIProcess/API/C/WKBackForwardListItem.h \ 233 234 UIProcess/API/C/WKContext.h \ 234 235 UIProcess/API/C/WKContextPrivate.h \ … … 396 397 Shared/WebWheelEvent.cpp \ 397 398 UIProcess/API/C/WKBackForwardList.cpp \ 399 UIProcess/API/C/WKBackForwardListItem.cpp \ 398 400 UIProcess/API/C/WKContext.cpp \ 399 401 UIProcess/API/C/WKFrame.cpp \
Note: See TracChangeset
for help on using the changeset viewer.