| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.content.Context; | 7 import android.content.Context; |
| 8 import android.content.Intent; | 8 import android.content.Intent; |
| 9 import android.provider.Settings; | 9 import android.provider.Settings; |
| 10 import android.util.AttributeSet; | 10 import android.util.AttributeSet; |
| 11 import android.view.LayoutInflater; | 11 import android.view.LayoutInflater; |
| 12 import android.view.View; | 12 import android.view.View; |
| 13 import android.view.ViewGroup; | 13 import android.view.ViewGroup; |
| 14 import android.widget.Button; | 14 import android.widget.Button; |
| 15 import android.widget.LinearLayout; | 15 import android.widget.LinearLayout; |
| 16 import android.widget.TextView; | 16 import android.widget.TextView; |
| 17 | 17 |
| 18 import org.chromium.chrome.R; | 18 import org.chromium.chrome.R; |
| 19 import org.chromium.chrome.browser.preferences.PreferencesLauncher; | 19 import org.chromium.chrome.browser.preferences.PreferencesLauncher; |
| 20 import org.chromium.chrome.browser.signin.AccountSigninActivity.AccessPoint; | 20 import org.chromium.chrome.browser.signin.AccountSigninActivity.AccessPoint; |
| 21 import org.chromium.chrome.browser.signin.SigninManager.SignInStateObserver; | 21 import org.chromium.chrome.browser.signin.SigninManager.SignInStateObserver; |
| 22 import org.chromium.chrome.browser.sync.ui.SyncCustomizationFragment; | 22 import org.chromium.chrome.browser.sync.ui.SyncCustomizationFragment; |
| 23 import org.chromium.components.signin.ChromeSigninController; |
| 23 import org.chromium.components.sync.AndroidSyncSettings; | 24 import org.chromium.components.sync.AndroidSyncSettings; |
| 24 import org.chromium.components.sync.AndroidSyncSettings.AndroidSyncSettingsObser
ver; | 25 import org.chromium.components.sync.AndroidSyncSettings.AndroidSyncSettingsObser
ver; |
| 25 import org.chromium.components.sync.signin.ChromeSigninController; | |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * A View that shows the user the next step they must complete to start syncing
their data (eg. | 28 * A View that shows the user the next step they must complete to start syncing
their data (eg. |
| 29 * Recent Tabs or Bookmarks). For example, if the user is not signed in, the Vie
w will prompt them | 29 * Recent Tabs or Bookmarks). For example, if the user is not signed in, the Vie
w will prompt them |
| 30 * to do so and link to the AccountSigninActivity. | 30 * to do so and link to the AccountSigninActivity. |
| 31 * If inflated manually, {@link SigninAndSyncView#init()} must be called before
attaching this View | 31 * If inflated manually, {@link SigninAndSyncView#init()} must be called before
attaching this View |
| 32 * to a ViewGroup. | 32 * to a ViewGroup. |
| 33 */ | 33 */ |
| 34 public class SigninAndSyncView extends LinearLayout | 34 public class SigninAndSyncView extends LinearLayout |
| 35 implements AndroidSyncSettingsObserver, SignInStateObserver { | 35 implements AndroidSyncSettingsObserver, SignInStateObserver { |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 public void onSignedOut() { | 286 public void onSignedOut() { |
| 287 update(); | 287 update(); |
| 288 } | 288 } |
| 289 | 289 |
| 290 // AndroidSyncStateObserver | 290 // AndroidSyncStateObserver |
| 291 @Override | 291 @Override |
| 292 public void androidSyncSettingsChanged() { | 292 public void androidSyncSettingsChanged() { |
| 293 update(); | 293 update(); |
| 294 } | 294 } |
| 295 } | 295 } |
| OLD | NEW |