| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_RECENTLY_CLOSED_TABS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_RECENTLY_CLOSED_TABS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_NTP_RECENTLY_CLOSED_TABS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_RECENTLY_CLOSED_TABS_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/sessions/tab_restore_service.h" | 9 #include "chrome/browser/sessions/tab_restore_service.h" |
| 10 #include "chrome/browser/sessions/tab_restore_service_observer.h" | 10 #include "chrome/browser/sessions/tab_restore_service_observer.h" |
| 11 #include "content/browser/webui/web_ui.h" | 11 #include "content/public/browser/web_ui_message_handler.h" |
| 12 | 12 |
| 13 class TabRestoreService; | 13 class TabRestoreService; |
| 14 | 14 |
| 15 class RecentlyClosedTabsHandler : public WebUIMessageHandler, | 15 class RecentlyClosedTabsHandler : public content::WebUIMessageHandler, |
| 16 public TabRestoreServiceObserver { | 16 public TabRestoreServiceObserver { |
| 17 public: | 17 public: |
| 18 RecentlyClosedTabsHandler() : tab_restore_service_(NULL) {} | 18 RecentlyClosedTabsHandler() : tab_restore_service_(NULL) {} |
| 19 virtual ~RecentlyClosedTabsHandler(); | 19 virtual ~RecentlyClosedTabsHandler(); |
| 20 | 20 |
| 21 // WebUIMessageHandler implementation. | 21 // WebUIMessageHandler implementation. |
| 22 virtual void RegisterMessages() OVERRIDE; | 22 virtual void RegisterMessages() OVERRIDE; |
| 23 | 23 |
| 24 // Callback for the "reopenTab" message. Rewrites the history of the | 24 // Callback for the "reopenTab" message. Rewrites the history of the |
| 25 // currently displayed tab to be the one in TabRestoreService with a | 25 // currently displayed tab to be the one in TabRestoreService with a |
| (...skipping 19 matching lines...) Expand all Loading... |
| 45 base::ListValue* entry_list_value); | 45 base::ListValue* entry_list_value); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // TabRestoreService that we are observing. | 48 // TabRestoreService that we are observing. |
| 49 TabRestoreService* tab_restore_service_; | 49 TabRestoreService* tab_restore_service_; |
| 50 | 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(RecentlyClosedTabsHandler); | 51 DISALLOW_COPY_AND_ASSIGN(RecentlyClosedTabsHandler); |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 #endif // CHROME_BROWSER_UI_WEBUI_NTP_RECENTLY_CLOSED_TABS_HANDLER_H_ | 54 #endif // CHROME_BROWSER_UI_WEBUI_NTP_RECENTLY_CLOSED_TABS_HANDLER_H_ |
| OLD | NEW |