1/* 2 * Copyright (C) 2013 Research In Motion Limited. All rights reserved. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19#ifndef BackForwardListBlackBerry_h 20#define BackForwardListBlackBerry_h 21 22#include "BackForwardListImpl.h" 23 24namespace BlackBerry { 25namespace WebKit { 26class WebPagePrivate; 27} 28} 29 30namespace WebCore { 31 32class BackForwardListBlackBerry : public WebCore::BackForwardList { 33public: 34 static PassRefPtr<BackForwardListBlackBerry> create(BlackBerry::WebKit::WebPagePrivate* pagePrivate) 35 { 36 return adoptRef(new BackForwardListBlackBerry(pagePrivate)); 37 } 38 virtual ~BackForwardListBlackBerry(); 39 40 void clear(); 41 HistoryItemVector& entries(); 42 HistoryItem* currentItem(); 43 void backListWithLimit(int, HistoryItemVector&); 44 void forwardListWithLimit(int, HistoryItemVector&); 45 int capacity(); 46 47private: 48 explicit BackForwardListBlackBerry(BlackBerry::WebKit::WebPagePrivate*); 49 50 virtual void addItem(PassRefPtr<WebCore::HistoryItem>); 51 virtual void goToItem(WebCore::HistoryItem*); 52 virtual WebCore::HistoryItem* itemAtIndex(int); 53 virtual int backListCount(); 54 virtual int forwardListCount(); 55 virtual bool isActive(); 56 virtual void close(); 57 58 int current(); 59 void notifyBackForwardListChanged(); 60 61 RefPtr<BackForwardListImpl> m_impl; 62 BlackBerry::WebKit::WebPagePrivate* m_webPagePrivate; 63}; 64 65} // namespace WebCore 66 67#endif // BackForwardListBlackBerry_h 68