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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunPageDelegate.java

Issue 954933004: Upstream Account chooser fragment of First Run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update copyright dates Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunPageDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunPageDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunPageDelegate.java
new file mode 100644
index 0000000000000000000000000000000000000000..926ea11785523aee1692d4882380e3d3151c5dcc
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunPageDelegate.java
@@ -0,0 +1,98 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// 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.firstrun;
+
+import android.app.Fragment;
+
+/**
+ * Defines the host interface for First Run Experience pages.
+ */
+public interface FirstRunPageDelegate {
+ /**
+ * @return A {@link ProfileDataCache} for Android user accounts.
+ */
+ ProfileDataCache getProfileDataCache();
+
+ /**
+ * Advances the First Run Experience to the next page.
+ * Successfully finishes FRE if the current page is the last page.
+ */
+ void advanceToNextPage();
+
+ /**
+ * Skips all intro pages.
+ * Successfully finishes FRE if there are no non-intro pages.
+ */
+ void skipIntroPages();
+
+ /**
+ * Asks to re-instantiate the current page.
+ * Useful to restore the "clean" state of the UI elements.
+ */
+ void recreateCurrentPage();
+
+ /**
+ * Unsuccessfully aborts the First Run Experience.
+ * This usually means that the application will be closed.
+ */
+ void abortFirstRunExperience();
+
+ /**
+ * Successfully completes the First Run Experience.
+ * All results will be packaged and sent over to the main activity.
+ */
+ void completeFirstRunExperience();
+
+ /**
+ * Notifies that the sign-in dialog is shown.
+ */
+ void onSigninDialogShown();
+
+ /**
+ * Notifies that the user refused to sign in (e.g. "NO, THANKS").
+ */
+ void refuseSignIn();
+
+ /**
+ * Notifies that the user accepted to be signed in.
+ * @param accountName An account to be signed in to.
+ */
+ void acceptSignIn(String accountName);
+
+ /**
+ * Notifies that the user asked to show Sync Settings once the sign in
+ * process is complete.
+ */
+ void askToOpenSyncSettings();
+
+ /**
+ * @return Whether the user has accepted Chrome Terms of Service.
+ */
+ boolean didAcceptTermsOfService();
+
+ /**
+ * @return Whether the "upload crash dump" setting is set to "NEVER".
+ */
+ boolean isNeverUploadCrashDump();
+
+ /**
+ * Notifies all interested parties that the user has accepted Chrome Terms of Service.
+ * @param allowCrashUpload True if the user allows to upload crash dumps and collect stats.
+ */
+ void acceptTermsOfService(boolean allowCrashUpload);
+
+ /**
+ * Opens the Android account adder UI.
+ * @param fragment A fragment that needs the account adder UI.
+ */
+ void openAccountAdder(Fragment fragment);
+
+ /**
+ * Opens Chrome Preferences on a given page.
+ * @param fragment A fragment that requested the service.
+ * @param pageClassName The preferences fragment class name.
+ */
+ void openChromePreferencesPage(Fragment fragment, String pageClassName);
+}

Powered by Google App Engine
This is Rietveld 408576698