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

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

Issue 1958953003: Remove unused AddGoogleAccountDialogFragment (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
« no previous file with comments | « no previous file | chrome/android/java_sources.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.signin;
6
7 import android.app.Dialog;
8 import android.app.DialogFragment;
9 import android.content.DialogInterface;
10 import android.os.Bundle;
11 import android.support.v7.app.AlertDialog;
12
13 import org.chromium.chrome.R;
14
15 /**
16 * Fragment that allows user to add their Google account.
17 */
18 public class AddGoogleAccountDialogFragment extends DialogFragment implements
19 DialogInterface.OnClickListener {
20
21 /**
22 * Listener for new account additions.
23 */
24 public interface AddGoogleAccountListener {
25 /**
26 * Called when the user chooses to add an account to their device.
27 */
28 public void onAddAccountClicked();
29 }
30
31 private AddGoogleAccountListener mListener;
32
33 @Override
34 public Dialog onCreateDialog(Bundle savedInstanceState) {
35 return new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme)
36 .setTitle(R.string.add_account_title)
37 .setPositiveButton(R.string.add_account_continue, this)
38 .setNegativeButton(R.string.cancel, null)
39 .setMessage(R.string.add_account_message)
40 .create();
41 }
42
43 @Override
44 public void onClick(DialogInterface dialog, int which) {
45 if (which == AlertDialog.BUTTON_POSITIVE) {
46 if (mListener != null) mListener.onAddAccountClicked();
47 }
48 }
49
50 /**
51 * @param listener Listener that should be notified when user chooses to add an account.
52 */
53 public void setListener(AddGoogleAccountListener listener) {
54 mListener = listener;
55 }
56 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java_sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698