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

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

Issue 941633003: Remove unnessary usage of Tab.getNativePtr(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 10 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/browser/android/shortcut_helper.cc » ('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/ShortcutHelper.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
index f257d5c5e38a428aa1a83b991edbb7fd40adc497..0314aba60db98089fde86d4d970e402cbe757bb9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
@@ -18,6 +18,7 @@ import android.widget.Toast;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.CalledByNative;
import org.chromium.chrome.R;
+import org.chromium.content_public.browser.WebContents;
import org.chromium.content_public.common.ScreenOrientationConstants;
import java.io.ByteArrayOutputStream;
@@ -70,7 +71,7 @@ public class ShortcutHelper {
*/
public void initialize(OnInitialized callback) {
mCallback = callback;
- mNativeShortcutHelper = nativeInitialize(mTab.getNativePtr());
+ mNativeShortcutHelper = nativeInitialize(mTab.getWebContents());
}
/**
@@ -189,7 +190,7 @@ public class ShortcutHelper {
}
}
- private native long nativeInitialize(long tabAndroidPtr);
+ private native long nativeInitialize(WebContents webContents);
private native void nativeAddShortcut(long nativeShortcutHelper, String userRequestedTitle,
int launcherLargeIconSize);
private native void nativeTearDown(long nativeShortcutHelper);
« no previous file with comments | « no previous file | chrome/browser/android/shortcut_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698