Commit 9adc682d authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

Move chrome.browser.ui.widget.text to //components/browser_ui

TextViewWithCompoundDrawables will be needed for the permissions dialog
in WebLayer, but might as well move everything in the text/ dir since
they might be needed later.

Bug: 1030785, 1025609
Change-Id: I856713fdc220bd67f78e76b024d446b02bda732e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1980164Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727250}
parent 592fa362
......@@ -123,6 +123,7 @@ android_library("java") {
"//chrome/browser/util:java",
"//chrome/lib/lifecycle/public/android:java",
"//components/browser_ui/styles/android:java",
"//components/browser_ui/widget/android:java",
"//components/embedder_support/android:web_contents_delegate_java",
"//components/feature_engagement:feature_engagement_java",
"//components/policy/android:policy_java",
......
......@@ -19,7 +19,7 @@
android:adjustViewBounds="true"
android:importantForAccessibility="no"
app:srcCompat="@drawable/ic_globe_24dp"/>
<org.chromium.chrome.browser.ui.widget.text.TemplatePreservingTextView
<org.chromium.components.browser_ui.widget.text.TemplatePreservingTextView
android:id="@+id/description"
android:layout_width="0dp"
android:layout_height="wrap_content"
......
......@@ -11,8 +11,8 @@ import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import org.chromium.chrome.browser.ui.widget.text.TemplatePreservingTextView;
import org.chromium.chrome.tab_ui.R;
import org.chromium.components.browser_ui.widget.text.TemplatePreservingTextView;
import org.chromium.ui.widget.ButtonCompat;
import org.chromium.ui.widget.ChromeImageView;
......
......@@ -9,7 +9,7 @@
android:gravity="start"
style="@style/AlertDialogContent">
<org.chromium.chrome.browser.ui.widget.text.TextViewWithCompoundDrawables
<org.chromium.components.browser_ui.widget.text.TextViewWithCompoundDrawables
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -10,7 +10,7 @@
android:layout_height="wrap_content"
android:background="@android:color/black">
<org.chromium.chrome.browser.ui.widget.text.TextViewWithCompoundDrawables
<org.chromium.components.browser_ui.widget.text.TextViewWithCompoundDrawables
android:id="@+id/status_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -46,7 +46,7 @@ import org.chromium.chrome.browser.tabmodel.TabModel;
import org.chromium.chrome.browser.tabmodel.TabModelObserver;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.tabmodel.TabModelSelectorObserver;
import org.chromium.chrome.browser.ui.widget.text.VerticallyFixedEditText;
import org.chromium.components.browser_ui.widget.text.VerticallyFixedEditText;
import org.chromium.ui.base.WindowAndroid;
import java.lang.annotation.Retention;
......
......@@ -19,7 +19,7 @@ import org.chromium.base.annotations.NativeMethods;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ResourceId;
import org.chromium.chrome.browser.ShortcutHelper;
import org.chromium.chrome.browser.ui.widget.text.AccessibleTextView;
import org.chromium.components.browser_ui.widget.text.AccessibleTextView;
/**
* An ambient infobar to tell the user that the current site they are visiting is a PWA.
......
......@@ -21,7 +21,7 @@ import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChange
import org.chromium.chrome.browser.dom_distiller.ReaderModeManager;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabImpl;
import org.chromium.chrome.browser.ui.widget.text.AccessibleTextView;
import org.chromium.components.browser_ui.widget.text.AccessibleTextView;
/**
* This is the InfoBar implementation of the Reader Mode UI. This is used in place of the
......
......@@ -23,7 +23,7 @@ import androidx.annotation.VisibleForTesting;
import org.chromium.base.Log;
import org.chromium.base.StrictModeContext;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.ui.widget.text.VerticallyFixedEditText;
import org.chromium.components.browser_ui.widget.text.VerticallyFixedEditText;
/**
* An {@link EditText} that shows autocomplete text at the end.
......
......@@ -27,8 +27,8 @@ import androidx.annotation.Nullable;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.browser.ui.widget.animation.Interpolators;
import org.chromium.chrome.browser.ui.widget.text.TemplatePreservingTextView;
import org.chromium.chrome.ui.messages.R;
import org.chromium.components.browser_ui.widget.text.TemplatePreservingTextView;
import org.chromium.ui.base.DeviceFormFactor;
import org.chromium.ui.base.WindowAndroid;
import org.chromium.ui.interpolators.BakedBezierInterpolator;
......
......@@ -48,10 +48,6 @@ android_library("java") {
"java/src/org/chromium/chrome/browser/ui/widget/listmenu/ListMenuItemAdapter.java",
"java/src/org/chromium/chrome/browser/ui/widget/listmenu/ListMenuItemProperties.java",
"java/src/org/chromium/chrome/browser/ui/widget/listmenu/ListMenuItemViewBinder.java",
"java/src/org/chromium/chrome/browser/ui/widget/text/AccessibleTextView.java",
"java/src/org/chromium/chrome/browser/ui/widget/text/TemplatePreservingTextView.java",
"java/src/org/chromium/chrome/browser/ui/widget/text/TextViewWithCompoundDrawables.java",
"java/src/org/chromium/chrome/browser/ui/widget/text/VerticallyFixedEditText.java",
"java/src/org/chromium/chrome/browser/ui/widget/textbubble/ArrowBubbleDrawable.java",
"java/src/org/chromium/chrome/browser/ui/widget/textbubble/ImageTextBubble.java",
"java/src/org/chromium/chrome/browser/ui/widget/textbubble/TextBubble.java",
......
......@@ -3,7 +3,7 @@
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<org.chromium.chrome.browser.ui.widget.text.TextViewWithCompoundDrawables
<org.chromium.components.browser_ui.widget.text.TextViewWithCompoundDrawables
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
......
......@@ -35,13 +35,6 @@
<attr name="roundedfillColor" format="reference|color" />
</declare-styleable>
<declare-styleable name="TextViewWithCompoundDrawables">
<attr name="drawableWidth" format="dimension"/>
<attr name="drawableHeight" format="dimension"/>
<!-- drawableTint wasn't added in Android until API level 23. -->
<attr name="chromeDrawableTint" format="color"/>
</declare-styleable>
<declare-styleable name="WrappingLayout">
<attr name="horizontalSpacing" format="dimension" />
<attr name="verticalSpacing" format="dimension" />
......
......@@ -10,7 +10,7 @@ import android.support.v7.content.res.AppCompatResources;
import android.view.View;
import org.chromium.chrome.browser.ui.widget.R;
import org.chromium.chrome.browser.ui.widget.text.TextViewWithCompoundDrawables;
import org.chromium.components.browser_ui.widget.text.TextViewWithCompoundDrawables;
import org.chromium.ui.modelutil.PropertyKey;
import org.chromium.ui.modelutil.PropertyModel;
......
......@@ -58,7 +58,7 @@
android:visibility="visible"
tools:ignore="ContentDescription"/>
<org.chromium.chrome.browser.ui.widget.text.TemplatePreservingTextView
<org.chromium.components.browser_ui.widget.text.TemplatePreservingTextView
android:id="@+id/snackbar_message"
android:layout_width="0dp"
android:layout_height="wrap_content"
......
......@@ -10,7 +10,11 @@ android_library("java") {
"java/src/org/chromium/components/browser_ui/widget/BoundedLinearLayout.java",
"java/src/org/chromium/components/browser_ui/widget/DualControlLayout.java",
"java/src/org/chromium/components/browser_ui/widget/FadingEdgeScrollView.java",
"java/src/org/chromium/components/browser_ui/widget/text/AccessibleTextView.java",
"java/src/org/chromium/components/browser_ui/widget/text/AlertDialogEditText.java",
"java/src/org/chromium/components/browser_ui/widget/text/TemplatePreservingTextView.java",
"java/src/org/chromium/components/browser_ui/widget/text/TextViewWithCompoundDrawables.java",
"java/src/org/chromium/components/browser_ui/widget/text/VerticallyFixedEditText.java",
]
deps = [
......
......@@ -23,4 +23,11 @@
<attr name="dualControlLayoutVerticalPadding" format="dimension"/>
<attr name="dualControlLayoutHorizontalPadding" format="dimension"/>
</declare-styleable>
<declare-styleable name="TextViewWithCompoundDrawables">
<attr name="drawableWidth" format="dimension"/>
<attr name="drawableHeight" format="dimension"/>
<!-- drawableTint wasn't added in Android until API level 23. -->
<attr name="chromeDrawableTint" format="color"/>
</declare-styleable>
</resources>
......@@ -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.ui.widget.text;
package org.chromium.components.browser_ui.widget.text;
import android.content.Context;
import android.view.accessibility.AccessibilityEvent;
......
......@@ -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.ui.widget.text;
package org.chromium.components.browser_ui.widget.text;
import android.content.Context;
import android.support.v7.widget.AppCompatTextView;
......
......@@ -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.ui.widget.text;
package org.chromium.components.browser_ui.widget.text;
import android.content.Context;
import android.content.res.ColorStateList;
......@@ -14,7 +14,7 @@ import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;
import android.widget.TextView;
import org.chromium.chrome.browser.ui.widget.R;
import org.chromium.components.browser_ui.widget.R;
/**
* A {@link TextView} with support for explicitly sizing and tinting compound drawables.
......
......@@ -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.ui.widget.text;
package org.chromium.components.browser_ui.widget.text;
import android.content.Context;
import android.support.v7.widget.AppCompatEditText;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment