Implement the "Open in new Chrome tab" option in the Browser Actions menu that open a new tab in the background of Chrome.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fc32a59653e65cee968472d8c91fa060fdf981d9 commit fc32a59653e65cee968472d8c91fa060fdf981d9 Author: ltian <ltian@chromium.org> Date: Tue Aug 15 03:31:56 2017 [Android] Open a tab in the background from Browser Actions if ChromeTabbedActivity is available Implements the function that opens a tab for the given url in the background of Chrome from Browser Actions menu. Also add a new TabLaunchType (Browser Actions) which does not show transition and always add to the top of the tab list. Besides, postpones operation by showing a ProgressDialog to block UI until native libraries are loaded. BUG= 730305 Review-Url: https://codereview.chromium.org/2931433004 Cr-Commit-Position: refs/heads/master@{#494316} [modify] https://crrev.com/fc32a59653e65cee968472d8c91fa060fdf981d9/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionActivity.java [modify] https://crrev.com/fc32a59653e65cee968472d8c91fa060fdf981d9/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsContextMenuHelper.java [modify] https://crrev.com/fc32a59653e65cee968472d8c91fa060fdf981d9/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsContextMenuItemDelegate.java [modify] https://crrev.com/fc32a59653e65cee968472d8c91fa060fdf981d9/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/TabularContextMenuListAdapter.java [modify] https://crrev.com/fc32a59653e65cee968472d8c91fa060fdf981d9/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java [modify] https://crrev.com/fc32a59653e65cee968472d8c91fa060fdf981d9/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModel.java [modify] https://crrev.com/fc32a59653e65cee968472d8c91fa060fdf981d9/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelOrderController.java [modify] https://crrev.com/fc32a59653e65cee968472d8c91fa060fdf981d9/chrome/android/java/strings/android_chrome_strings.grd [modify] https://crrev.com/fc32a59653e65cee968472d8c91fa060fdf981d9/chrome/android/java_sources.gni [add] https://crrev.com/fc32a59653e65cee968472d8c91fa060fdf981d9/chrome/android/javatests/src/org/chromium/chrome/browser/browseractions/BrowserActionActivityTest.java [rename] https://crrev.com/fc32a59653e65cee968472d8c91fa060fdf981d9/chrome/android/junit/src/org/chromium/chrome/browser/browseractions/BrowserActionsIntentTest.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a29ddf2ebcc01f3a21121f73b6155ccc812a4275 commit a29ddf2ebcc01f3a21121f73b6155ccc812a4275 Author: bengr <bengr@chromium.org> Date: Thu Aug 17 18:36:37 2017 Revert of [Android] Open a tab in the background from Browser Actions if ChromeTabbedActivity is available (patchset #13 id:240001 of https://codereview.chromium.org/2931433004/ ) Reason for revert: Breaks testOpenMultipleTabInBackgroundWhenChromeAvailable on tablets. Original issue's description: > [Android] Open a tab in the background from Browser Actions if ChromeTabbedActivity is available > > Implements the function that opens a tab for the given url in the > background of Chrome from Browser Actions menu. Also add a new > TabLaunchType (Browser Actions) which does not show transition and > always add to the top of the tab list. Besides, postpones operation > by showing a ProgressDialog to block UI until native libraries are > loaded. > > BUG= 730305 > > Review-Url: https://codereview.chromium.org/2931433004 > Cr-Commit-Position: refs/heads/master@{#494316} > Committed: https://chromium.googlesource.com/chromium/src/+/fc32a59653e65cee968472d8c91fa060fdf981d9 TBR=tedchoc@chromium.org,yusufo@chromium.org,ltian@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG= 730305 ,756509 Review-Url: https://codereview.chromium.org/2997163002 Cr-Commit-Position: refs/heads/master@{#495242} [modify] https://crrev.com/a29ddf2ebcc01f3a21121f73b6155ccc812a4275/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionActivity.java [modify] https://crrev.com/a29ddf2ebcc01f3a21121f73b6155ccc812a4275/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsContextMenuHelper.java [modify] https://crrev.com/a29ddf2ebcc01f3a21121f73b6155ccc812a4275/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsContextMenuItemDelegate.java [modify] https://crrev.com/a29ddf2ebcc01f3a21121f73b6155ccc812a4275/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/TabularContextMenuListAdapter.java [modify] https://crrev.com/a29ddf2ebcc01f3a21121f73b6155ccc812a4275/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java [modify] https://crrev.com/a29ddf2ebcc01f3a21121f73b6155ccc812a4275/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModel.java [modify] https://crrev.com/a29ddf2ebcc01f3a21121f73b6155ccc812a4275/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelOrderController.java [modify] https://crrev.com/a29ddf2ebcc01f3a21121f73b6155ccc812a4275/chrome/android/java/strings/android_chrome_strings.grd [modify] https://crrev.com/a29ddf2ebcc01f3a21121f73b6155ccc812a4275/chrome/android/java_sources.gni [delete] https://crrev.com/b6e54d929c511986b2ef43c4bcc1312b8e2bb426/chrome/android/javatests/src/org/chromium/chrome/browser/browseractions/BrowserActionActivityTest.java [rename] https://crrev.com/a29ddf2ebcc01f3a21121f73b6155ccc812a4275/chrome/android/junit/src/org/chromium/chrome/browser/browseractions/BrowserActionActivityTest.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/366f54cdaee08948e36f8336fa4b058bba84fda1 commit 366f54cdaee08948e36f8336fa4b058bba84fda1 Author: Lei Tian <ltian@google.com> Date: Fri Aug 18 02:39:04 2017 Revert "Revert of [Android] Open a tab in the background from Browser Actions if ChromeTabbedActivity is available (patchset #13 id:240001 of https://codereview.chromium.org/2931433004/ )" Fix the revert because of the testOpenMultipleTabInBackgroundWhenChromeAvailable test failure on tablets. The reason for the failure is because the overview is always invisible on tablets. To fix the problem. limit that test only for phone. This reverts commit a29ddf2ebcc01f3a21121f73b6155ccc812a4275. BUG= 730305 Change-Id: Id461ec150b97d8e46f66116f9586bcbbf7d894d3 Reviewed-on: https://chromium-review.googlesource.com/619760 Reviewed-by: Ted Choc <tedchoc@chromium.org> Commit-Queue: Lei Tian <ltian@google.com> Cr-Commit-Position: refs/heads/master@{#495435} [modify] https://crrev.com/366f54cdaee08948e36f8336fa4b058bba84fda1/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionActivity.java [modify] https://crrev.com/366f54cdaee08948e36f8336fa4b058bba84fda1/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsContextMenuHelper.java [modify] https://crrev.com/366f54cdaee08948e36f8336fa4b058bba84fda1/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsContextMenuItemDelegate.java [modify] https://crrev.com/366f54cdaee08948e36f8336fa4b058bba84fda1/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/TabularContextMenuListAdapter.java [modify] https://crrev.com/366f54cdaee08948e36f8336fa4b058bba84fda1/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java [modify] https://crrev.com/366f54cdaee08948e36f8336fa4b058bba84fda1/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModel.java [modify] https://crrev.com/366f54cdaee08948e36f8336fa4b058bba84fda1/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelOrderController.java [modify] https://crrev.com/366f54cdaee08948e36f8336fa4b058bba84fda1/chrome/android/java/strings/android_chrome_strings.grd [modify] https://crrev.com/366f54cdaee08948e36f8336fa4b058bba84fda1/chrome/android/java_sources.gni [add] https://crrev.com/366f54cdaee08948e36f8336fa4b058bba84fda1/chrome/android/javatests/src/org/chromium/chrome/browser/browseractions/BrowserActionActivityTest.java [rename] https://crrev.com/366f54cdaee08948e36f8336fa4b058bba84fda1/chrome/android/junit/src/org/chromium/chrome/browser/browseractions/BrowserActionsIntentTest.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e2f4aea57921a816a26408317d2ba7db1e97229b commit e2f4aea57921a816a26408317d2ba7db1e97229b Author: Lei Tian <ltian@google.com> Date: Tue Sep 19 22:55:30 2017 Change Browser Actions tabs to be created in a foreground service This CL creates a foreground serivce to open tabs in the background for Browser Actions. The flow is: 1. First starts the service with a Tab.INVALID_TAB_ID and then start creating the tab. This is notified by the action ACTION_TAB_CREATION_START. 2. Once the tab is created, update the notification with the valid tab id by action ACTION_TAB_CREATION_UPDATE. 3. When the tab stops loading, end the foreground service by action ACTION_TAB_CREATION_FINISH and keep the notification alive. BUG= 730305 Change-Id: Ieebeb099cadc4993993f849a781a7457cb73ed1a Reviewed-on: https://chromium-review.googlesource.com/622049 Commit-Queue: Lei Tian <ltian@google.com> Reviewed-by: Ted Choc <tedchoc@chromium.org> Reviewed-by: David Trainor <dtrainor@chromium.org> Cr-Commit-Position: refs/heads/master@{#502976} [modify] https://crrev.com/e2f4aea57921a816a26408317d2ba7db1e97229b/chrome/android/java/AndroidManifest.xml [modify] https://crrev.com/e2f4aea57921a816a26408317d2ba7db1e97229b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java [modify] https://crrev.com/e2f4aea57921a816a26408317d2ba7db1e97229b/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsContextMenuHelper.java [modify] https://crrev.com/e2f4aea57921a816a26408317d2ba7db1e97229b/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsContextMenuItemDelegate.java [add] https://crrev.com/e2f4aea57921a816a26408317d2ba7db1e97229b/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsService.java [modify] https://crrev.com/e2f4aea57921a816a26408317d2ba7db1e97229b/chrome/android/java_sources.gni [modify] https://crrev.com/e2f4aea57921a816a26408317d2ba7db1e97229b/chrome/android/javatests/src/org/chromium/chrome/browser/browseractions/BrowserActionActivityTest.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/61755cc2fb5ab2f8c45e2af490fcb88439c39ed1 commit 61755cc2fb5ab2f8c45e2af490fcb88439c39ed1 Author: Lei Tian <ltian@google.com> Date: Mon Oct 02 07:23:39 2017 Add Browser Actions tab model selector and open a tab through it if ChromeTabbedActivity is not available This CL adds a new tab model selector for Browser Actions. The Browser Actions tab model selector creates a tab without need of ChromeActivity and TabContentMananger. It also has it's own TabPersistencePolicy. The CL also implements how to save and restore the tab model in case that Chrome crashes. When ChromeTabbedActivity is not available, Browser Actions will create a Tab from the Browser Actions tab model selector. BUG= 730305 Change-Id: Ibb6737d85f3b9035f5ab93aedce08ce74d7a8ff7 Reviewed-on: https://chromium-review.googlesource.com/622239 Commit-Queue: Lei Tian <ltian@google.com> Reviewed-by: Ted Choc <tedchoc@chromium.org> Reviewed-by: Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#505551} [modify] https://crrev.com/61755cc2fb5ab2f8c45e2af490fcb88439c39ed1/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsService.java [add] https://crrev.com/61755cc2fb5ab2f8c45e2af490fcb88439c39ed1/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsTabCreatorManager.java [add] https://crrev.com/61755cc2fb5ab2f8c45e2af490fcb88439c39ed1/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsTabModelSelector.java [add] https://crrev.com/61755cc2fb5ab2f8c45e2af490fcb88439c39ed1/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsTabPersistencePolicy.java [modify] https://crrev.com/61755cc2fb5ab2f8c45e2af490fcb88439c39ed1/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java [modify] https://crrev.com/61755cc2fb5ab2f8c45e2af490fcb88439c39ed1/chrome/android/java_sources.gni [modify] https://crrev.com/61755cc2fb5ab2f8c45e2af490fcb88439c39ed1/chrome/android/javatests/src/org/chromium/chrome/browser/browseractions/BrowserActionActivityTest.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e8039ceecd6e1aa6ad454a1a28a55b47a027763f commit e8039ceecd6e1aa6ad454a1a28a55b47a027763f Author: Lei Tian <ltian@google.com> Date: Fri Oct 06 22:15:44 2017 Merge Browser Actions model into ChromeTabbedActivity when Chrome starts If ChromeTabbedActivity is not available when users try to open tabs in the background from Browser Actions, Browser Actions will create its own tab model selector to maintain the tabs. Then when Chrome starts, this CL deals with merge those tabs into ChromeTabbedActivity and sets the last tabs as the active tab. BUG= 730305 Change-Id: Ib6488515c4b4e155c981c85e852a959d3c600139 Reviewed-on: https://chromium-review.googlesource.com/633867 Commit-Queue: Lei Tian <ltian@google.com> Reviewed-by: Yusuf Ozuysal <yusufo@chromium.org> Reviewed-by: Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/master@{#507192} [modify] https://crrev.com/e8039ceecd6e1aa6ad454a1a28a55b47a027763f/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java [modify] https://crrev.com/e8039ceecd6e1aa6ad454a1a28a55b47a027763f/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsTabCreatorManager.java [modify] https://crrev.com/e8039ceecd6e1aa6ad454a1a28a55b47a027763f/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsTabModelSelector.java [modify] https://crrev.com/e8039ceecd6e1aa6ad454a1a28a55b47a027763f/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java [modify] https://crrev.com/e8039ceecd6e1aa6ad454a1a28a55b47a027763f/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java [modify] https://crrev.com/e8039ceecd6e1aa6ad454a1a28a55b47a027763f/chrome/android/javatests/src/org/chromium/chrome/browser/browseractions/BrowserActionActivityTest.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ed638557597f1f8d88556b697c92bbe209070dca commit ed638557597f1f8d88556b697c92bbe209070dca Author: Lei Tian <ltian@google.com> Date: Fri Oct 20 17:29:43 2017 Merge Browser Actions tab model into ChromeTabbedActivity when Chrome is killed and restarts again When Chrome is not available, Browser Actions creates its own tab model selector to manage the tabs. Then if Chrome gets killed again, BrowserActionsTabModelSelector will save the tabs onto disk and next time Chrome restarts, TabPersistenceStore will merge the Browser Actions tab model into the ChromeTabbedActivity. And all the Browser Actions tabs will be appended at the end of the model selector. The logic is implemented in the TabPersistenceStore when Chrome loads and restores state from it. Browser Actions tab model shares the same directory with ChromeTabbedActivity so there is no need to move the TabState files. BUG= 730305 Change-Id: I47c1daee6996fb867a0b9c1012f7a37e89c02f4f Reviewed-on: https://chromium-review.googlesource.com/675664 Commit-Queue: Lei Tian <ltian@google.com> Reviewed-by: Theresa <twellington@chromium.org> Reviewed-by: Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/master@{#510478} [modify] https://crrev.com/ed638557597f1f8d88556b697c92bbe209070dca/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsTabModelSelector.java [modify] https://crrev.com/ed638557597f1f8d88556b697c92bbe209070dca/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionsTabPersistencePolicy.java [modify] https://crrev.com/ed638557597f1f8d88556b697c92bbe209070dca/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabTabPersistencePolicy.java [modify] https://crrev.com/ed638557597f1f8d88556b697c92bbe209070dca/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistencePolicy.java [modify] https://crrev.com/ed638557597f1f8d88556b697c92bbe209070dca/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java [modify] https://crrev.com/ed638557597f1f8d88556b697c92bbe209070dca/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManager.java [modify] https://crrev.com/ed638557597f1f8d88556b697c92bbe209070dca/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabbedModeTabPersistencePolicy.java [modify] https://crrev.com/ed638557597f1f8d88556b697c92bbe209070dca/chrome/android/javatests/src/org/chromium/chrome/browser/browseractions/BrowserActionActivityTest.java [modify] https://crrev.com/ed638557597f1f8d88556b697c92bbe209070dca/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabTabPersistencePolicyTest.java
Comment 1 by bugdroid1@chromium.org
, Aug 15 2017