OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 package org.chromium.chrome.browser.tabmodel; | 5 package org.chromium.chrome.browser.tabmodel; |
6 | 6 |
7 import org.chromium.chrome.browser.Tab; | 7 import org.chromium.chrome.browser.Tab; |
8 import org.chromium.chrome.browser.TabState; | 8 import org.chromium.chrome.browser.TabState; |
9 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType; | 9 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType; |
10 import org.chromium.content_public.browser.LoadUrlParams; | 10 import org.chromium.content_public.browser.LoadUrlParams; |
(...skipping 16 matching lines...) Expand all Loading... |
27 */ | 27 */ |
28 Tab createNewTab(LoadUrlParams loadUrlParams, TabModel.TabLaunchType typ
e, Tab parent); | 28 Tab createNewTab(LoadUrlParams loadUrlParams, TabModel.TabLaunchType typ
e, Tab parent); |
29 | 29 |
30 /** | 30 /** |
31 * On restore, allows us to create a frozen version of a tab using saved
tab state we read | 31 * On restore, allows us to create a frozen version of a tab using saved
tab state we read |
32 * from disk. | 32 * from disk. |
33 * @param state The tab state that the tab can be restored from. | 33 * @param state The tab state that the tab can be restored from. |
34 * @param id The id to give the new tab. | 34 * @param id The id to give the new tab. |
35 * @param index The index for where to place the tab. | 35 * @param index The index for where to place the tab. |
36 */ | 36 */ |
37 void createFrozenTab(TabState state, int id, int index); | 37 Tab createFrozenTab(TabState state, int id, int index); |
38 | 38 |
39 /** | 39 /** |
40 * Creates a tab around the native web contents pointer. | 40 * Creates a tab around the native web contents pointer. |
41 * @param webContents The web contents to create a tab around. | 41 * @param webContents The web contents to create a tab around. |
42 * @param parentId The id of the parent tab. | 42 * @param parentId The id of the parent tab. |
43 * @param type The TabLaunchType describing how this tab was crea
ted. | 43 * @param type The TabLaunchType describing how this tab was crea
ted. |
44 * @return The created tab. | 44 * @return The created tab. |
45 */ | 45 */ |
46 Tab createTabWithWebContents(WebContents webContents, int parentId, TabL
aunchType type); | 46 Tab createTabWithWebContents(WebContents webContents, int parentId, TabL
aunchType type); |
47 | 47 |
(...skipping 15 matching lines...) Expand all Loading... |
63 Tab launchUrl(String url, TabModel.TabLaunchType type); | 63 Tab launchUrl(String url, TabModel.TabLaunchType type); |
64 } | 64 } |
65 | 65 |
66 /** | 66 /** |
67 * @return A {@link TabCreator} that will create either regular or incognito
tabs. | 67 * @return A {@link TabCreator} that will create either regular or incognito
tabs. |
68 * @param incognito True if the method should return the TabCreator for inco
gnito tabs, false | 68 * @param incognito True if the method should return the TabCreator for inco
gnito tabs, false |
69 * for regular tabs. | 69 * for regular tabs. |
70 */ | 70 */ |
71 TabCreator getTabCreator(boolean incognito); | 71 TabCreator getTabCreator(boolean incognito); |
72 } | 72 } |
OLD | NEW |