Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/signin/AccountSigninView.java

Issue 1958233002: Reland of Update NTP to new material design spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.signin; 5 package org.chromium.chrome.browser.signin;
6 6
7 import android.app.FragmentManager; 7 import android.app.FragmentManager;
8 import android.content.Context; 8 import android.content.Context;
9 import android.graphics.Bitmap; 9 import android.graphics.Bitmap;
10 import android.text.TextUtils; 10 import android.text.TextUtils;
11 import android.text.method.LinkMovementMethod; 11 import android.text.method.LinkMovementMethod;
12 import android.util.AttributeSet; 12 import android.util.AttributeSet;
13 import android.view.View; 13 import android.view.View;
14 import android.widget.Button; 14 import android.widget.Button;
15 import android.widget.FrameLayout; 15 import android.widget.FrameLayout;
16 import android.widget.ImageView; 16 import android.widget.ImageView;
17 import android.widget.TextView; 17 import android.widget.TextView;
18 18
19 import org.chromium.base.ApiCompatibilityUtils; 19 import org.chromium.base.ApiCompatibilityUtils;
20 import org.chromium.base.metrics.RecordUserAction; 20 import org.chromium.base.metrics.RecordUserAction;
21 import org.chromium.chrome.R; 21 import org.chromium.chrome.R;
22 import org.chromium.chrome.browser.firstrun.ProfileDataCache; 22 import org.chromium.chrome.browser.firstrun.ProfileDataCache;
23 import org.chromium.chrome.browser.ntp.NtpColorUtils;
23 import org.chromium.chrome.browser.preferences.PrefServiceBridge; 24 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
24 import org.chromium.chrome.browser.profiles.ProfileDownloader; 25 import org.chromium.chrome.browser.profiles.ProfileDownloader;
25 import org.chromium.chrome.browser.signin.AccountTrackerService.OnSystemAccounts SeededListener; 26 import org.chromium.chrome.browser.signin.AccountTrackerService.OnSystemAccounts SeededListener;
26 import org.chromium.chrome.browser.sync.SyncUserDataWiper; 27 import org.chromium.chrome.browser.sync.SyncUserDataWiper;
27 import org.chromium.chrome.browser.sync.ui.ConfirmImportSyncDataDialog; 28 import org.chromium.chrome.browser.sync.ui.ConfirmImportSyncDataDialog;
28 import org.chromium.chrome.browser.sync.ui.ConfirmImportSyncDataDialog.ImportSyn cType; 29 import org.chromium.chrome.browser.sync.ui.ConfirmImportSyncDataDialog.ImportSyn cType;
29 import org.chromium.signin.InvestigatedScenario; 30 import org.chromium.signin.InvestigatedScenario;
30 import org.chromium.sync.signin.AccountManagerHelper; 31 import org.chromium.sync.signin.AccountManagerHelper;
31 import org.chromium.ui.text.NoUnderlineClickableSpan; 32 import org.chromium.ui.text.NoUnderlineClickableSpan;
32 import org.chromium.ui.text.SpanApplier; 33 import org.chromium.ui.text.SpanApplier;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 187 }
187 } 188 }
188 } 189 }
189 190
190 /** 191 /**
191 * Changes the visuals slightly for when this view appears in the recent tab s page instead of 192 * Changes the visuals slightly for when this view appears in the recent tab s page instead of
192 * in first run. 193 * in first run.
193 * This is currently used in the Recent Tabs Promo and the bookmarks page. 194 * This is currently used in the Recent Tabs Promo and the bookmarks page.
194 */ 195 */
195 public void configureForRecentTabsOrBookmarksPage() { 196 public void configureForRecentTabsOrBookmarksPage() {
196 setBackgroundResource(R.color.ntp_bg); 197 setBackgroundColor(NtpColorUtils.getBackgroundColorResource(getResources ()));
197 mCancelButtonTextId = R.string.cancel; 198 mCancelButtonTextId = R.string.cancel;
198 setUpCancelButton(); 199 setUpCancelButton();
199 } 200 }
200 201
201 /** 202 /**
202 * Enable or disable UI elements so the user can't select an account, cancel , etc. 203 * Enable or disable UI elements so the user can't select an account, cancel , etc.
203 * 204 *
204 * @param enabled The state to change to. 205 * @param enabled The state to change to.
205 */ 206 */
206 public void setButtonsEnabled(boolean enabled) { 207 public void setButtonsEnabled(boolean enabled) {
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 mPositiveButton.setTextColor( 529 mPositiveButton.setTextColor(
529 ApiCompatibilityUtils.getColor(getResources(), R.color.fre_text_ color)); 530 ApiCompatibilityUtils.getColor(getResources(), R.color.fre_text_ color));
530 mPositiveButton.setAlpha(0.26f); 531 mPositiveButton.setAlpha(0.26f);
531 mPositiveButton.setEnabled(false); 532 mPositiveButton.setEnabled(false);
532 } 533 }
533 534
534 private String getSelectedAccountName() { 535 private String getSelectedAccountName() {
535 return mAccountNames.get(mSigninChooseView.getSelectedAccountPosition()) ; 536 return mAccountNames.get(mSigninChooseView.getSelectedAccountPosition()) ;
536 } 537 }
537 } 538 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ntp/interests/InterestsPage.java ('k') | chrome/android/java_sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698