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

Side by Side Diff: remoting/android/java/src/org/chromium/chromoting/accountswitcher/AccountSwitcher.java

Issue 1369903002: Android Chromoting: Add hooks for the official account-switcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add hooks for Google Play Services connection errors. Created 5 years, 2 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.chromoting.accountswitcher; 5 package org.chromium.chromoting.accountswitcher;
6 6
7 import android.content.Intent;
7 import android.view.View; 8 import android.view.View;
8 9
9 /** Common interface for account-switcher implementations. */ 10 /** Common interface for account-switcher implementations. */
10 public interface AccountSwitcher { 11 public interface AccountSwitcher {
11 /** Interface for receiving notifications from the account-switcher. */ 12 /** Interface for receiving notifications from the account-switcher. */
12 public interface Callback { 13 public interface Callback {
13 /** 14 /**
14 * Called when the user has selected an account, or after the initial lo ading of the 15 * Called when the user has selected an account, or after the initial lo ading of the
15 * device's accounts list, to notify the app that a current valid accoun t is selected. 16 * device's accounts list, to notify the app that a current valid accoun t is selected.
16 * @param accountName The e-mail identifier of the selected account. 17 * @param accountName The e-mail identifier of the selected account.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 * accounts. 66 * accounts.
66 */ 67 */
67 String[] getRecentAccounts(); 68 String[] getRecentAccounts();
68 69
69 /** 70 /**
70 * Reloads the list of accounts on the device. Called from the activity's on Start() method 71 * Reloads the list of accounts on the device. Called from the activity's on Start() method
71 * (or whenever the device's accounts-list might have changed). This will no tify the callback 72 * (or whenever the device's accounts-list might have changed). This will no tify the callback
72 * that a valid account is selected, or that the list is empty. 73 * that a valid account is selected, or that the list is empty.
73 */ 74 */
74 void reloadAccounts(); 75 void reloadAccounts();
76
77 /**
78 * This should be called from the controlling activity's onActivityResult() method. It allows
79 * the account-switcher implementation to launch a child Activity and handle the result.
80 */
81 void onActivityResult(int requestCode, int resultCode, Intent data);
82
83 /**
84 * Releases any resources used by the account-switcher. Should be called by the activity's
85 * onDestroy() method.
86 */
87 void destroy();
75 } 88 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698