Lines Matching refs:tabs
25 #include "chrome/browser/tabs/tab_strip_model.h"
231 // list of tabs to close. If the user creates another window, the close is
240 // . closing a tab and there are other windows/tabs open.
753 std::map<int, SessionTab*> tabs;
756 if (CreateTabsAndWindows(commands, &tabs, &windows)) {
757 AddTabsToWindows(&tabs, &windows);
761 STLDeleteValues(&tabs);
772 for (std::vector<SessionTab*>::const_iterator j = (*i)->tabs.begin();
773 j != (*i)->tabs.end(); ++j) {
775 new_index = static_cast<int>(j - (*i)->tabs.begin());
798 IdToSessionTab* tabs) {
799 DCHECK(tabs);
800 std::map<int, SessionTab*>::iterator i = tabs->find(tab_id);
801 if (i == tabs->end()) {
804 (*tabs)[tab_id] = tab;
831 // Compares the two tabs based on visual index.
843 if (i->second->tabs.empty() || i->second->is_constrained ||
849 // Valid window; sort the tabs and add it to the list of valid windows.
850 std::sort(i->second->tabs.begin(), i->second->tabs.end(),
866 void SessionService::AddTabsToWindows(std::map<int, SessionTab*>* tabs,
868 std::map<int, SessionTab*>::iterator i = tabs->begin();
869 while (i != tabs->end()) {
873 window->tabs.push_back(tab);
874 tabs->erase(i++);
888 // Never got a set tab index in window, or tabs are empty, nothing
897 tabs,
911 GetTab(payload[1], tabs)->window_id.set_id(payload[0]);
932 GetTab(payload.id, tabs)->tab_visual_index = payload.index;
942 delete GetTab(payload.id, tabs);
943 tabs->erase(payload.id);
955 SessionTab* tab = GetTab(payload.id, tabs);
968 SessionTab* tab = GetTab(payload.id, tabs);
992 SessionTab* tab = GetTab(tab_id, tabs);
1007 GetTab(payload.id, tabs)->current_navigation_index = payload.index;
1034 GetTab(payload.tab_id, tabs)->pinned = payload.pinned_state;
1046 GetTab(tab_id, tabs)->extension_app_id.swap(extension_app_id);
1156 // Make sure the browser has tabs and a window. Browsers destructor
1239 // lose tabs/windows we want to restore from if we exit right after this.