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

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

Issue 2235533002: Revert "Changed NavigationController access to through tab in Java code" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
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.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Dialog; 8 import android.app.Dialog;
9 import android.app.DialogFragment; 9 import android.app.DialogFragment;
10 import android.content.DialogInterface; 10 import android.content.DialogInterface;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme) 67 new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme)
68 .setMessage(R.string.http_post_warning); 68 .setMessage(R.string.http_post_warning);
69 69
70 if (savedInstanceState == null) { 70 if (savedInstanceState == null) {
71 assert mTab != null; 71 assert mTab != null;
72 builder.setNegativeButton(R.string.cancel, 72 builder.setNegativeButton(R.string.cancel,
73 new DialogInterface.OnClickListener() { 73 new DialogInterface.OnClickListener() {
74 @Override 74 @Override
75 public void onClick(DialogInterface dialog, int id) { 75 public void onClick(DialogInterface dialog, int id) {
76 if (!mTab.isInitialized()) return; 76 if (!mTab.isInitialized()) return;
77 mTab.getNavigationHandler().cancelPendingReload(); 77 mTab.getWebContents().getNavigationController().canc elPendingReload();
78 } 78 }
79 }); 79 });
80 builder.setPositiveButton(R.string.http_post_warning_resend, 80 builder.setPositiveButton(R.string.http_post_warning_resend,
81 new DialogInterface.OnClickListener() { 81 new DialogInterface.OnClickListener() {
82 @Override 82 @Override
83 public void onClick(DialogInterface dialog, int id) { 83 public void onClick(DialogInterface dialog, int id) {
84 if (!mTab.isInitialized()) return; 84 if (!mTab.isInitialized()) return;
85 mTab.getNavigationHandler().continuePendingReload(); 85 mTab.getWebContents().getNavigationController().cont inuePendingReload();
86 } 86 }
87 }); 87 });
88 } 88 }
89 89
90 Dialog dialog = builder.create(); 90 Dialog dialog = builder.create();
91 setCurrentDialogForTesting(dialog); 91 setCurrentDialogForTesting(dialog);
92 92
93 return dialog; 93 return dialog;
94 } 94 }
95 95
(...skipping 22 matching lines...) Expand all
118 } 118 }
119 119
120 /** 120 /**
121 * @return dialog currently being displayed. 121 * @return dialog currently being displayed.
122 */ 122 */
123 @VisibleForTesting 123 @VisibleForTesting
124 public static Dialog getCurrentDialogForTesting() { 124 public static Dialog getCurrentDialogForTesting() {
125 return sCurrentDialog; 125 return sCurrentDialog;
126 } 126 }
127 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698