Commit d5d8003f authored by Alice Wang's avatar Alice Wang Committed by Chromium LUCI CQ

[Signin][Modularization] Move SigninView to signin.ui target

This CL moves SigninView to signin.ui target.

Bug: 1157052
Change-Id: I2211e6f6592dccbe4d73edeb8b6e18f173a92c13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2582324
Commit-Queue: Alice Wang <aliceywang@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836053}
parent 44dd8aec
...@@ -936,7 +936,6 @@ chrome_java_resources = [ ...@@ -936,7 +936,6 @@ chrome_java_resources = [
"java/res/layout/sharing_device_picker.xml", "java/res/layout/sharing_device_picker.xml",
"java/res/layout/sheet_tab_toolbar.xml", "java/res/layout/sheet_tab_toolbar.xml",
"java/res/layout/signin_activity.xml", "java/res/layout/signin_activity.xml",
"java/res/layout/signin_view.xml",
"java/res/layout/signout_wipe_storage_dialog.xml", "java/res/layout/signout_wipe_storage_dialog.xml",
"java/res/layout/start_top_toolbar.xml", "java/res/layout/start_top_toolbar.xml",
"java/res/layout/status_indicator_container.xml", "java/res/layout/status_indicator_container.xml",
......
...@@ -1257,7 +1257,6 @@ chrome_java_sources = [ ...@@ -1257,7 +1257,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/signin/SigninPromoController.java", "java/src/org/chromium/chrome/browser/signin/SigninPromoController.java",
"java/src/org/chromium/chrome/browser/signin/SigninPromoUtil.java", "java/src/org/chromium/chrome/browser/signin/SigninPromoUtil.java",
"java/src/org/chromium/chrome/browser/signin/SigninUtils.java", "java/src/org/chromium/chrome/browser/signin/SigninUtils.java",
"java/src/org/chromium/chrome/browser/signin/SigninView.java",
"java/src/org/chromium/chrome/browser/signin/SyncPromoView.java", "java/src/org/chromium/chrome/browser/signin/SyncPromoView.java",
"java/src/org/chromium/chrome/browser/signin/account_picker/AccountPickerBottomSheetCoordinator.java", "java/src/org/chromium/chrome/browser/signin/account_picker/AccountPickerBottomSheetCoordinator.java",
"java/src/org/chromium/chrome/browser/signin/account_picker/AccountPickerBottomSheetMediator.java", "java/src/org/chromium/chrome/browser/signin/account_picker/AccountPickerBottomSheetMediator.java",
......
...@@ -39,6 +39,7 @@ import org.chromium.chrome.browser.signin.services.IdentityServicesProvider; ...@@ -39,6 +39,7 @@ import org.chromium.chrome.browser.signin.services.IdentityServicesProvider;
import org.chromium.chrome.browser.signin.services.ProfileDataCache; import org.chromium.chrome.browser.signin.services.ProfileDataCache;
import org.chromium.chrome.browser.signin.ui.ConfirmSyncDataStateMachineDelegate; import org.chromium.chrome.browser.signin.ui.ConfirmSyncDataStateMachineDelegate;
import org.chromium.chrome.browser.signin.ui.ConsentTextTracker; import org.chromium.chrome.browser.signin.ui.ConsentTextTracker;
import org.chromium.chrome.browser.signin.ui.SigninView;
import org.chromium.chrome.browser.sync.SyncUserDataWiper; import org.chromium.chrome.browser.sync.SyncUserDataWiper;
import org.chromium.components.externalauth.UserRecoverableErrorHandler; import org.chromium.components.externalauth.UserRecoverableErrorHandler;
import org.chromium.components.signin.AccountManagerDelegateException; import org.chromium.components.signin.AccountManagerDelegateException;
......
...@@ -17,7 +17,10 @@ android_library("java") { ...@@ -17,7 +17,10 @@ android_library("java") {
"//components/signin/public/android:java", "//components/signin/public/android:java",
"//third_party/android_deps:androidx_annotation_annotation_java", "//third_party/android_deps:androidx_annotation_annotation_java",
"//third_party/android_deps:androidx_appcompat_appcompat_java", "//third_party/android_deps:androidx_appcompat_appcompat_java",
"//third_party/android_deps:androidx_appcompat_appcompat_resources_java",
"//third_party/android_deps:androidx_fragment_fragment_java", "//third_party/android_deps:androidx_fragment_fragment_java",
"//ui/android:ui_no_recycler_view_java",
"//ui/android:ui_utils_java",
] ]
sources = [ sources = [
"java/src/org/chromium/chrome/browser/signin/ui/ConfirmImportSyncDataDialog.java", "java/src/org/chromium/chrome/browser/signin/ui/ConfirmImportSyncDataDialog.java",
...@@ -27,6 +30,7 @@ android_library("java") { ...@@ -27,6 +30,7 @@ android_library("java") {
"java/src/org/chromium/chrome/browser/signin/ui/GoogleActivityController.java", "java/src/org/chromium/chrome/browser/signin/ui/GoogleActivityController.java",
"java/src/org/chromium/chrome/browser/signin/ui/SigninActivityLauncher.java", "java/src/org/chromium/chrome/browser/signin/ui/SigninActivityLauncher.java",
"java/src/org/chromium/chrome/browser/signin/ui/SigninScrollView.java", "java/src/org/chromium/chrome/browser/signin/ui/SigninScrollView.java",
"java/src/org/chromium/chrome/browser/signin/ui/SigninView.java",
] ]
resources_package = "org.chromium.chrome.browser.signin.ui" resources_package = "org.chromium.chrome.browser.signin.ui"
} }
...@@ -35,11 +39,13 @@ android_resources("java_resources") { ...@@ -35,11 +39,13 @@ android_resources("java_resources") {
sources = [ sources = [
"java/res/layout/confirm_import_sync_data.xml", "java/res/layout/confirm_import_sync_data.xml",
"java/res/layout/signin_progress_bar_dialog.xml", "java/res/layout/signin_progress_bar_dialog.xml",
"java/res/layout/signin_view.xml",
] ]
deps = [ deps = [
"//chrome/browser/ui/android/strings:ui_strings_grd", "//chrome/browser/ui/android/strings:ui_strings_grd",
"//components/browser_ui/strings/android:browser_ui_strings_grd", "//components/browser_ui/strings/android:browser_ui_strings_grd",
"//components/browser_ui/styles/android:java_resources", "//components/browser_ui/styles/android:java_resources",
"//components/browser_ui/widget/android:java_resources",
] ]
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!-- Copyright 2018 The Chromium Authors. All rights reserved. <!-- Copyright 2018 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. --> found in the LICENSE file. -->
<org.chromium.chrome.browser.signin.SigninView <org.chromium.chrome.browser.signin.ui.SigninView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
...@@ -180,4 +180,4 @@ ...@@ -180,4 +180,4 @@
android:layout_weight="1" android:layout_weight="1"
android:visibility="gone"/> android:visibility="gone"/>
</LinearLayout> </LinearLayout>
</org.chromium.chrome.browser.signin.SigninView> </org.chromium.chrome.browser.signin.ui.SigninView>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
package org.chromium.chrome.browser.signin; package org.chromium.chrome.browser.signin.ui;
import android.content.Context; import android.content.Context;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
...@@ -16,8 +16,6 @@ import android.widget.TextView; ...@@ -16,8 +16,6 @@ import android.widget.TextView;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources; import androidx.appcompat.content.res.AppCompatResources;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.signin.ui.SigninScrollView;
import org.chromium.ui.UiUtils; import org.chromium.ui.UiUtils;
import org.chromium.ui.drawable.AnimationLooper; import org.chromium.ui.drawable.AnimationLooper;
import org.chromium.ui.widget.ButtonCompat; import org.chromium.ui.widget.ButtonCompat;
...@@ -72,76 +70,130 @@ public class SigninView extends LinearLayout { ...@@ -72,76 +70,130 @@ public class SigninView extends LinearLayout {
mAnimationLooper = new AnimationLooper(mHeaderImage.getDrawable()); mAnimationLooper = new AnimationLooper(mHeaderImage.getDrawable());
} }
SigninScrollView getScrollView() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public SigninScrollView getScrollView() {
return mScrollView; return mScrollView;
} }
TextView getTitleView() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public TextView getTitleView() {
return mTitle; return mTitle;
} }
View getAccountPickerView() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public View getAccountPickerView() {
return mAccountPicker; return mAccountPicker;
} }
ImageView getAccountImageView() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public ImageView getAccountImageView() {
return mAccountImage; return mAccountImage;
} }
TextView getAccountTextPrimary() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public TextView getAccountTextPrimary() {
return mAccountTextPrimary; return mAccountTextPrimary;
} }
TextView getAccountTextSecondary() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public TextView getAccountTextSecondary() {
return mAccountTextSecondary; return mAccountTextSecondary;
} }
ImageView getAccountPickerEndImageView() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public ImageView getAccountPickerEndImageView() {
return mAccountPickerEndImage; return mAccountPickerEndImage;
} }
TextView getSyncTitleView() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public TextView getSyncTitleView() {
return mSyncTitle; return mSyncTitle;
} }
TextView getSyncDescriptionView() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public TextView getSyncDescriptionView() {
return mSyncDescription; return mSyncDescription;
} }
TextView getDetailsDescriptionView() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public TextView getDetailsDescriptionView() {
return mDetailsDescription; return mDetailsDescription;
} }
ButtonCompat getAcceptButton() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public ButtonCompat getAcceptButton() {
return mAcceptButton; return mAcceptButton;
} }
Button getRefuseButton() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public Button getRefuseButton() {
return mRefuseButton; return mRefuseButton;
} }
Button getMoreButton() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public Button getMoreButton() {
return mMoreButton; return mMoreButton;
} }
View getAcceptButtonEndPadding() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public View getAcceptButtonEndPadding() {
return mAcceptButtonEndPadding; return mAcceptButtonEndPadding;
} }
void startAnimations() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public void startAnimations() {
mAnimationLooper.start(); mAnimationLooper.start();
} }
void stopAnimations() { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public void stopAnimations() {
mAnimationLooper.stop(); mAnimationLooper.stop();
} }
static Drawable getExpandArrowDrawable(Context context) { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public static Drawable getExpandArrowDrawable(Context context) {
return UiUtils.getTintedDrawable(context, R.drawable.ic_expand_more_black_24dp, return UiUtils.getTintedDrawable(context, R.drawable.ic_expand_more_black_24dp,
R.color.default_icon_color_tint_list); R.color.default_icon_color_tint_list);
} }
static Drawable getCheckmarkDrawable(Context context) { /**
* TODO(crbug.com/1155123) Change the method to package private after modularization.
*/
public static Drawable getCheckmarkDrawable(Context context) {
return AppCompatResources.getDrawable(context, R.drawable.ic_check_googblue_24dp); return AppCompatResources.getDrawable(context, R.drawable.ic_check_googblue_24dp);
} }
} }
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