aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Crosby2014-08-16 10:25:25 -0700
committerPhil Crosby2014-08-16 10:25:25 -0700
commit77a8299a6fbd84f42bdffbc4598678d63abebb93 (patch)
tree35579a4d9433477b87d564d68724a818f344a33c
parent83b216c87425e67066488e30f4260aee2b67a106 (diff)
parent558df1b8b5cac94f90df5f91788f14e572552f40 (diff)
downloadvimium-77a8299a6fbd84f42bdffbc4598678d63abebb93.tar.bz2
Merge pull request #1127 from mrmr1993/chromeSessionsApi
Update restore tab for upcoming chrome.sessions API
-rw-r--r--background_scripts/main.coffee5
1 files changed, 2 insertions, 3 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 3b7670d4..8f94eb04 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -247,9 +247,8 @@ BackgroundCommands =
chrome.tabs.remove(tab.id))
restoreTab: (callback) ->
# TODO: remove if-else -block when adopted into stable
- if chrome.sessionRestore
- chrome.sessionRestore.getRecentlyClosed((closed) ->
- chrome.sessionRestore.restore(closed[0]))
+ if chrome.sessions
+ chrome.sessions.restore(null, (restoredSession) -> callback())
else
# TODO(ilya): Should this be getLastFocused instead?
chrome.windows.getCurrent((window) ->