From af4ab8bc8276d591dbde9799280b5d7982e8664e Mon Sep 17 00:00:00 2001 From: Krishna Govind Date: Wed, 13 Mar 2019 00:25:28 +0000 Subject: [PATCH] Revert "Move tab_list_ui/ code into its own DFM" This reverts commit c0b924568870f749c8d969292639321879a70464. Reason for revert: breaks build, bug 941226 Original change's description: > Move tab_list_ui/ code into its own DFM > > BUG=925126 > > (cherry picked from commit 02d5848947400d769890ab3bfdf8eb66cd731c4e) > > Change-Id: I7e0f676f4e9e332945d70bedcbcb6f84665a3c80 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1475881 > Reviewed-by: Tommy Nyquist > Reviewed-by: Ilya Sherman > Reviewed-by: Ted Choc > Reviewed-by: Theresa > Reviewed-by: Tibor Goldschwendt > Commit-Queue: Yusuf Ozuysal > Cr-Original-Commit-Position: refs/heads/master@{#639609} > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1519092 > Reviewed-by: Yusuf Ozuysal > Cr-Commit-Position: refs/branch-heads/3729@{#62} > Cr-Branched-From: d4a8972e30b604f090aeda5dfff68386ae656267-refs/heads/master@{#638880} TBR=nyquist@chromium.org,isherman@chromium.org,tedchoc@chromium.org,yusufo@chromium.org,twellington@chromium.org,tiborg@chromium.org Change-Id: I473f8fca0da5bc3276d4ffbed466e8357d0a8bc3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 925126 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1519451 Reviewed-by: Krishna Govind Cr-Commit-Position: refs/branch-heads/3729@{#71} Cr-Branched-From: d4a8972e30b604f090aeda5dfff68386ae656267-refs/heads/master@{#638880} --- chrome/android/BUILD.gn | 28 +-------- .../features/module_names_to_package_ids.gni | 1 - .../features/tab_ui/AndroidManifest.xml | 21 ------- chrome/android/features/tab_ui/BUILD.gn | 58 ------------------- chrome/android/features/tab_ui/java/DEPS | 6 -- .../tasks/tab_management/GridTabSwitcher.java | 12 ---- .../tab_management/SilenceLintErrors.java | 31 ---------- .../tasks/tab_management/TabGroupUi.java | 15 ----- .../tab_management/TabManagementModule.java | 17 ------ .../TabManagementModuleImpl.java | 29 ---------- .../TabManagementModuleProvider.java | 35 ----------- .../tab_ui/tab_management_java_sources.gni | 22 ------- .../features/tab_ui/tab_ui_module_tmpl.gni | 40 ------------- .../res/layout/bottom_tab_grid_toolbar.xml | 4 +- .../res/layout/bottom_tab_strip_toolbar.xml | 4 +- .../layout/tab_list_recycler_view_layout.xml | 2 +- .../chrome/browser/ChromeTabbedActivity.java | 13 +++-- .../tasks/tab_groups/TabGroupUtils.java | 0 .../BottomTabGridCoordinator.java} | 32 +++++----- .../tab_list_ui/BottomTabGridMediator.java} | 36 ++++++------ .../BottomTabGridSheetContent.java} | 8 +-- .../BottomTabGridSheetProperties.java} | 4 +- ...BottomTabGridSheetToolbarCoordinator.java} | 18 +++--- .../BottomTabGridSheetViewBinder.java} | 20 +++---- .../BottomTabListToolbarView.java} | 8 +-- .../BottomTabStripToolbarViewBinder.java} | 14 ++--- .../GridTabSwitcherCoordinator.java | 5 +- .../tab_list_ui}/GridTabSwitcherMediator.java | 17 +++--- .../TabGridContainerViewBinder.java | 16 ++--- .../tasks/tab_list_ui}/TabGridViewBinder.java | 2 +- .../tasks/tab_list_ui}/TabGridViewHolder.java | 2 +- .../TabListContainerProperties.java | 2 +- .../tab_list_ui}/TabListCoordinator.java | 2 +- .../tasks/tab_list_ui}/TabListMediator.java | 2 +- .../tasks/tab_list_ui}/TabListModel.java | 4 +- .../tab_list_ui}/TabListRecyclerView.java | 2 +- .../tasks/tab_list_ui}/TabProperties.java | 2 +- .../TabStripBottomToolbarCoordinator.java} | 43 +++++++------- .../TabStripBottomToolbarMediator.java} | 14 ++--- .../TabStripToolbarCoordinator.java | 17 ++++-- .../TabStripToolbarViewProperties.java | 5 +- .../tab_list_ui}/TabStripViewBinder.java | 2 +- .../tab_list_ui}/TabStripViewHolder.java | 2 +- .../bottom/BottomControlsCoordinator.java | 19 +++--- .../chrome/browser/util/FeatureUtilities.java | 7 +-- .../java/strings/android_chrome_strings.grd | 15 +++-- chrome/android/java_sources.gni | 36 ++++++++++-- .../TabGridContainerViewBinderTest.java | 7 ++- .../tab_list_ui}/TabListViewHolderTest.java | 2 +- .../TestRecyclerViewSimpleViewBinder.java | 2 +- .../GridTabSwitcherMediatorUnitTest.java | 4 +- .../tab_list_ui}/TabListMediatorUnitTest.java | 2 +- tools/metrics/histograms/histograms.xml | 1 - 53 files changed, 214 insertions(+), 498 deletions(-) delete mode 100644 chrome/android/features/tab_ui/AndroidManifest.xml delete mode 100644 chrome/android/features/tab_ui/BUILD.gn delete mode 100644 chrome/android/features/tab_ui/java/DEPS delete mode 100644 chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcher.java delete mode 100644 chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/SilenceLintErrors.java delete mode 100644 chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUi.java delete mode 100644 chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModule.java delete mode 100644 chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModuleImpl.java delete mode 100644 chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModuleProvider.java delete mode 100644 chrome/android/features/tab_ui/tab_management_java_sources.gni delete mode 100644 chrome/android/features/tab_ui/tab_ui_module_tmpl.gni rename chrome/android/{features/tab_ui => }/java/src/org/chromium/chrome/browser/tasks/tab_groups/TabGroupUtils.java (100%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetCoordinator.java => java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridCoordinator.java} (74%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetMediator.java => java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridMediator.java} (83%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetContent.java => java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetContent.java} (88%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetProperties.java => java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetProperties.java} (92%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetToolbarCoordinator.java => java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetToolbarCoordinator.java} (71%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetViewBinder.java => java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetViewBinder.java} (69%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiToolbarView.java => java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabListToolbarView.java} (89%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiToolbarViewBinder.java => java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabStripToolbarViewBinder.java} (63%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/GridTabSwitcherCoordinator.java (95%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/GridTabSwitcherMediator.java (90%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabGridContainerViewBinder.java (70%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabGridViewBinder.java (98%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabGridViewHolder.java (96%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabListContainerProperties.java (96%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabListCoordinator.java (98%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabListMediator.java (99%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabListModel.java (87%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabListRecyclerView.java (98%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabProperties.java (97%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiCoordinator.java => java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripBottomToolbarCoordinator.java} (58%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java => java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripBottomToolbarMediator.java} (87%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabStripToolbarCoordinator.java (66%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabStripToolbarViewProperties.java (88%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabStripViewBinder.java (98%) rename chrome/android/{features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management => java/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabStripViewHolder.java (95%) rename chrome/android/{features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management => javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabGridContainerViewBinderTest.java (98%) rename chrome/android/{features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management => javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabListViewHolderTest.java (99%) rename chrome/android/{features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management => javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TestRecyclerViewSimpleViewBinder.java (96%) rename chrome/android/{features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management => junit/src/org/chromium/chrome/browser/tasks/tab_list_ui}/GridTabSwitcherMediatorUnitTest.java (98%) rename chrome/android/{features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management => junit/src/org/chromium/chrome/browser/tasks/tab_list_ui}/TabListMediatorUnitTest.java (99%) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index df1df293574c..08e8ab07dea7 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn @@ -9,8 +9,6 @@ import("//build/config/python.gni") import("//build/util/process_version.gni") import("//chrome/android/chrome_common_shared_library.gni") import("//chrome/android/chrome_public_apk_tmpl.gni") -import("//chrome/android/features/tab_ui/tab_management_java_sources.gni") -import("//chrome/android/features/tab_ui/tab_ui_module_tmpl.gni") import("//chrome/android/features/vr/public_vr_java_sources.gni") import("//chrome/android/feed/feed_java_sources.gni") import("//chrome/android/monochrome_android_manifest_jinja_variables.gni") @@ -422,9 +420,6 @@ android_library("chrome_java") { java_files += public_vr_java_sources - # Include sources from public_tab_management_java_sources.gni. - java_files += public_tab_management_java_sources - if (enable_vr) { deps += [ ":chrome_vr_java_resources", @@ -590,7 +585,6 @@ junit_binary("chrome_junit_tests") { "//base:base_java", "//base:base_java_test_support", "//base:base_junit_test_support", - "//chrome/android/features/tab_ui:java", "//chrome/android/webapk/libs/client:client_java", "//chrome/android/webapk/libs/common:common_java", "//chrome/android/webapk/test:junit_test_support", @@ -693,7 +687,6 @@ android_library("chrome_test_java") { "//base:base_java_test_support", "//chrome/android:app_hooks_java", "//chrome/android:chrome_java", - "//chrome/android/features/tab_ui:java", "//chrome/android/third_party/compositor_animator:compositor_animator_java", "//chrome/android/webapk/libs/client:client_java", "//chrome/android/webapk/libs/common:common_java", @@ -2040,19 +2033,6 @@ template("monochrome_public_bundle_tmpl") { } } - tab_ui_module_tmpl("${target_name}__tab_ui_bundle_module") { - manifest_package = manifest_package - module_name = "TabUiMonochromePublic" - base_module_target = ":$_base_module_target_name" - if (_is_trichrome) { - version_code = trichrome_version_code - } else { - version_code = monochrome_version_code - } - version_name = chrome_version_name - uncompress_shared_libraries = true - } - android_app_bundle(target_name) { if (_is_trichrome) { add_native_lib_placeholders_for_base_module = true @@ -2069,7 +2049,7 @@ template("monochrome_public_bundle_tmpl") { extra_modules = [] if (modularize_ar) { - extra_modules += [ + extra_modules = [ { name = "ar" module_target = ":${target_name}__ar_bundle_module" @@ -2084,12 +2064,6 @@ template("monochrome_public_bundle_tmpl") { }, ] } - extra_modules += [ - { - name = "tab_ui" - module_target = ":${target_name}__tab_ui_bundle_module" - }, - ] } } diff --git a/chrome/android/features/module_names_to_package_ids.gni b/chrome/android/features/module_names_to_package_ids.gni index ff4d7966a19d..3ab538fa5a8b 100644 --- a/chrome/android/features/module_names_to_package_ids.gni +++ b/chrome/android/features/module_names_to_package_ids.gni @@ -2,5 +2,4 @@ resource_packages_id_mapping = [ "ar=0x7e", "vr=0x7d", - "tab_ui=0x7c", ] diff --git a/chrome/android/features/tab_ui/AndroidManifest.xml b/chrome/android/features/tab_ui/AndroidManifest.xml deleted file mode 100644 index 577915e80e50..000000000000 --- a/chrome/android/features/tab_ui/AndroidManifest.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - diff --git a/chrome/android/features/tab_ui/BUILD.gn b/chrome/android/features/tab_ui/BUILD.gn deleted file mode 100644 index 78854a94b66f..000000000000 --- a/chrome/android/features/tab_ui/BUILD.gn +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 2019 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//build/config/android/rules.gni") -import("//chrome/common/features.gni") - -android_library("java") { - java_files = [ - "java/src/org/chromium/chrome/browser/tasks/tab_groups/TabGroupUtils.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherCoordinator.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherMediator.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridContainerViewBinder.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetCoordinator.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetMediator.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetContent.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetProperties.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetToolbarCoordinator.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetViewBinder.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewHolder.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiCoordinator.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiToolbarView.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiToolbarViewBinder.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabListContainerProperties.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabListCoordinator.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediator.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabListModel.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabListRecyclerView.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModuleImpl.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabProperties.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripToolbarCoordinator.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripToolbarViewProperties.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripViewBinder.java", - "java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripViewHolder.java", - ] - - classpath_deps = [ - "//base:base_java", - "//chrome/android:chrome_java", - "//chrome/android:chrome_strings_grd", - "//chrome/android:ui_locale_string_resources", - "//chrome/app:java_strings_grd", - "//components/feature_engagement:feature_engagement_java", - "//components/policy/android:policy_java", - "//content/public/android:content_java_resources", - "//content/public/android:content_java", - "//third_party/android_deps:android_arch_lifecycle_common_java", - "//third_party/android_deps:android_arch_lifecycle_runtime_java", - "//third_party/android_deps:android_support_annotations_java", - "//third_party/android_deps:android_support_compat_java", - "//third_party/android_deps:android_support_v13_java", - "//third_party/android_deps:android_support_v7_appcompat_java", - "//third_party/android_deps:android_support_v7_recyclerview_java", - "//ui/android:ui_java", - ] -} diff --git a/chrome/android/features/tab_ui/java/DEPS b/chrome/android/features/tab_ui/java/DEPS deleted file mode 100644 index 29603d98bc3e..000000000000 --- a/chrome/android/features/tab_ui/java/DEPS +++ /dev/null @@ -1,6 +0,0 @@ -include_rules = [ - "+components/feature_engagement/public/android/java/src/org/chromium/components/feature_engagement", - "+components/module_installer", - - "+content/public/android/java/src/org/chromium/content_public/browser", -] diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcher.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcher.java deleted file mode 100644 index b39ca20598da..000000000000 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcher.java +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.tasks.tab_management; - -import org.chromium.chrome.browser.compositor.layouts.OverviewModeController; - -/** - * Interface for the Grid Tab Switcher. - */ -public interface GridTabSwitcher { OverviewModeController getOverviewModeController(); } diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/SilenceLintErrors.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/SilenceLintErrors.java deleted file mode 100644 index 4f4f33988fb2..000000000000 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/SilenceLintErrors.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2018 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.tasks.tab_management; - -import org.chromium.chrome.R; - -/** - * Hacky class to avoid lint errors for resources called on the module. - */ -/* package */ class SilenceLintErrors { - // TODO(yusufo): Add these resources to the DFM - private int[] mRes = - new int[] {R.dimen.tab_grid_favicon_size, R.string.tab_management_module_title, - R.string.iph_tab_groups_quickly_compare_pages_text, - R.string.iph_tab_groups_tap_to_see_another_tab_text, - R.string.iph_tab_groups_your_tabs_together_text, - R.string.bottom_tab_grid_description, R.string.bottom_tab_grid_opened_half, - R.string.bottom_tab_grid_opened_full, R.string.bottom_tab_grid_closed, - R.dimen.tab_list_selected_inset, R.layout.tab_strip_item, - R.drawable.selected_tab_background, R.drawable.tab_grid_card_background, - R.layout.tab_grid_card_item, R.layout.tab_list_recycler_view_layout, - R.layout.bottom_tab_grid_toolbar, R.string.bottom_tab_grid_new_tab, - R.string.bottom_tab_grid_new_tab, R.plurals.bottom_tab_grid_title_placeholder, - R.string.iph_tab_groups_tap_to_see_another_tab_accessibility_text, - R.string.accessibility_bottom_tab_strip_expand_tab_sheet, - R.layout.bottom_tab_strip_toolbar}; - - private SilenceLintErrors() {} -} diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUi.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUi.java deleted file mode 100644 index b53281294a23..000000000000 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUi.java +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.tasks.tab_management; - -import org.chromium.chrome.browser.ChromeActivity; - -/** - * Interface for the Tab Groups related UI. - */ -public interface TabGroupUi { - void initializeWithNative(ChromeActivity activity); - void destroy(); -} diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModule.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModule.java deleted file mode 100644 index 402b4daf0e28..000000000000 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModule.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.tasks.tab_management; - -import android.view.ViewGroup; - -import org.chromium.chrome.browser.ChromeActivity; - -/** - * Interface to get access to components concerning tab management. - */ -public interface TabManagementModule { - GridTabSwitcher createGridTabSwitcher(ChromeActivity activity); - TabGroupUi createTabGroupUi(ViewGroup parentView); -} diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModuleImpl.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModuleImpl.java deleted file mode 100644 index 4f34f5f30492..000000000000 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModuleImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.tasks.tab_management; - -import android.view.ViewGroup; - -import org.chromium.base.annotations.UsedByReflection; -import org.chromium.chrome.browser.ChromeActivity; - -/** - * Impl class that will resolve components for tab management. - */ -@UsedByReflection("TabManagementModuleProvider.java") -public class TabManagementModuleImpl implements TabManagementModule { - @Override - public GridTabSwitcher createGridTabSwitcher(ChromeActivity activity) { - return new GridTabSwitcherCoordinator(activity, activity.getLifecycleDispatcher(), - activity.getToolbarManager(), activity.getTabModelSelector(), - activity.getTabContentManager(), activity.getCompositorViewHolder(), - activity.getFullscreenManager()); - } - - @Override - public TabGroupUi createTabGroupUi(ViewGroup parentView) { - return new TabGroupUiCoordinator(parentView); - } -} diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModuleProvider.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModuleProvider.java deleted file mode 100644 index 17fcb67ca1b9..000000000000 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModuleProvider.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.tasks.tab_management; - -import android.support.annotation.Nullable; - -import org.chromium.components.module_installer.ModuleInstaller; - -/** - * Provider class for TabManagementModule. - */ -public class TabManagementModuleProvider { - private static final String TAB_MANAGEMENT_MODULE_IMPL_CLASS_NAME = - "org.chromium.chrome.browser.tasks.tab_management.TabManagementModuleImpl"; - - /** - * Returns fallback or real {@link TabManagementModule} implementation depending on whether - * the module is installed. - */ - public static @Nullable TabManagementModule getTabManagementModule() { - TabManagementModule tabManagementModule; - try { - tabManagementModule = - (TabManagementModule) Class.forName(TAB_MANAGEMENT_MODULE_IMPL_CLASS_NAME) - .newInstance(); - } catch (ClassNotFoundException | InstantiationException | IllegalAccessException - | IllegalArgumentException e) { - ModuleInstaller.installDeferred("tab_ui"); - return null; - } - return tabManagementModule; - } -} diff --git a/chrome/android/features/tab_ui/tab_management_java_sources.gni b/chrome/android/features/tab_ui/tab_management_java_sources.gni deleted file mode 100644 index 3a4223e63d04..000000000000 --- a/chrome/android/features/tab_ui/tab_management_java_sources.gni +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2019 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -public_tab_management_java_sources = [ - "//chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcher.java", - "//chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/SilenceLintErrors.java", - "//chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUi.java", - "//chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModule.java", - "//chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabManagementModuleProvider.java", -] - -tab_management_test_java_sources = [ - "//chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridContainerViewBinderTest.java", - "//chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListViewHolderTest.java", - "//chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TestRecyclerViewSimpleViewBinder.java", -] - -tab_management_junit_java_sources = [ - "//chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherMediatorUnitTest.java", - "//chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediatorUnitTest.java", -] diff --git a/chrome/android/features/tab_ui/tab_ui_module_tmpl.gni b/chrome/android/features/tab_ui/tab_ui_module_tmpl.gni deleted file mode 100644 index 99b3b5723167..000000000000 --- a/chrome/android/features/tab_ui/tab_ui_module_tmpl.gni +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2019 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//build/config/android/rules.gni") -import("//build/config/locales.gni") -import("//chrome/android/features/module_names_to_package_ids.gni") - -template("tab_ui_module_tmpl") { - _manifest = "$target_gen_dir/$target_name/AndroidManifest.xml" - _manifest_target = "${target_name}__manifest" - jinja_template(_manifest_target) { - input = "//chrome/android/features/tab_ui/AndroidManifest.xml" - output = _manifest - variables = [ - "target_sdk_version=$android_sdk_version", - "manifest_package=${invoker.manifest_package}", - ] - } - - android_app_bundle_module(target_name) { - forward_variables_from(invoker, - [ - "base_module_target", - "module_name", - "uncompress_shared_libraries", - "version_code", - "version_name", - ]) - android_manifest = _manifest - android_manifest_dep = ":${_manifest_target}" - proguard_enabled = !is_java_debug - aapt_locale_whitelist = locales - package_name = "tab_ui" - package_name_to_id_mapping = resource_packages_id_mapping - deps = [ - "//chrome/android/features/tab_ui:java", - ] - } -} diff --git a/chrome/android/java/res/layout/bottom_tab_grid_toolbar.xml b/chrome/android/java/res/layout/bottom_tab_grid_toolbar.xml index a3c95d665288..9a6c369ae56c 100644 --- a/chrome/android/java/res/layout/bottom_tab_grid_toolbar.xml +++ b/chrome/android/java/res/layout/bottom_tab_grid_toolbar.xml @@ -3,7 +3,7 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> - - + diff --git a/chrome/android/java/res/layout/bottom_tab_strip_toolbar.xml b/chrome/android/java/res/layout/bottom_tab_strip_toolbar.xml index 6a3504fb5566..01d8599e790f 100644 --- a/chrome/android/java/res/layout/bottom_tab_strip_toolbar.xml +++ b/chrome/android/java/res/layout/bottom_tab_strip_toolbar.xml @@ -3,7 +3,7 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> - - + diff --git a/chrome/android/java/res/layout/tab_list_recycler_view_layout.xml b/chrome/android/java/res/layout/tab_list_recycler_view_layout.xml index 065946082530..ffdd4a3d00f1 100644 --- a/chrome/android/java/res/layout/tab_list_recycler_view_layout.xml +++ b/chrome/android/java/res/layout/tab_list_recycler_view_layout.xml @@ -2,7 +2,7 @@ - tabs) { mTabGridCoordinator.resetWithListOfTabs(tabs); @@ -80,9 +82,9 @@ public void resetWithListOfTabs(@Nullable List tabs) { private void updateBottomSheetContent(@Nullable List tabs) { if (tabs != null) { // create bottom sheet content - mToolbarCoordinator = new TabGridSheetToolbarCoordinator( + mToolbarCoordinator = new BottomTabGridSheetToolbarCoordinator( mContext, mTabGridCoordinator.getContainerView(), mToolbarPropertyModel); - mBottomSheetContent = new TabGridSheetContent( + mBottomSheetContent = new BottomTabGridSheetContent( mTabGridCoordinator.getContainerView(), mToolbarCoordinator.getView()); } else { if (mBottomSheetContent != null) { diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridMediator.java similarity index 83% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetMediator.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridMediator.java index 45fe213b0b72..3d41547c52c7 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridMediator.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.content.Context; import android.support.annotation.Nullable; @@ -29,17 +29,17 @@ import java.util.List; /** - * A mediator for the TabGridSheet component, respoonsible for communicating + * A mediator for the BottomTabGrid component, respoonsible for communicating * with the components' coordinator as well as managing the state of the bottom * sheet. */ -class TabGridSheetMediator implements Destroyable { +class BottomTabGridMediator implements Destroyable { /** - * Defines an interface for a {@link TabGridSheetMediator} reset event handler. + * Defines an interface for a {@link BottomTabGridMediator} reset event handler. */ interface ResetHandler { /** - * Handles a reset event originated from {@link TabGridSheetMediator}. + * Handles a reset event originated from {@link BottomTabGridMediator}. * * @param tabs List of Tabs to reset. */ @@ -54,7 +54,7 @@ interface ResetHandler { private final TabModelObserver mTabModelObserver; private final TabCreatorManager mTabCreatorManager; - TabGridSheetMediator(Context context, BottomSheetController bottomSheetController, + BottomTabGridMediator(Context context, BottomSheetController bottomSheetController, ResetHandler resetHandler, PropertyModel model, TabModelSelector tabModelSelector, TabCreatorManager tabCreatorManager) { mContext = context; @@ -98,15 +98,15 @@ public void didSelectTab(Tab tab, int type, int lastId) { /** * Handles communication with the bottom sheet based on the content provided. * - * @param sheetContent The {@link TabGridSheetContent} to populate the + * @param sheetContent The {@link BottomTabGridSheetContent} to populate the * bottom sheet with. When set to null, the bottom sheet * will be hidden. */ - void onReset(TabGridSheetContent sheetContent) { + void onReset(BottomTabGridSheetContent sheetContent) { if (sheetContent == null) { - hideTabGridSheet(); + hideBottomTabGridSheet(); } else { - showTabGridSheet(sheetContent); + showTabGridInBottomSheet(sheetContent); } } @@ -121,14 +121,14 @@ public void destroy() { } } - private void showTabGridSheet(TabGridSheetContent sheetContent) { + private void showTabGridInBottomSheet(BottomTabGridSheetContent sheetContent) { updateBottomSheetTitleAndMargin(); mBottomSheetController.getBottomSheet().addObserver(mSheetObserver); mBottomSheetController.requestShowContent(sheetContent, true); mBottomSheetController.expandSheet(); } - private void hideTabGridSheet() { + private void hideBottomTabGridSheet() { mBottomSheetController.hideContent(getCurrentSheetContent(), true); mBottomSheetController.getBottomSheet().removeObserver(mSheetObserver); } @@ -145,22 +145,22 @@ private void updateBottomSheetTitleAndMargin() { .getCurrentTabModelFilter() .getRelatedTabList(currentTab.getId()) .size(); - mModel.set(TabGridSheetProperties.HEADER_TITLE, + mModel.set(BottomTabGridSheetProperties.HEADER_TITLE, mContext.getResources().getQuantityString( R.plurals.bottom_tab_grid_title_placeholder, tabsCount, tabsCount)); - mModel.set(TabGridSheetProperties.CONTENT_TOP_MARGIN, + mModel.set(BottomTabGridSheetProperties.CONTENT_TOP_MARGIN, (int) mContext.getResources().getDimension(R.dimen.control_container_height)); } private void setupToolbarClickHandlers() { - mModel.set( - TabGridSheetProperties.COLLAPSE_CLICK_LISTENER, getCollapseButtonClickListener()); - mModel.set(TabGridSheetProperties.ADD_CLICK_LISTENER, getAddButtonClickListener()); + mModel.set(BottomTabGridSheetProperties.COLLAPSE_CLICK_LISTENER, + getCollapseButtonClickListener()); + mModel.set(BottomTabGridSheetProperties.ADD_CLICK_LISTENER, getAddButtonClickListener()); } private OnClickListener getCollapseButtonClickListener() { return view -> { - hideTabGridSheet(); + hideBottomTabGridSheet(); }; } diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetContent.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetContent.java similarity index 88% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetContent.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetContent.java index 1318f0a82b46..8e503da2a16d 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetContent.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetContent.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.view.View; @@ -11,16 +11,16 @@ import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.ContentPriority; /** A {@link BottomSheetContent} that displays tab grid. **/ -public class TabGridSheetContent implements BottomSheetContent { +public class BottomTabGridSheetContent implements BottomSheetContent { private final TabListRecyclerView mRecyclerView; private final View mToolbarView; /** - * Construct a new {@link TabGridSheetContent}. + * Construct a new {@link BottomTabGridSheetContent}. * @param recyclerView The {@link TabListRecyclerView} holding the tab grid. * @param toolbarView The toolbar {@link View} to use.} */ - TabGridSheetContent(TabListRecyclerView recyclerView, View toolbarView) { + BottomTabGridSheetContent(TabListRecyclerView recyclerView, View toolbarView) { mRecyclerView = recyclerView; mToolbarView = toolbarView; } diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetProperties.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetProperties.java similarity index 92% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetProperties.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetProperties.java index 3d95fe584705..fbb04961df42 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetProperties.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetProperties.java @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.view.View.OnClickListener; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; -class TabGridSheetProperties { +class BottomTabGridSheetProperties { public static final PropertyModel .WritableObjectPropertyKey COLLAPSE_CLICK_LISTENER = new PropertyModel.WritableObjectPropertyKey(); diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetToolbarCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetToolbarCoordinator.java similarity index 71% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetToolbarCoordinator.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetToolbarCoordinator.java index 6548ef330946..36e4a1c08c13 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetToolbarCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetToolbarCoordinator.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.content.Context; import android.view.LayoutInflater; @@ -16,14 +16,14 @@ /** * Coordinator for the toolbar component that will be shown on top of the tab - * grid when presented inside the bottom sheet. {@link TabGridSheetCoordinator} + * grid when presented inside the bottom sheet. {@link BottomTabGridCoordinator} */ -class TabGridSheetToolbarCoordinator implements Destroyable { - private final TabGroupUiToolbarView mToolbarView; +class BottomTabGridSheetToolbarCoordinator implements Destroyable { + private final BottomTabListToolbarView mToolbarView; private final PropertyModelChangeProcessor mModelChangeProcessor; /** - * Construct a new {@link TabGridSheetToolbarCoordinator}. + * Construct a new {@link BottomTabGridSheetToolbarCoordinator}. * * @param context The {@link Context} used to retrieve resources. * @param contentView The {@link View} to which the content will @@ -31,13 +31,13 @@ class TabGridSheetToolbarCoordinator implements Destroyable { * @param toolbarPropertyModel The {@link PropertyModel} instance representing * the toolbar. */ - TabGridSheetToolbarCoordinator( + BottomTabGridSheetToolbarCoordinator( Context context, ViewGroup contentView, PropertyModel toolbarPropertyModel) { - mToolbarView = (TabGroupUiToolbarView) LayoutInflater.from(context).inflate( + mToolbarView = (BottomTabListToolbarView) LayoutInflater.from(context).inflate( R.layout.bottom_tab_grid_toolbar, contentView, false); mModelChangeProcessor = PropertyModelChangeProcessor.create(toolbarPropertyModel, - new TabGridSheetViewBinder.ViewHolder(mToolbarView, contentView), - TabGridSheetViewBinder::bind); + new BottomTabGridSheetViewBinder.ViewHolder(mToolbarView, contentView), + BottomTabGridSheetViewBinder::bind); } /** @return The content {@link View}. */ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetViewBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetViewBinder.java similarity index 69% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetViewBinder.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetViewBinder.java index a1da40caaedb..1a2ddf711573 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridSheetViewBinder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetViewBinder.java @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; -import static org.chromium.chrome.browser.tasks.tab_management.TabGridSheetProperties.ADD_CLICK_LISTENER; -import static org.chromium.chrome.browser.tasks.tab_management.TabGridSheetProperties.COLLAPSE_CLICK_LISTENER; -import static org.chromium.chrome.browser.tasks.tab_management.TabGridSheetProperties.CONTENT_TOP_MARGIN; -import static org.chromium.chrome.browser.tasks.tab_management.TabGridSheetProperties.HEADER_TITLE; +import static org.chromium.chrome.browser.tasks.tab_list_ui.BottomTabGridSheetProperties.ADD_CLICK_LISTENER; +import static org.chromium.chrome.browser.tasks.tab_list_ui.BottomTabGridSheetProperties.COLLAPSE_CLICK_LISTENER; +import static org.chromium.chrome.browser.tasks.tab_list_ui.BottomTabGridSheetProperties.CONTENT_TOP_MARGIN; +import static org.chromium.chrome.browser.tasks.tab_list_ui.BottomTabGridSheetProperties.HEADER_TITLE; import android.view.View; import android.widget.FrameLayout; @@ -16,17 +16,17 @@ import org.chromium.ui.modelutil.PropertyModel; /** - * ViewBinder for TabGridSheet. + * ViewBinder for BottomTabGridSheet. */ -class TabGridSheetViewBinder { +class BottomTabGridSheetViewBinder { /** - * ViewHolder class to get access to all {@link View}s inside the TabGridSheet. + * ViewHolder class to get access to all {@link View}s inside the BottomTabGrid. */ public static class ViewHolder { - public final TabGroupUiToolbarView toolbarView; + public final BottomTabListToolbarView toolbarView; public final View contentView; - ViewHolder(TabGroupUiToolbarView toolbarView, View contentView) { + ViewHolder(BottomTabListToolbarView toolbarView, View contentView) { this.toolbarView = toolbarView; this.contentView = contentView; } diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiToolbarView.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabListToolbarView.java similarity index 89% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiToolbarView.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabListToolbarView.java index d6a65d1af074..1c483d4ac097 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiToolbarView.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabListToolbarView.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.content.Context; import android.util.AttributeSet; @@ -16,15 +16,15 @@ /** * Represents a generic toolbar used in the bottom strip/grid component. - * {@link TabGridSheetToolbarCoordinator} + * {@link BottomTabGridSheetToolbarCoordinator} */ -public class TabGroupUiToolbarView extends FrameLayout { +public class BottomTabListToolbarView extends FrameLayout { private ChromeImageView mRightButton; private ChromeImageView mLeftButton; private ViewGroup mContainerView; private TextView mTitleTextView; - public TabGroupUiToolbarView(Context context, AttributeSet attrs) { + public BottomTabListToolbarView(Context context, AttributeSet attrs) { super(context, attrs); } diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiToolbarViewBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabStripToolbarViewBinder.java similarity index 63% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiToolbarViewBinder.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabStripToolbarViewBinder.java index dfbc812e1898..4beec2a0b983 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiToolbarViewBinder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabStripToolbarViewBinder.java @@ -2,19 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; -import static org.chromium.chrome.browser.tasks.tab_management.TabStripToolbarViewProperties.ADD_CLICK_LISTENER; -import static org.chromium.chrome.browser.tasks.tab_management.TabStripToolbarViewProperties.EXPAND_CLICK_LISTENER; -import static org.chromium.chrome.browser.tasks.tab_management.TabStripToolbarViewProperties.IS_MAIN_CONTENT_VISIBLE; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabStripToolbarViewProperties.ADD_CLICK_LISTENER; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabStripToolbarViewProperties.EXPAND_CLICK_LISTENER; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabStripToolbarViewProperties.IS_MAIN_CONTENT_VISIBLE; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; /** - * ViewBinder for TabGroupUiToolbar. + * ViewBinder for BottomTabStripToolbar. */ -class TabGroupUiToolbarViewBinder { +class BottomTabStripToolbarViewBinder { /** * Binds the given model to the given view, updating the payload in propertyKey. * @@ -23,7 +23,7 @@ class TabGroupUiToolbarViewBinder { * @param propertyKey The key for the property to update for. */ public static void bind( - PropertyModel model, TabGroupUiToolbarView view, PropertyKey propertyKey) { + PropertyModel model, BottomTabListToolbarView view, PropertyKey propertyKey) { if (EXPAND_CLICK_LISTENER == propertyKey) { view.setLeftButtonOnClickListener(model.get(EXPAND_CLICK_LISTENER)); } else if (ADD_CLICK_LISTENER == propertyKey) { diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherCoordinator.java similarity index 95% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherCoordinator.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherCoordinator.java index f67e2a259cb3..35f0b63f5535 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherCoordinator.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.content.Context; @@ -26,7 +26,7 @@ * Parent coordinator that is responsible for showing a grid of tabs for the main TabSwitcher UI. */ public class GridTabSwitcherCoordinator - implements Destroyable, GridTabSwitcher, GridTabSwitcherMediator.ResetHandler { + implements Destroyable, GridTabSwitcherMediator.ResetHandler { private final PropertyModelChangeProcessor mContainerViewChangeProcessor; private final ActivityLifecycleDispatcher mLifecycleDispatcher; private final TabListCoordinator mTabGridCoordinator; @@ -55,7 +55,6 @@ public GridTabSwitcherCoordinator(Context context, * @return OverviewModeController implementation that will can be used for controlling * OverviewMode changes. */ - @Override public OverviewModeController getOverviewModeController() { return mMediator; } diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherMediator.java similarity index 90% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherMediator.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherMediator.java index 3dda73977c08..253e330e3456 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherMediator.java @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.ANIMATE_VISIBILITY_CHANGES; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.BOTTOM_CONTROLS_HEIGHT; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.INITIAL_SCROLL_INDEX; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.IS_INCOGNITO; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.IS_VISIBLE; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.TOP_CONTROLS_HEIGHT; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.VISIBILITY_LISTENER; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.ANIMATE_VISIBILITY_CHANGES; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.BOTTOM_CONTROLS_HEIGHT; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.INITIAL_SCROLL_INDEX; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.IS_INCOGNITO; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.IS_VISIBLE; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.TOP_CONTROLS_HEIGHT; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.VISIBILITY_LISTENER; import org.chromium.chrome.browser.compositor.layouts.OverviewModeController; import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager; @@ -101,6 +101,7 @@ public void onTabModelSelected(TabModel newModel, TabModel oldModel) { mTabModelSelector.addObserver(mTabModelSelectorObserver); mTabModelObserver = new TabModelSelectorTabModelObserver(mTabModelSelector) { + @Override public void didSelectTab(Tab tab, int type, int lastId) { if (type == TabSelectionType.FROM_CLOSE || mShouldIgnoreNextSelect) { diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridContainerViewBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridContainerViewBinder.java similarity index 70% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridContainerViewBinder.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridContainerViewBinder.java index da25caa93359..8eb9d48c7fef 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridContainerViewBinder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridContainerViewBinder.java @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.ANIMATE_VISIBILITY_CHANGES; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.BOTTOM_CONTROLS_HEIGHT; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.INITIAL_SCROLL_INDEX; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.IS_INCOGNITO; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.IS_VISIBLE; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.TOP_CONTROLS_HEIGHT; -import static org.chromium.chrome.browser.tasks.tab_management.TabListContainerProperties.VISIBILITY_LISTENER; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.ANIMATE_VISIBILITY_CHANGES; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.BOTTOM_CONTROLS_HEIGHT; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.INITIAL_SCROLL_INDEX; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.IS_INCOGNITO; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.IS_VISIBLE; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.TOP_CONTROLS_HEIGHT; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabListContainerProperties.VISIBILITY_LISTENER; import android.widget.FrameLayout; diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridViewBinder.java similarity index 98% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridViewBinder.java index 5f559ba10b2c..43f52fa9d27c 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridViewBinder.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.content.res.Resources; import android.graphics.Bitmap; diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridViewHolder.java similarity index 96% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewHolder.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridViewHolder.java index 636216882b48..f6ba2e398938 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewHolder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridViewHolder.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.support.v4.graphics.drawable.DrawableCompat; import android.support.v7.widget.RecyclerView; diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListContainerProperties.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListContainerProperties.java similarity index 96% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListContainerProperties.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListContainerProperties.java index bbbce8d3b356..fb42cf3d7f6d 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListContainerProperties.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListContainerProperties.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListCoordinator.java similarity index 98% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListCoordinator.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListCoordinator.java index a2db1dfe3fb3..f3f96fc02f95 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListCoordinator.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.content.Context; import android.support.annotation.IntDef; diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListMediator.java similarity index 99% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediator.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListMediator.java index d738ea3ab4a8..36eb7d3552d7 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListMediator.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.content.Context; import android.graphics.Bitmap; diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListModel.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListModel.java similarity index 87% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListModel.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListModel.java index 513265c2bd83..616556d3868b 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListModel.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListModel.java @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; -import static org.chromium.chrome.browser.tasks.tab_management.TabProperties.TAB_ID; +import static org.chromium.chrome.browser.tasks.tab_list_ui.TabProperties.TAB_ID; import org.chromium.chrome.browser.tabmodel.TabModel; import org.chromium.ui.modelutil.PropertyKey; diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListRecyclerView.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListRecyclerView.java similarity index 98% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListRecyclerView.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListRecyclerView.java index a345f9873ce7..f4cfc6d61c58 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListRecyclerView.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListRecyclerView.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabProperties.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabProperties.java similarity index 97% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabProperties.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabProperties.java index e12668dcbd1f..2f5cf26e97f9 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabProperties.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabProperties.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.graphics.Bitmap; diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripBottomToolbarCoordinator.java similarity index 58% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiCoordinator.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripBottomToolbarCoordinator.java index 8ab604bbadd6..a0e856b5e5c5 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripBottomToolbarCoordinator.java @@ -2,38 +2,39 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.content.Context; import android.view.ViewGroup; -import org.chromium.chrome.browser.ChromeActivity; import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; import org.chromium.chrome.browser.lifecycle.Destroyable; import org.chromium.chrome.browser.tab.Tab; +import org.chromium.chrome.browser.tabmodel.TabCreatorManager; import org.chromium.chrome.browser.tabmodel.TabModelSelector; +import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetController; import org.chromium.ui.modelutil.PropertyModel; import java.util.List; /** - * A coordinator for TabGroupUi component. Manages the communication with - * {@link TabListCoordinator}, {@link TabGridSheetCoordinator}, and + * A coordinator for TabStripBottomToolbar component. Manages the communication with + * {@link TabListCoordinator}, {@link BottomTabGridCoordinator}, and * {@link TabStripToolbarCoordinator}, as well as the life-cycle of shared component objects. */ -public class TabGroupUiCoordinator - implements Destroyable, TabGroupUiMediator.ResetHandler, TabGroupUi { +public class TabStripBottomToolbarCoordinator + implements Destroyable, TabStripBottomToolbarMediator.ResetHandler { private final Context mContext; private final PropertyModel mTabStripToolbarModel; - private TabGridSheetCoordinator mTabGridSheetCoordinator; + private BottomTabGridCoordinator mBottomTabGridCoordinator; private TabListCoordinator mTabStripCoordinator; - private TabGroupUiMediator mMediator; + private TabStripBottomToolbarMediator mMediator; private TabStripToolbarCoordinator mTabStripToolbarCoordinator; /** - * Creates a new {@link TabGroupUiCoordinator} + * Creates a new {@link TabStripBottomToolbarCoordinator} */ - public TabGroupUiCoordinator(ViewGroup parentView) { + public TabStripBottomToolbarCoordinator(ViewGroup parentView) { mContext = parentView.getContext(); mTabStripToolbarModel = new PropertyModel(TabStripToolbarViewProperties.ALL_KEYS); @@ -44,22 +45,22 @@ public TabGroupUiCoordinator(ViewGroup parentView) { /** * Handle any initialization that occurs once native has been loaded. */ - @Override - public void initializeWithNative(ChromeActivity activity) { - TabModelSelector tabModelSelector = activity.getTabModelSelector(); - TabContentManager tabContentManager = activity.getTabContentManager(); + public void initializeWithNative(TabModelSelector tabModelSelector, + TabContentManager tabContentManager, TabCreatorManager tabCreatorManager, + BottomSheetController bottomSheetController) { mTabStripCoordinator = new TabListCoordinator(TabListCoordinator.TabListMode.STRIP, mContext, tabModelSelector, tabContentManager, mTabStripToolbarCoordinator.getTabListContainerView(), true); - mTabGridSheetCoordinator = new TabGridSheetCoordinator(mContext, - activity.getBottomSheetController(), tabModelSelector, tabContentManager, activity); + mBottomTabGridCoordinator = new BottomTabGridCoordinator(mContext, bottomSheetController, + tabModelSelector, tabContentManager, tabCreatorManager); - mMediator = new TabGroupUiMediator(this, mTabStripToolbarModel, tabModelSelector, activity); + mMediator = new TabStripBottomToolbarMediator( + this, mTabStripToolbarModel, tabModelSelector, tabCreatorManager); } /** - * Handles a reset event originated from {@link TabGroupUiMediator} + * Handles a reset event originated from {@link TabStripBottomToolbarMediator} * when the bottom sheet is collapsed. * * @param tabs List of Tabs to reset. @@ -70,14 +71,14 @@ public void resetStripWithListOfTabs(List tabs) { } /** - * Handles a reset event originated from {@link TabGroupUiMediator} + * Handles a reset event originated from {@link TabStripBottomToolbarMediator} * when the bottom sheet is expanded. * * @param tabs List of Tabs to reset. */ @Override public void resetSheetWithListOfTabs(List tabs) { - mTabGridSheetCoordinator.resetWithListOfTabs(tabs); + mBottomTabGridCoordinator.resetWithListOfTabs(tabs); } /** @@ -86,7 +87,7 @@ public void resetSheetWithListOfTabs(List tabs) { @Override public void destroy() { mTabStripCoordinator.destroy(); - mTabGridSheetCoordinator.destroy(); + mBottomTabGridCoordinator.destroy(); mMediator.destroy(); } } diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripBottomToolbarMediator.java similarity index 87% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripBottomToolbarMediator.java index 05cc81fb7e3b..79602bd1a327 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripBottomToolbarMediator.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import org.chromium.chrome.browser.UrlConstants; import org.chromium.chrome.browser.lifecycle.Destroyable; @@ -19,17 +19,17 @@ import java.util.List; /** - * A mediator for the TabGroupUi. Responsible for managing the + * A mediator for the TabStripBottomToolbar. Responsible for managing the * internal state of the component. */ -public class TabGroupUiMediator implements Destroyable { +public class TabStripBottomToolbarMediator implements Destroyable { /** - * Defines an interface for a {@link TabGroupUiMediator} reset event + * Defines an interface for a {@link TabStripBottomToolbarMediator} reset event * handler. */ interface ResetHandler { /** - * Handles a reset event originated from {@link TabGroupUiMediator} + * Handles a reset event originated from {@link TabStripBottomToolbarMediator} * when the bottom sheet is collapsed. * * @param tabs List of Tabs to reset. @@ -37,7 +37,7 @@ interface ResetHandler { void resetStripWithListOfTabs(List tabs); /** - * Handles a reset event originated from {@link TabGroupUiMediator} + * Handles a reset event originated from {@link TabStripBottomToolbarMediator} * when the bottom sheet is expanded. * * @param tabs List of Tabs to reset. @@ -51,7 +51,7 @@ interface ResetHandler { private final TabModelSelector mTabModelSelector; private final TabCreatorManager mTabCreatorManager; - TabGroupUiMediator(ResetHandler resetHandler, PropertyModel toolbarPropertyModel, + TabStripBottomToolbarMediator(ResetHandler resetHandler, PropertyModel toolbarPropertyModel, TabModelSelector tabModelSelector, TabCreatorManager tabCreatorManager) { mResetHandler = resetHandler; mToolbarPropertyModel = toolbarPropertyModel; diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripToolbarCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripToolbarCoordinator.java similarity index 66% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripToolbarCoordinator.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripToolbarCoordinator.java index a69b64a5a8e0..ab4bdd55396e 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripToolbarCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripToolbarCoordinator.java @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; + +import static org.chromium.chrome.browser.dependency_injection.ChromeCommonQualifiers.ACTIVITY_CONTEXT; import android.content.Context; import android.view.LayoutInflater; @@ -14,23 +16,26 @@ import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; +import javax.inject.Named; + /** - * A coordinator for TabStripToolbar component. + * A coordinator for BottomTabStripToolbar component. */ public class TabStripToolbarCoordinator implements Destroyable { - private final TabGroupUiToolbarView mToolbarView; + private final BottomTabListToolbarView mToolbarView; private final PropertyModel mModel; private final PropertyModelChangeProcessor mModelChangeProcessor; - TabStripToolbarCoordinator(Context context, ViewGroup parentView, PropertyModel model) { + TabStripToolbarCoordinator( + @Named(ACTIVITY_CONTEXT) Context context, ViewGroup parentView, PropertyModel model) { mModel = model; - mToolbarView = (TabGroupUiToolbarView) LayoutInflater.from(context).inflate( + mToolbarView = (BottomTabListToolbarView) LayoutInflater.from(context).inflate( R.layout.bottom_tab_strip_toolbar, parentView, false); parentView.addView(mToolbarView); mModelChangeProcessor = PropertyModelChangeProcessor.create( - model, mToolbarView, TabGroupUiToolbarViewBinder::bind); + model, mToolbarView, BottomTabStripToolbarViewBinder::bind); } View getView() { diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripToolbarViewProperties.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripToolbarViewProperties.java similarity index 88% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripToolbarViewProperties.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripToolbarViewProperties.java index 3fdbf52d9863..e6c9a747348f 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripToolbarViewProperties.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripToolbarViewProperties.java @@ -2,16 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.view.View.OnClickListener; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; -/** - * {@link PropertyKey} list for the toolbar view on tabstrip. - */ class TabStripToolbarViewProperties { public static final PropertyModel .WritableObjectPropertyKey EXPAND_CLICK_LISTENER = diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripViewBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripViewBinder.java similarity index 98% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripViewBinder.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripViewBinder.java index d7fa2a9653c9..8b14fa53522f 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripViewBinder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripViewBinder.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripViewHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripViewHolder.java similarity index 95% rename from chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripViewHolder.java rename to chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripViewHolder.java index d199c087e7a5..1dab4e1446db 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabStripViewHolder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripViewHolder.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java index bbb179186369..e93ec6b25eee 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java @@ -17,8 +17,7 @@ import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior; import org.chromium.chrome.browser.compositor.layouts.ToolbarSwipeLayout; import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager; -import org.chromium.chrome.browser.tasks.tab_management.TabGroupUi; -import org.chromium.chrome.browser.tasks.tab_management.TabManagementModuleProvider; +import org.chromium.chrome.browser.tasks.tab_list_ui.TabStripBottomToolbarCoordinator; import org.chromium.chrome.browser.toolbar.IncognitoStateProvider; import org.chromium.chrome.browser.toolbar.MenuButton; import org.chromium.chrome.browser.toolbar.TabCountProvider; @@ -42,7 +41,7 @@ public class BottomControlsCoordinator { /** The coordinator for the split toolbar's bottom toolbar component. */ private @Nullable BottomToolbarCoordinator mBottomToolbarCoordinator; - private @Nullable TabGroupUi mTabGroupUi; + private @Nullable TabStripBottomToolbarCoordinator mTabStripCoordinator; /** * Build the coordinator that manages the bottom controls. @@ -70,7 +69,7 @@ public BottomControlsCoordinator(ChromeFullscreenManager fullscreenManager, View root.getResources().getDimensionPixelOffset(R.dimen.bottom_toolbar_height)); if (FeatureUtilities.isTabGroupsAndroidEnabled()) { - mTabGroupUi = TabManagementModuleProvider.getTabManagementModule().createTabGroupUi( + mTabStripCoordinator = new TabStripBottomToolbarCoordinator( root.findViewById(R.id.bottom_container_slot)); } else { mBottomToolbarCoordinator = new BottomToolbarCoordinator( @@ -117,8 +116,10 @@ public void initializeWithNative(ChromeActivity chromeActivity, ResourceManager tabCountProvider, incognitoStateProvider, topToolbarRoot); } - if (mTabGroupUi != null) { - mTabGroupUi.initializeWithNative(chromeActivity); + if (mTabStripCoordinator != null) { + mTabStripCoordinator.initializeWithNative(chromeActivity.getTabModelSelector(), + chromeActivity.getTabContentManager(), chromeActivity, + chromeActivity.getBottomSheetController()); mMediator.setBottomControlsVisible(true); } } @@ -127,8 +128,8 @@ public void initializeWithNative(ChromeActivity chromeActivity, ResourceManager * @param isVisible Whether the bottom control is visible. */ public void setBottomControlsVisible(boolean isVisible) { - // TabGroupUi manages its own visibility - if (mTabGroupUi != null) return; + // TabStripCoordinator manages its own visibility + if (mTabStripCoordinator != null) return; mMediator.setBottomControlsVisible(isVisible); if (mBottomToolbarCoordinator != null) { @@ -188,7 +189,7 @@ public void setToolbarSwipeLayout(ToolbarSwipeLayout layout) { */ public void destroy() { if (mBottomToolbarCoordinator != null) mBottomToolbarCoordinator.destroy(); - if (mTabGroupUi != null) mTabGroupUi.destroy(); + if (mTabStripCoordinator != null) mTabStripCoordinator.destroy(); mMediator.destroy(); } } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java index bfeebc9285ba..3d12cad195e6 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java @@ -30,7 +30,6 @@ import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations; import org.chromium.chrome.browser.preferences.ChromePreferenceManager; import org.chromium.chrome.browser.tabmodel.DocumentModeAssassin; -import org.chromium.chrome.browser.tasks.tab_management.TabManagementModuleProvider; import org.chromium.chrome.browser.touchless.TouchlessDelegate; import org.chromium.components.signin.AccountManagerFacade; import org.chromium.components.variations.VariationsAssociatedData; @@ -531,8 +530,7 @@ public static boolean isGridTabSwitcherEnabled(Context activityContext) { // changing that setting while Chrome is alive. return !DeviceFormFactor.isNonMultiDisplayContextOnTablet(activityContext) && !SysUtils.isLowEndDevice() && !DeviceClassManager.enableAccessibilityLayout() - && ChromeFeatureList.isEnabled(ChromeFeatureList.TAB_GRID_LAYOUT_ANDROID) - && TabManagementModuleProvider.getTabManagementModule() != null; + && ChromeFeatureList.isEnabled(ChromeFeatureList.TAB_GRID_LAYOUT_ANDROID); } private static void cacheTabGroupsAndroidEnabled() { @@ -555,8 +553,7 @@ public static boolean isTabGroupsAndroidEnabled() { ChromePreferenceManager.TAB_GROUPS_ANDROID_ENABLED_KEY, false); } - return sIsTabGroupsAndroidEnabled - && TabManagementModuleProvider.getTabManagementModule() != null; + return sIsTabGroupsAndroidEnabled; } private static boolean isDeviceEligibleForTabGroups() { diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd index d830dbe49c70..829cfd50e37d 100644 --- a/chrome/android/java/strings/android_chrome_strings.grd +++ b/chrome/android/java/strings/android_chrome_strings.grd @@ -4046,19 +4046,24 @@ To change this setting, <resetlink>reset sync

Your %1$swww.amazon.com timer ran out. It'll start again tomorrow. + Opened tabs + Opened tabs at half height + Opened tabs at full height + Opened tabs closed + {TABS_COUNT, plural, @@ -4066,9 +4071,11 @@ To change this setting, <resetlink>reset sync

%1$d8 tabs} } + Add new tab to group + Hide fullscreen grid @@ -4077,14 +4084,6 @@ To change this setting, <resetlink>reset sync

Show group's tabs in fullscreen grid - - - - Create group - - - Tab management - diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni index a78da5046adf..231f24b7c6ea 100644 --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni @@ -3,7 +3,6 @@ # found in the LICENSE file. import("//build/config/android/config.gni") -import("//chrome/android/features/tab_ui/tab_management_java_sources.gni") import("//chrome/android/feed/feed_java_sources.gni") import("//components/feed/features.gni") import("//components/offline_pages/buildflags/features.gni") @@ -1560,7 +1559,32 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java", "java/src/org/chromium/chrome/browser/tasks/TasksUma.java", "java/src/org/chromium/chrome/browser/tasks/tabgroup/TabGroupModelFilter.java", - "java/src/org/chromium/chrome/browser/tasks/tab_groups/LayoutTabGroupCreationButton.java", + "java/src/org/chromium/chrome/browser/tasks/tab_groups/TabGroupUtils.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripToolbarViewProperties.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabListToolbarView.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabStripToolbarViewBinder.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripBottomToolbarMediator.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripToolbarCoordinator.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripBottomToolbarCoordinator.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetProperties.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetToolbarCoordinator.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetViewBinder.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridCoordinator.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridMediator.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/BottomTabGridSheetContent.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherCoordinator.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherMediator.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridContainerViewBinder.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridViewBinder.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridViewHolder.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListContainerProperties.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListCoordinator.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListMediator.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListModel.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListRecyclerView.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabProperties.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripViewBinder.java", + "java/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabStripViewHolder.java", "java/src/org/chromium/chrome/browser/toolbar/HomeButton.java", "java/src/org/chromium/chrome/browser/toolbar/IncognitoStateProvider.java", "java/src/org/chromium/chrome/browser/toolbar/IncognitoToggleTabLayout.java", @@ -2283,6 +2307,9 @@ chrome_test_java_sources = [ "javatests/src/org/chromium/chrome/browser/tabmodel/TestTabModelDirectory.java", "javatests/src/org/chromium/chrome/browser/tabmodel/UndoTabModelTest.java", "javatests/src/org/chromium/chrome/browser/tabmodel/document/MockDocumentTabModel.java", + "javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListViewHolderTest.java", + "javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridContainerViewBinderTest.java", + "javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TestRecyclerViewSimpleViewBinder.java", "javatests/src/org/chromium/chrome/browser/test/ChromeBrowserTestRule.java", "javatests/src/org/chromium/chrome/browser/test/ClearAppDataTestRule.java", "javatests/src/org/chromium/chrome/browser/test/CommandLineInitRule.java", @@ -2507,6 +2534,8 @@ chrome_junit_test_java_sources = [ "junit/src/org/chromium/chrome/browser/tab/TabAttributesTest.java", "junit/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreUnitTest.java", "junit/src/org/chromium/chrome/browser/tabstate/TabStateUnitTest.java", + "junit/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherMediatorUnitTest.java", + "junit/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListMediatorUnitTest.java", "junit/src/org/chromium/chrome/browser/toolbar/ToolbarSecurityIconTest.java", "junit/src/org/chromium/chrome/browser/usage_stats/EventTrackerTest.java", "junit/src/org/chromium/chrome/browser/usage_stats/PageViewObserverTest.java", @@ -2537,9 +2566,6 @@ if (enable_feed_in_chrome) { chrome_test_java_sources += feed_test_java_sources } -chrome_junit_test_java_sources += tab_management_junit_java_sources -chrome_test_java_sources += tab_management_test_java_sources - # This is enable_arcore, not package_arcore because the apk merger, for # example, would complain that the java classes.dex differs between 32bit and # 64bit. We must include this, even if we're not packaging the shim. diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridContainerViewBinderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridContainerViewBinderTest.java similarity index 98% rename from chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridContainerViewBinderTest.java rename to chrome/android/javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridContainerViewBinderTest.java index 7b57e662a7f6..926d5172728e 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridContainerViewBinderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabGridContainerViewBinderTest.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.instanceOf; @@ -81,8 +81,9 @@ public static void setUpBeforeActivityLaunched() { public void setUpTest() throws Exception { super.setUpTest(); - ThreadUtils.runOnUiThreadBlocking( - () -> { mRecyclerView = getActivity().findViewById(R.id.tab_list_view); }); + ThreadUtils.runOnUiThreadBlocking(() -> { + mRecyclerView = getActivity().findViewById(R.id.tab_list_view); + }); mStartedShowingCallback = new CallbackHelper(); mFinishedShowingCallback = new CallbackHelper(); diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListViewHolderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListViewHolderTest.java similarity index 99% rename from chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListViewHolderTest.java rename to chrome/android/javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListViewHolderTest.java index 887678b26886..e4ee53ef6198 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListViewHolderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListViewHolderTest.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TestRecyclerViewSimpleViewBinder.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TestRecyclerViewSimpleViewBinder.java similarity index 96% rename from chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TestRecyclerViewSimpleViewBinder.java rename to chrome/android/javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TestRecyclerViewSimpleViewBinder.java index dd073d7f90c8..92c2ded436f0 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TestRecyclerViewSimpleViewBinder.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tasks/tab_list_ui/TestRecyclerViewSimpleViewBinder.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import android.support.v7.widget.RecyclerView; diff --git a/chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherMediatorUnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherMediatorUnitTest.java similarity index 98% rename from chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherMediatorUnitTest.java rename to chrome/android/junit/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherMediatorUnitTest.java index 63717299f163..fd40528416c4 100644 --- a/chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/GridTabSwitcherMediatorUnitTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/tasks/tab_list_ui/GridTabSwitcherMediatorUnitTest.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.instanceOf; @@ -16,7 +16,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static org.chromium.chrome.browser.tasks.tab_management.GridTabSwitcherMediator.INITIAL_SCROLL_INDEX_OFFSET; +import static org.chromium.chrome.browser.tasks.tab_list_ui.GridTabSwitcherMediator.INITIAL_SCROLL_INDEX_OFFSET; import android.content.Context; import android.content.res.Resources; diff --git a/chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediatorUnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListMediatorUnitTest.java similarity index 99% rename from chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediatorUnitTest.java rename to chrome/android/junit/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListMediatorUnitTest.java index d17256f26580..bdb7c6915423 100644 --- a/chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediatorUnitTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/tasks/tab_list_ui/TabListMediatorUnitTest.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.chrome.browser.tasks.tab_management; +package org.chromium.chrome.browser.tasks.tab_list_ui; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.instanceOf; diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 6ee84437fbfb..3dd91fda44b6 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml @@ -134870,7 +134870,6 @@ uploading your change for review. -