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

Side by Side Diff: chrome/browser/sessions/in_memory_tab_restore_service.cc

Issue 10989027: Split TabRestoreService into InMemoryTRS and PersistentTRS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some comments Created 8 years, 2 months 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
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/sessions/in_memory_tab_restore_service.h"
6
7 #include "base/compiler_specific.h"
8
9 InMemoryTabRestoreService::InMemoryTabRestoreService(
10 Profile* profile,
11 TabRestoreService::TimeFactory* time_factory)
12 : ALLOW_THIS_IN_INITIALIZER_LIST(
13 helper_(this, NULL, profile, time_factory)) {
14 }
15
16 InMemoryTabRestoreService::~InMemoryTabRestoreService() {}
17
18 void InMemoryTabRestoreService::AddObserver(
19 TabRestoreServiceObserver* observer) {
20 helper_.AddObserver(observer);
21 }
22
23 void InMemoryTabRestoreService::RemoveObserver(
24 TabRestoreServiceObserver* observer) {
25 helper_.RemoveObserver(observer);
26 }
27
28 void InMemoryTabRestoreService::CreateHistoricalTab(
29 content::WebContents* contents,
30 int index) {
31 helper_.CreateHistoricalTab(contents, index);
32 }
33
34 void InMemoryTabRestoreService::BrowserClosing(
35 TabRestoreServiceDelegate* delegate) {
36 helper_.BrowserClosing(delegate);
37 }
38
39 void InMemoryTabRestoreService::BrowserClosed(
40 TabRestoreServiceDelegate* delegate) {
41 helper_.BrowserClosed(delegate);
42 }
43
44 void InMemoryTabRestoreService::ClearEntries() {
45 helper_.ClearEntries();
46 }
47
48 const TabRestoreService::Entries& InMemoryTabRestoreService::entries() const {
49 return helper_.entries();
50 }
51
52 void InMemoryTabRestoreService::RestoreMostRecentEntry(
53 TabRestoreServiceDelegate* delegate) {
54 helper_.RestoreMostRecentEntry(delegate);
55 }
56
57 TabRestoreService::Tab* InMemoryTabRestoreService::RemoveTabEntryById(
58 SessionID::id_type id) {
59 return helper_.RemoveTabEntryById(id);
60 }
61
62 void InMemoryTabRestoreService::RestoreEntryById(
63 TabRestoreServiceDelegate* delegate,
64 SessionID::id_type id,
65 WindowOpenDisposition disposition) {
66 helper_.RestoreEntryById(delegate, id, disposition);
67 }
68
69 void InMemoryTabRestoreService::LoadTabsFromLastSession() {
70 helper_.LoadTabsFromLastSession();
71 }
72
73 bool InMemoryTabRestoreService::IsLoaded() const {
74 return helper_.IsLoaded();
75 }
76
77 void InMemoryTabRestoreService::DeleteLastSession() {
78 helper_.DeleteLastSession();
79 }
80
81 void InMemoryTabRestoreService::Shutdown() {
82 helper_.Shutdown();
83 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698