#ifndef CHROME_BROWSER_UI_WEBUI_NTP_RECENTLY_CLOSED_TABS_HANDLER_H_
#define CHROME_BROWSER_UI_WEBUI_NTP_RECENTLY_CLOSED_TABS_HANDLER_H_
#include "base/values.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_observer.h"
#include "content/public/browser/web_ui_message_handler.h"
class TabRestoreService;
class RecentlyClosedTabsHandler : public content::WebUIMessageHandler,
public TabRestoreServiceObserver {
public:
RecentlyClosedTabsHandler() : tab_restore_service_(NULL) {}
virtual ~RecentlyClosedTabsHandler();
virtual void RegisterMessages() OVERRIDE;
void HandleReopenTab(const base::ListValue* args);
void HandleGetRecentlyClosedTabs(const base::ListValue* args);
void HandleClearRecentlyClosed(const base::ListValue* args);
virtual void TabRestoreServiceChanged(TabRestoreService* service) OVERRIDE;
virtual void TabRestoreServiceDestroyed(TabRestoreService* service) OVERRIDE;
private:
void EnsureTabRestoreService();
TabRestoreService* tab_restore_service_;
DISALLOW_COPY_AND_ASSIGN(RecentlyClosedTabsHandler);
};
#endif