Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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; | 5 package org.chromium.chromoting; |
| 6 | 6 |
| 7 import android.accounts.Account; | 7 import android.accounts.Account; |
| 8 import android.accounts.AccountManager; | 8 import android.accounts.AccountManager; |
| 9 import android.accounts.AccountManagerCallback; | 9 import android.accounts.AccountManagerCallback; |
| 10 import android.accounts.AccountManagerFuture; | 10 import android.accounts.AccountManagerFuture; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 276 } | 276 } |
| 277 | 277 |
| 278 /** Called when the user touches hyperlinked text. */ | 278 /** Called when the user touches hyperlinked text. */ |
| 279 @Override | 279 @Override |
| 280 public void onClick(View view) { | 280 public void onClick(View view) { |
| 281 HelpActivity.launch(this, HOST_SETUP_URL); | 281 HelpActivity.launch(this, HOST_SETUP_URL); |
| 282 } | 282 } |
| 283 | 283 |
| 284 /** Called when the user taps on a host entry. */ | 284 /** Called when the user taps on a host entry. */ |
| 285 public void connectToHost(HostInfo host) { | 285 public void connectToHost(HostInfo host) { |
| 286 mProgressIndicator = ProgressDialog.show(this, | 286 mProgressIndicator = ProgressDialog.show(this, host.name, |
| 287 host.name, getString(R.string.footer_connecting), true, true, | 287 getString(R.string.footer_connecting), true, true, |
| 288 new DialogInterface.OnCancelListener() { | 288 new DialogInterface.OnCancelListener() { |
| 289 @Override | 289 @Override |
|
Lambros
2014/10/15 22:10:19
@Override still not fixed :) Also, shouldn't "new
whywhat
2014/10/15 23:12:38
I'd even say putting each argument of show() on it
aurimas (slooooooooow)
2014/10/15 23:29:48
Done.
| |
| 290 public void onCancel(DialogInterface dialog) { | 290 public void onCancel(DialogInterface dialog) { |
| 291 JniInterface.disconnectFromHost(); | 291 JniInterface.disconnectFromHost(); |
| 292 mTokenFetcher = null; | 292 mTokenFetcher = null; |
| 293 } | 293 } |
| 294 }); | 294 }); |
| 295 SessionConnector connector = new SessionConnector(this, this, mHostListL oader); | 295 SessionConnector connector = new SessionConnector(this, this, mHostListL oader); |
| 296 assert mTokenFetcher == null; | 296 assert mTokenFetcher == null; |
| 297 mTokenFetcher = createTokenFetcher(host); | 297 mTokenFetcher = createTokenFetcher(host); |
| 298 connector.connectToHost(mAccount.name, mToken, host); | 298 connector.connectToHost(mAccount.name, mToken, host); |
| 299 } | 299 } |
| 300 | 300 |
| 301 private void refreshHostList() { | 301 private void refreshHostList() { |
| 302 if (mWaitingForAuthToken) { | 302 if (mWaitingForAuthToken) { |
| 303 return; | 303 return; |
| 304 } | 304 } |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 } | 491 } |
| 492 }; | 492 }; |
| 493 return new ThirdPartyTokenFetcher(this, host.getTokenUrlPatterns(), call back); | 493 return new ThirdPartyTokenFetcher(this, host.getTokenUrlPatterns(), call back); |
| 494 } | 494 } |
| 495 | 495 |
| 496 public void fetchThirdPartyToken(String tokenUrl, String clientId, String sc ope) { | 496 public void fetchThirdPartyToken(String tokenUrl, String clientId, String sc ope) { |
| 497 assert mTokenFetcher != null; | 497 assert mTokenFetcher != null; |
| 498 mTokenFetcher.fetchToken(tokenUrl, clientId, scope); | 498 mTokenFetcher.fetchToken(tokenUrl, clientId, scope); |
| 499 } | 499 } |
| 500 } | 500 } |
| OLD | NEW |