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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialog.java

Issue 1321463002: Cleanup comments and variable name in ShortcutHelper and AddToHomescreenDialogHelper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete comment Created 5 years, 4 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialogHelper.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialog.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialog.java
index 61f375f5d2d198f078e4e8362eefbd5048e92989..7d46b67c73e07a7bc5ad52479b9b09f14535cbdf 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialog.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialog.java
@@ -1,4 +1,4 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// 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.
@@ -20,8 +20,8 @@ import org.chromium.chrome.R;
import org.chromium.chrome.browser.tab.Tab;
/**
- * Helper class showing the UI regarding Add to Homescreen and delegate the
- * logic to ShortcutHelper.
+ * Helper class showing the UI regarding Add to Homescreen. This class delegates
+ * most of the logic to AddToHomescreenDialogHelper.
*/
public class AddToHomescreenDialog {
private static AlertDialog sCurrentDialog;
@@ -75,15 +75,15 @@ public class AddToHomescreenDialog {
}
});
- final AddToHomescreenDialogHelper shortcutHelper =
+ final AddToHomescreenDialogHelper dialogHelper =
new AddToHomescreenDialogHelper(activity.getApplicationContext(), currentTab);
- // Initializing the shortcut helper is asynchronous. Until it is
- // initialized, the UI will show a disabled text field and OK buttons.
- // They will be enabled and pre-filled as soon as the onInitialized
- // callback will be run. The user will still be able to cancel the
- // operation.
- shortcutHelper.initialize(new AddToHomescreenDialogHelper.Observer() {
+ // Initializing the AddToHomescreenDialogHelper is asynchronous. Until
+ // it is initialized, the UI will show a disabled text field and OK
+ // buttons. They will be enabled and pre-filled as soon as the
+ // onInitialized callback will be run. The user will still be able to
+ // cancel the operation.
+ dialogHelper.initialize(new AddToHomescreenDialogHelper.Observer() {
@Override
public void onUserTitleAvailable(String title) {
input.setEnabled(true);
@@ -124,17 +124,17 @@ public class AddToHomescreenDialog {
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
- shortcutHelper.addShortcut(input.getText().toString());
+ dialogHelper.addShortcut(input.getText().toString());
}
});
- // The "OK" button should only be shown when |shortcutHelper| is
+ // The "OK" button should only be shown when |dialogHelper| is
// initialized, it should be kept disabled until then.
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface d) {
dialog.getButton(DialogInterface.BUTTON_POSITIVE).setEnabled(
- shortcutHelper.isInitialized());
+ dialogHelper.isInitialized());
}
});
@@ -144,7 +144,7 @@ public class AddToHomescreenDialog {
@Override
public void onDismiss(DialogInterface dialog) {
sCurrentDialog = null;
- shortcutHelper.destroy();
+ dialogHelper.destroy();
}
});
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialogHelper.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698