Home | History | Annotate | Download | only in sessions

Lines Matching refs:tab

51 // tabs. New tabs are loaded after the current tab finishes loading, or a delay
53 // a tab finishes loading a new tab is loaded and the time of the delay
63 // Schedules a tab for loading.
66 // Notifies the loader that a tab has been scheduled for loading through
70 // Invokes |LoadNextTab| to load a tab.
80 // Loads the next tab. If there are no more tabs to load this deletes itself,
84 // NotificationObserver method. Removes the specified tab and loads the next
85 // tab.
90 // Removes the listeners from the specified tab and removes the tab from
93 void RemoveTab(NavigationController* tab);
96 // |LoadNextTab| to load the next tab
99 // Returns the RenderWidgetHost associated with a tab if there is one,
101 static RenderWidgetHost* GetRenderWidgetHost(NavigationController* tab);
103 // Register for necessary notificaitons on a tab navigation controller.
106 // Called when a tab goes away or a load completes.
111 // Current delay before a new tab is loaded. See class description for
118 // Have we recorded the times for a tab paint?
197 NavigationController* tab = tabs_to_load_.front();
198 DCHECK(tab);
199 tabs_loading_.insert(tab);
201 tab->LoadIfNecessary();
202 if (tab->tab_contents()) {
204 Browser* browser = Browser::GetBrowserForController(tab, &tab_index);
206 // By default tabs are marked as visible. As only the active tab is
210 // NOTE: We need to do this here rather than when the tab is added to
213 tab->tab_contents()->WasHidden();
220 // Each time we load a tab we also set a timer to force us to start loading
221 // the next tab if this one doesn't load quickly enough.
247 // that it stops trying to load next tab.
261 NavigationController* tab = Source<NavigationController>(source).ptr();
262 RenderWidgetHost* render_widget_host = GetRenderWidgetHost(tab);
278 NavigationController* tab = Source<NavigationController>(source).ptr();
279 render_widget_hosts_to_paint_.insert(GetRenderWidgetHost(tab));
280 HandleTabClosedOrLoaded(tab);
313 // If this is a host for a tab we're not loading some other tab
315 // happen because the user opened a different tab or restored tabs
316 // to an already existing browser and an existing tab painted.
331 void TabLoader::RemoveTab(NavigationController* tab) {
333 Source<TabContents>(tab->tab_contents()));
335 Source<NavigationController>(tab));
337 Source<NavigationController>(tab));
339 TabsLoading::iterator i = tabs_loading_.find(tab);
344 find(tabs_to_load_.begin(), tabs_to_load_.end(), tab);
354 RenderWidgetHost* TabLoader::GetRenderWidgetHost(NavigationController* tab) {
355 TabContents* tab_contents = tab->tab_contents();
375 void TabLoader::HandleTabClosedOrLoaded(NavigationController* tab) {
376 RemoveTab(tab);
476 // Restore a single tab from a foreign session.
477 // Note: we currently restore the tab to the last active browser.
478 void RestoreForeignTab(const SessionTab& tab) {
482 RestoreTab(tab, current_browser->tab_count(), current_browser, true);
527 // No tab browsers were created and no URLs were supplied on the command
635 const SessionTab& tab = *(*i);
637 // Don't schedule a load for the selected tab, as ShowBrowser() will
639 RestoreTab(tab, tab_index, browser, tab_index != selected_tab_index);
643 void RestoreTab(const SessionTab& tab,
647 DCHECK(!tab.navigations.empty());
648 int selected_index = tab.current_navigation_index;
652 static_cast<int>(tab.navigations.size() - 1)));
655 GURL url = tab.navigations.at(tab.current_navigation_index).virtual_url();
667 browser->AddRestoredTab(tab.navigations,
670 tab.extension_app_id,
672 tab.pinned,
830 const SessionTab& tab) {
835 restorer.RestoreForeignTab(tab);