Lines Matching refs:tab

70      * Return the current tab's main WebView. This will always return the main
71 * WebView for a given tab and not a subwindow.
72 * @return The current tab's WebView.
83 * Return the current tab's top-level WebView. This can return a subwindow
85 * @return The top-level WebView of the current tab.
96 * Return the current tab's subwindow if it exists.
97 * @return The subwindow of the current tab or null if it doesn't exist.
115 * Return the tab at the specified position.
116 * @return The Tab for the specified position or null if the tab does not
127 * Return the current tab.
128 * @return The current tab.
135 * Return the current tab position.
136 * @return The current tab position
147 int getTabPosition(Tab tab) {
148 if (tab == null) {
151 return mTabs.indexOf(tab);
163 for (Tab tab : mTabs) {
164 if (tab.getWebView() != null
165 && tab.getWebView().isPrivateBrowsingEnabled()) {
172 void addPreloadedTab(Tab tab) {
174 if (current != null && current.getId() == tab.getId()) {
175 throw new IllegalStateException("Tab with id " + tab.getId() + " already exists: "
179 mTabs.add(tab);
180 tab.setController(mController);
181 mController.onSetWebView(tab, tab.getWebView());
182 tab.putInBackground();
186 * Create a new tab.
203 // Create a new tab and add it to the tab list
206 // Initially put the tab in the background.
212 * Create a new tab with default values for closeOnExit(false),
229 for (Tab tab : mTabs) {
230 tab.removeFromTree();
235 * Remove the tab from the list. If the tab is the current tab shown, the
236 * last created tab will be shown.
237 * @param t The tab to be removed.
244 // Grab the current tab before modifying the list.
250 // Put the tab in the background only if it is the current one.
255 // If a tab that is earlier in the list gets removed, the current
256 // index no longer points to the correct tab.
260 // destroy the tab
290 * save the tab state:
292 * position sorted array of tab ids
293 * for each tab id, save the tab state
304 for (Tab tab : mTabs) {
305 Bundle tabState = tab.saveState();
307 ids[i++] = tab.getId();
308 String key = Long.toString(tab.getId());
310 // Dump the tab state for debugging purposes
315 "Error saving state, duplicate tab ids!");
321 tab.deleteThumbnail();
337 * current tab id is returned. This can be passed to restoreState below
338 * in order to restore the correct tab. Otherwise, -1 is returned and the
351 // pick first non incognito tab
364 Bundle tab = state.getBundle(Long.toString(id));
365 return ((tab != null) && !tab.isEmpty());
378 * @param currentId The tab id to restore.
381 * @param restoreAll All webviews get restored, not just the current tab
399 // Skip tab
403 // ignore tab
412 // Me must set the current tab before restoring the state
418 // Create a new tab and don't restore the state yet, add it
419 // to the tab list
423 // added the tab to the front as they are not current
439 final Tab tab = tabMap.get(id);
441 if ((b != null) && (tab != null)) {
446 parent.addChildTab(tab);
467 // destroy the tab
484 // Don't do anything if we only have 1 tab or if the current tab is
495 // available tabs which are not the current tab or the parent of the
496 // current tab.
522 // find a tab which is not the current tab or the parent of the
523 // current tab
535 * Show the tab that contains the given WebView.
536 * @param view The WebView used to find the tab.
548 * Return the tab with the matching application id.
579 // This method checks if a tab matches the given url.
585 * Return the tab that matches the given url.
592 // Check the current tab first.
598 for (Tab tab : mTabs) {
599 if (tabMatchesUrl(tab, url)) {
600 return tab;
607 * Recreate the main WebView of the given tab.
614 // Create a new WebView. If this tab is the current tab, we need to put
615 // back all the clients so force it to be the current tab.
639 * Put the current tab in the background and set newTab as the current tab.
640 * @param newTab The new tab. If newTab is null, the current tab is not
670 // Display the new current tab