Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: chrome/browser/dom_ui/new_tab_ui.h

Issue 11377: Changes tab restore service to handle restoring closed windows as a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browsing_data_remover.cc ('k') | chrome/browser/dom_ui/new_tab_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_DOM_UI_NEW_TAB_UI_H__ 5 #ifndef CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H__
6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H__ 6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H__
7 7
8 #include "chrome/browser/bookmarks/bookmark_model.h" 8 #include "chrome/browser/bookmarks/bookmark_model.h"
9 #include "chrome/browser/dom_ui/dom_ui_host.h" 9 #include "chrome/browser/dom_ui/dom_ui_host.h"
10 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" 10 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // Observer callback for TabRestoreService::Observer. Sends data on 256 // Observer callback for TabRestoreService::Observer. Sends data on
257 // recently closed tabs to the javascript side of this page to 257 // recently closed tabs to the javascript side of this page to
258 // display to the user. 258 // display to the user.
259 virtual void TabRestoreServiceChanged(TabRestoreService* service); 259 virtual void TabRestoreServiceChanged(TabRestoreService* service);
260 260
261 // Observer callback to notice when our associated TabRestoreService 261 // Observer callback to notice when our associated TabRestoreService
262 // is destroyed. 262 // is destroyed.
263 virtual void TabRestoreServiceDestroyed(TabRestoreService* service); 263 virtual void TabRestoreServiceDestroyed(TabRestoreService* service);
264 264
265 private: 265 private:
266 // Converts a closed tab to the value sent down to the NTP. Returns true on
267 // success, false if the value shouldn't be sent down.
268 bool TabToValue(const TabRestoreService::Tab& tab,
269 DictionaryValue* dictionary);
270
271 // Converts a closed window to the value sent down to the NTP. Returns true
272 // on success, false if the value shouldn't be sent down.
273 bool WindowToValue(const TabRestoreService::Window& window,
274 DictionaryValue* dictionary);
275
266 DOMUIHost* dom_ui_host_; 276 DOMUIHost* dom_ui_host_;
267 277
268 /// TabRestoreService that we are observing. 278 /// TabRestoreService that we are observing.
269 TabRestoreService* tab_restore_service_; 279 TabRestoreService* tab_restore_service_;
270 280
271 DISALLOW_EVIL_CONSTRUCTORS(RecentlyClosedTabsHandler); 281 DISALLOW_EVIL_CONSTRUCTORS(RecentlyClosedTabsHandler);
272 }; 282 };
273 283
274 class HistoryHandler : public DOMMessageHandler { 284 class HistoryHandler : public DOMMessageHandler {
275 public: 285 public:
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 363
354 // A pointer to the handler for most visited. 364 // A pointer to the handler for most visited.
355 // Owned by the DOMUIHost. 365 // Owned by the DOMUIHost.
356 MostVisitedHandler* most_visited_handler_; 366 MostVisitedHandler* most_visited_handler_;
357 367
358 DISALLOW_EVIL_CONSTRUCTORS(NewTabUIContents); 368 DISALLOW_EVIL_CONSTRUCTORS(NewTabUIContents);
359 }; 369 };
360 370
361 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H__ 371 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H__
362 372
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_remover.cc ('k') | chrome/browser/dom_ui/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698