| OLD | NEW |
| 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.chrome.browser; | 5 package org.chromium.chrome.browser; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.app.Dialog; | 8 import android.app.Dialog; |
| 9 import android.content.Context; | 9 import android.content.Context; |
| 10 import android.content.DialogInterface; | 10 import android.content.DialogInterface; |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 public void setIdleState() { | 390 public void setIdleState() { |
| 391 mProgressBar.setVisibility(View.GONE); | 391 mProgressBar.setVisibility(View.GONE); |
| 392 setState(State.DISCOVERY_IDLE); | 392 setState(State.DISCOVERY_IDLE); |
| 393 } | 393 } |
| 394 | 394 |
| 395 /** | 395 /** |
| 396 * Sets whether the item is enabled. | 396 * Sets whether the item is enabled. |
| 397 * @param id The id of the item to affect. | 397 * @param id The id of the item to affect. |
| 398 * @param enabled Whether the item should be enabled or not. | 398 * @param enabled Whether the item should be enabled or not. |
| 399 */ | 399 */ |
| 400 @VisibleForTesting |
| 400 public void setEnabled(String id, boolean enabled) { | 401 public void setEnabled(String id, boolean enabled) { |
| 401 mItemAdapter.setEnabled(id, enabled); | 402 mItemAdapter.setEnabled(id, enabled); |
| 402 } | 403 } |
| 403 | 404 |
| 404 /** | 405 /** |
| 405 * Clear all items from the dialog. | 406 * Clear all items from the dialog. |
| 406 */ | 407 */ |
| 407 public void clear() { | 408 public void clear() { |
| 408 mItemAdapter.clear(); | 409 mItemAdapter.clear(); |
| 409 setState(State.STARTING); | 410 setState(State.STARTING); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 } | 448 } |
| 448 | 449 |
| 449 /** | 450 /** |
| 450 * Returns the ItemAdapter associated with this class. For use with tests on
ly. | 451 * Returns the ItemAdapter associated with this class. For use with tests on
ly. |
| 451 */ | 452 */ |
| 452 @VisibleForTesting | 453 @VisibleForTesting |
| 453 public ItemAdapter getItemAdapterForTesting() { | 454 public ItemAdapter getItemAdapterForTesting() { |
| 454 return mItemAdapter; | 455 return mItemAdapter; |
| 455 } | 456 } |
| 456 } | 457 } |
| OLD | NEW |