Cromite Branding: add some visual enhancements in android
- do not exit the application when pressing the back button if the tab was not opened by external application (#1606) - move the new tab button to the right in the hub - activate search among open tabs in the hub - only show active groups in the hub
This commit is contained in:
@@ -29,6 +29,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../ChromeContextMenuPopulator.java | 2 +-
|
||||
.../browser/fullscreen/FullscreenToast.java | 2 +-
|
||||
.../inline/BromiteInlineUpdateController.java | 19 +++-
|
||||
.../tabbed_mode/TabbedRootUiCoordinator.java | 2 +-
|
||||
chrome/app/extensions_strings.grdp | 4 +-
|
||||
chrome/app/settings_strings.grdp | 2 +-
|
||||
chrome/app/theme/chromium/BRANDING | 8 +-
|
||||
@@ -37,6 +38,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../theme/chromium/win/tiles/SmallLogo.png | Bin 9784 -> 12363 bytes
|
||||
.../chromium/product_logo_32.png | Bin 822 -> 2301 bytes
|
||||
chrome/browser/BUILD.gn | 1 +
|
||||
.../browser/flags/ChromeFeatureList.java | 2 +-
|
||||
.../browser/hub/HubToolbarMediator.java | 2 +-
|
||||
.../android/res/layout/hub_toolbar_layout.xml | 82 ++++++++-------
|
||||
.../chrome/browser/omaha/UpdateConfigs.java | 2 +-
|
||||
chrome/browser/prefs/BUILD.gn | 1 +
|
||||
.../prefs/chrome_pref_service_factory.cc | 6 +-
|
||||
@@ -53,6 +57,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../drawable-xhdpi/fre_product_logo.png | Bin 5151 -> 34576 bytes
|
||||
.../drawable-xxhdpi/fre_product_logo.png | Bin 7720 -> 60959 bytes
|
||||
.../drawable-xxxhdpi/fre_product_logo.png | Bin 10740 -> 93273 bytes
|
||||
.../browser/autocomplete_controller.cc | 1 +
|
||||
.../vector_icons/product_chrome_refresh.icon | 93 +++++++++---------
|
||||
.../chromium/product_logo.png | Bin 1562 -> 3577 bytes
|
||||
.../chromium/product_logo_white.png | Bin 1417 -> 3040 bytes
|
||||
@@ -61,9 +66,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../webui/version/resources/about_version.ts | 4 +-
|
||||
.../resources/about_version_mobile.css | 9 ++
|
||||
content/child/runtime_features.cc | 44 ++++-----
|
||||
.../Cromite-Branding.inc | 1 +
|
||||
.../Cromite-Branding.inc | 2 +
|
||||
tools/grit/grit/grd_reader.py | 35 +++++++
|
||||
59 files changed, 210 insertions(+), 132 deletions(-)
|
||||
64 files changed, 260 insertions(+), 172 deletions(-)
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Cromite-Branding.inc
|
||||
|
||||
diff --git a/build/BUILD.gn b/build/BUILD.gn
|
||||
@@ -9207,6 +9212,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/Br
|
||||
Log.i(TAG, "BromiteUpdater: fetching with GET '%s'", UPSTREAM_VERSION_URL);
|
||||
|
||||
EndpointFetcher.nativeFetchWithNoAuth(
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
|
||||
@@ -869,7 +869,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
|
||||
}
|
||||
return mBackButtonShouldCloseTabFn.apply(tab)
|
||||
? ActionType.CLOSE_TAB
|
||||
- : ActionType.EXIT_APP;
|
||||
+ : ActionType.CLOSE_TAB;
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/chrome/app/extensions_strings.grdp b/chrome/app/extensions_strings.grdp
|
||||
--- a/chrome/app/extensions_strings.grdp
|
||||
+++ b/chrome/app/extensions_strings.grdp
|
||||
@@ -13193,6 +13210,131 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
"//cc",
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
||||
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
||||
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
||||
@@ -969,7 +969,7 @@ public abstract class ChromeFeatureList {
|
||||
/* defaultValue= */ false,
|
||||
/* defaultValueInTests= */ false);
|
||||
public static final CachedFlag sGridTabSwitcherUpdate =
|
||||
- newCachedFlag(GRID_TAB_SWITCHER_UPDATE, false, /* defaultValueInTests= */ true);
|
||||
+ newCachedFlag(GRID_TAB_SWITCHER_UPDATE, true, /* defaultValueInTests= */ true);
|
||||
public static final CachedFlag sHistoryPaneAndroid =
|
||||
newCachedFlag(
|
||||
HISTORY_PANE_ANDROID,
|
||||
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubToolbarMediator.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubToolbarMediator.java
|
||||
--- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubToolbarMediator.java
|
||||
+++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubToolbarMediator.java
|
||||
@@ -82,7 +82,7 @@ public class HubToolbarMediator {
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration configuration) {
|
||||
int screenWidthDp = configuration.screenWidthDp;
|
||||
- boolean isTablet = HubUtils.isScreenWidthTablet(screenWidthDp);
|
||||
+ boolean isTablet = true; //HubUtils.isScreenWidthTablet(screenWidthDp);
|
||||
mPropertyModel.set(BACK_BUTTON_VISIBLE, isTablet);
|
||||
|
||||
Pane pane = mPaneManager.getFocusedPaneSupplier().get();
|
||||
diff --git a/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml b/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml
|
||||
--- a/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml
|
||||
+++ b/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml
|
||||
@@ -38,33 +38,20 @@ found in the LICENSE file.
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start|center_vertical">
|
||||
-
|
||||
- <Space
|
||||
- android:id="@+id/margin_spacer"
|
||||
- android:layout_width="@dimen/hub_toolbar_action_button_start_margin"
|
||||
- android:layout_height="match_parent"
|
||||
- android:visibility="gone"/>
|
||||
-
|
||||
- <org.chromium.ui.widget.ChromeImageButton
|
||||
- android:id="@+id/toolbar_back_button"
|
||||
- android:src="@drawable/ic_arrow_back_24dp"
|
||||
- android:layout_width="@dimen/min_touch_target_size"
|
||||
- android:layout_height="@dimen/min_touch_target_size"
|
||||
- android:layout_gravity="center"
|
||||
- android:layout_marginStart="4dp"
|
||||
- android:contentDescription="@string/back"
|
||||
- android:tooltipText="@string/back"
|
||||
- android:visibility="gone"
|
||||
- style="@style/ToolbarMenuButton"
|
||||
- app:tint="@color/default_icon_color_tint_list"/>
|
||||
-
|
||||
- <Button
|
||||
- android:id="@+id/toolbar_action_button"
|
||||
- android:layout_width="wrap_content"
|
||||
- android:layout_height="match_parent"
|
||||
- android:layout_gravity="start|center_vertical"
|
||||
- android:visibility="gone"
|
||||
- style="?attr/newTabButtonStyle"/>
|
||||
+ <Space
|
||||
+ android:layout_width="@dimen/hub_toolbar_action_button_start_margin"
|
||||
+ android:layout_height="match_parent"/>
|
||||
+ <org.chromium.ui.widget.ChromeImageButton
|
||||
+ android:id="@+id/search_loupe"
|
||||
+ android:visibility="gone"
|
||||
+ android:gravity="center_vertical"
|
||||
+ android:layout_width="44dp"
|
||||
+ android:layout_height="match_parent"
|
||||
+ android:contentDescription="@string/search"
|
||||
+ android:src="@drawable/ic_search"
|
||||
+ android:tooltipText="@string/accessibility_search_loupe_tooltip_text"
|
||||
+ style="@style/ToolbarMenuButton"
|
||||
+ app:tint="@color/default_icon_color_tint_list" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
@@ -96,18 +83,39 @@ found in the LICENSE file.
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end" >
|
||||
- <!-- On tablets, the searchbox (R.id.search_box) is hidden in favor of a button. -->
|
||||
- <org.chromium.ui.widget.ChromeImageButton
|
||||
- android:id="@+id/search_loupe"
|
||||
+ <LinearLayout
|
||||
+ android:orientation="horizontal"
|
||||
+ android:layout_width="wrap_content"
|
||||
+ android:layout_height="match_parent"
|
||||
+ android:layout_gravity="start|center_vertical">
|
||||
+
|
||||
+ <org.chromium.ui.widget.ChromeImageButton
|
||||
+ android:id="@+id/toolbar_back_button"
|
||||
+ android:src="@drawable/ic_arrow_back_24dp"
|
||||
+ android:layout_width="@dimen/min_touch_target_size"
|
||||
+ android:layout_height="@dimen/min_touch_target_size"
|
||||
+ android:layout_gravity="center"
|
||||
+ android:layout_marginStart="4dp"
|
||||
+ android:contentDescription="@string/back"
|
||||
+ android:tooltipText="@string/back"
|
||||
android:visibility="gone"
|
||||
- android:gravity="center_vertical"
|
||||
- android:layout_width="44dp"
|
||||
- android:layout_height="match_parent"
|
||||
- android:contentDescription="@string/search"
|
||||
- android:src="@drawable/ic_search"
|
||||
- android:tooltipText="@string/accessibility_search_loupe_tooltip_text"
|
||||
style="@style/ToolbarMenuButton"
|
||||
- app:tint="@color/default_icon_color_tint_list" />
|
||||
+ app:tint="@color/default_icon_color_tint_list"/>
|
||||
+
|
||||
+ <Button
|
||||
+ android:id="@+id/toolbar_action_button"
|
||||
+ android:layout_width="wrap_content"
|
||||
+ android:layout_height="match_parent"
|
||||
+ android:layout_gravity="start|center_vertical"
|
||||
+ android:visibility="gone"
|
||||
+ style="?attr/newTabButtonStyle"/>
|
||||
+
|
||||
+ <Space
|
||||
+ android:id="@+id/margin_spacer"
|
||||
+ android:layout_width="@dimen/hub_toolbar_action_button_start_margin"
|
||||
+ android:layout_height="match_parent"
|
||||
+ android:visibility="gone"/>
|
||||
+ </LinearLayout>
|
||||
<include layout="@layout/menu_button" />
|
||||
</LinearLayout>
|
||||
|
||||
diff --git a/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/UpdateConfigs.java b/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/UpdateConfigs.java
|
||||
--- a/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/UpdateConfigs.java
|
||||
+++ b/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/UpdateConfigs.java
|
||||
@@ -18271,6 +18413,17 @@ z-aP~TXJZ`-(Yg4YH}L#8=YM{CKWmuBV|oH(e6M*W+WLnfYBCzOQRGLiPvyZq6&Nv6
|
||||
z4G!>zy1hcOdP%7GG2>1P`Or}=o{p{?6G1~J{`Cl{gUX-*clf=;TVY)N<lVO9k)vG$
|
||||
i?Ib$(ofrX17!1R|`h|N%TnD<%35@j2bgPM^i2nno*_EOI
|
||||
|
||||
diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc
|
||||
--- a/components/omnibox/browser/autocomplete_controller.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_controller.cc
|
||||
@@ -1126,6 +1126,7 @@ bool AutocompleteController::ShouldRunProvider(
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
if (omnibox::IsAndroidHub(input_.current_page_classification())) {
|
||||
+ if ((true)) return provider->type() == AutocompleteProvider::TYPE_OPEN_TAB;
|
||||
return provider->type() == AutocompleteProvider::TYPE_SEARCH ||
|
||||
provider->type() == AutocompleteProvider::TYPE_OPEN_TAB ||
|
||||
provider->type() == AutocompleteProvider::TYPE_BOOKMARK ||
|
||||
diff --git a/components/omnibox/browser/vector_icons/product_chrome_refresh.icon b/components/omnibox/browser/vector_icons/product_chrome_refresh.icon
|
||||
--- a/components/omnibox/browser/vector_icons/product_chrome_refresh.icon
|
||||
+++ b/components/omnibox/browser/vector_icons/product_chrome_refresh.icon
|
||||
@@ -19126,8 +19279,9 @@ diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/C
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Cromite-Branding.inc
|
||||
@@ -0,0 +1 @@
|
||||
+// Empty file
|
||||
@@ -0,0 +1,2 @@
|
||||
+SET_CROMITE_FEATURE_ENABLED(kAndroidTabDeclutterArchiveAllButActiveTab);
|
||||
+SET_CROMITE_FEATURE_ENABLED(kGridTabSwitcherUpdate);
|
||||
diff --git a/tools/grit/grit/grd_reader.py b/tools/grit/grit/grd_reader.py
|
||||
--- a/tools/grit/grit/grd_reader.py
|
||||
+++ b/tools/grit/grit/grd_reader.py
|
||||
|
||||
Reference in New Issue
Block a user