| 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.shell; | 5 package org.chromium.chrome.shell; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 | 8 |
| 9 import org.chromium.chrome.browser.Tab; | 9 import org.chromium.chrome.browser.Tab; |
| 10 import org.chromium.chrome.browser.tabmodel.EmptyTabModel; | 10 import org.chromium.chrome.browser.tabmodel.EmptyTabModel; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 WindowAndroid window, ContentVideoViewClient videoViewClient, Contex
t context, | 36 WindowAndroid window, ContentVideoViewClient videoViewClient, Contex
t context, |
| 37 TabManager tabManager) { | 37 TabManager tabManager) { |
| 38 mWindow = window; | 38 mWindow = window; |
| 39 mContentVideoViewClient = videoViewClient; | 39 mContentVideoViewClient = videoViewClient; |
| 40 mContext = context; | 40 mContext = context; |
| 41 mOrderController = new TabModelOrderController(this); | 41 mOrderController = new TabModelOrderController(this); |
| 42 mTabManager = tabManager; | 42 mTabManager = tabManager; |
| 43 | 43 |
| 44 TabModelDelegate tabModelDelegate = new TabModelDelegate() { | 44 TabModelDelegate tabModelDelegate = new TabModelDelegate() { |
| 45 @Override | 45 @Override |
| 46 public void didCreateNewTab(Tab tab) {} | 46 public void didCreateNewTab(Tab tab) { |
| 47 notifyNewTabCreated(tab); |
| 48 } |
| 47 | 49 |
| 48 @Override | 50 @Override |
| 49 public void didChange() {} | 51 public void didChange() {} |
| 50 | 52 |
| 51 @Override | 53 @Override |
| 52 public void selectModel(boolean incognito) { | 54 public void selectModel(boolean incognito) { |
| 53 assert !incognito; | 55 assert !incognito; |
| 54 } | 56 } |
| 55 | 57 |
| 56 @Override | 58 @Override |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 ChromeShellTab tab = new ChromeShellTab( | 96 ChromeShellTab tab = new ChromeShellTab( |
| 95 mContext, loadUrlParams.getUrl(), mWindow, client, mTabManager); | 97 mContext, loadUrlParams.getUrl(), mWindow, client, mTabManager); |
| 96 int index = mOrderController.determineInsertionIndex(type, tab); | 98 int index = mOrderController.determineInsertionIndex(type, tab); |
| 97 TabModel tabModel = getCurrentModel(); | 99 TabModel tabModel = getCurrentModel(); |
| 98 tabModel.addTab(tab, index, type); | 100 tabModel.addTab(tab, index, type); |
| 99 tabModel.setIndex(index, TabSelectionType.FROM_NEW); | 101 tabModel.setIndex(index, TabSelectionType.FROM_NEW); |
| 100 return tab; | 102 return tab; |
| 101 } | 103 } |
| 102 | 104 |
| 103 } | 105 } |
| OLD | NEW |