OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" | 5 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" |
6 | 6 |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/browser_commands.h" | 8 #include "chrome/browser/ui/browser_commands.h" |
9 #include "chrome/browser/ui/browser_finder.h" | 9 #include "chrome/browser/ui/browser_finder.h" |
10 #include "chrome/browser/ui/browser_tabrestore.h" | 10 #include "chrome/browser/ui/browser_tabrestore.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 WebContents* BrowserTabRestoreServiceDelegate::AddRestoredTab( | 53 WebContents* BrowserTabRestoreServiceDelegate::AddRestoredTab( |
54 const std::vector<TabNavigation>& navigations, | 54 const std::vector<TabNavigation>& navigations, |
55 int tab_index, | 55 int tab_index, |
56 int selected_navigation, | 56 int selected_navigation, |
57 const std::string& extension_app_id, | 57 const std::string& extension_app_id, |
58 bool select, | 58 bool select, |
59 bool pin, | 59 bool pin, |
60 bool from_last_session, | 60 bool from_last_session, |
61 SessionStorageNamespace* storage_namespace) { | 61 const content::SessionStorageNamespaceMap& storage_namespace_map) { |
62 return chrome::AddRestoredTab(browser_, navigations, tab_index, | 62 return chrome::AddRestoredTab(browser_, navigations, tab_index, |
63 selected_navigation, extension_app_id, select, | 63 selected_navigation, extension_app_id, select, |
64 pin, from_last_session, storage_namespace); | 64 pin, from_last_session, storage_namespace_map); |
65 } | 65 } |
66 | 66 |
67 void BrowserTabRestoreServiceDelegate::ReplaceRestoredTab( | 67 void BrowserTabRestoreServiceDelegate::ReplaceRestoredTab( |
68 const std::vector<TabNavigation>& navigations, | 68 const std::vector<TabNavigation>& navigations, |
69 int selected_navigation, | 69 int selected_navigation, |
70 bool from_last_session, | 70 bool from_last_session, |
71 const std::string& extension_app_id, | 71 const std::string& extension_app_id, |
72 SessionStorageNamespace* session_storage_namespace) { | 72 const content::SessionStorageNamespaceMap& |
| 73 session_storage_namespace_map) { |
73 chrome::ReplaceRestoredTab(browser_, navigations, selected_navigation, | 74 chrome::ReplaceRestoredTab(browser_, navigations, selected_navigation, |
74 from_last_session, extension_app_id, | 75 from_last_session, extension_app_id, |
75 session_storage_namespace); | 76 session_storage_namespace_map); |
76 } | 77 } |
77 | 78 |
78 void BrowserTabRestoreServiceDelegate::CloseTab() { | 79 void BrowserTabRestoreServiceDelegate::CloseTab() { |
79 chrome::CloseTab(browser_); | 80 chrome::CloseTab(browser_); |
80 } | 81 } |
81 | 82 |
82 // Implementations of TabRestoreServiceDelegate static methods | 83 // Implementations of TabRestoreServiceDelegate static methods |
83 | 84 |
84 // static | 85 // static |
85 TabRestoreServiceDelegate* TabRestoreServiceDelegate::Create( | 86 TabRestoreServiceDelegate* TabRestoreServiceDelegate::Create( |
(...skipping 20 matching lines...) Expand all Loading... |
106 Browser* browser = browser::FindBrowserWithWebContents(contents); | 107 Browser* browser = browser::FindBrowserWithWebContents(contents); |
107 return browser ? browser->tab_restore_service_delegate() : NULL; | 108 return browser ? browser->tab_restore_service_delegate() : NULL; |
108 } | 109 } |
109 | 110 |
110 // static | 111 // static |
111 TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateWithID( | 112 TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateWithID( |
112 SessionID::id_type desired_id) { | 113 SessionID::id_type desired_id) { |
113 Browser* browser = browser::FindBrowserWithID(desired_id); | 114 Browser* browser = browser::FindBrowserWithID(desired_id); |
114 return browser ? browser->tab_restore_service_delegate() : NULL; | 115 return browser ? browser->tab_restore_service_delegate() : NULL; |
115 } | 116 } |
OLD | NEW |