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

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

Issue 2088443003: Shortcut ctrl+shift+T added on android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add incognito check in native code, based on code review feedback. Created 4 years, 6 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
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentlyClosedBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentlyClosedBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentlyClosedBridge.java
index ed7b53de4c081a1bf474fbfe8f9383d6b641cec9..509973367d4bfc1b070f7064ddd247f6d585e57c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentlyClosedBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentlyClosedBridge.java
@@ -14,7 +14,7 @@ import java.util.List;
/**
* This class allows Java code to get and clear the list of recently closed tabs.
*/
-class RecentlyClosedBridge {
+public class RecentlyClosedBridge {
private long mNativeRecentlyClosedTabsBridge;
/**
@@ -46,6 +46,10 @@ class RecentlyClosedBridge {
}
}
+ public void openRecentClosedTab() {
Theresa 2016/06/29 23:53:29 nit: openRecentlyClosedTab() This also needs a Ja
xingliu 2016/06/30 05:43:55 Done.
+ nativeOpenMostRecentlyClosedTab(mNativeRecentlyClosedTabsBridge);
+ }
+
@CalledByNative
private static void pushTab(
List<RecentlyClosedTab> tabs, int id, String title, String url) {
@@ -57,14 +61,14 @@ class RecentlyClosedBridge {
* Initializes this class with the given profile.
* @param profile The Profile whose recently closed tabs will be queried.
*/
- RecentlyClosedBridge(Profile profile) {
+ public RecentlyClosedBridge(Profile profile) {
mNativeRecentlyClosedTabsBridge = nativeInit(profile);
}
/**
* Cleans up the C++ side of this class. This instance must not be used after calling destroy().
*/
- void destroy() {
+ public void destroy() {
assert mNativeRecentlyClosedTabsBridge != 0;
nativeDestroy(mNativeRecentlyClosedTabsBridge);
mNativeRecentlyClosedTabsBridge = 0;
@@ -120,5 +124,6 @@ class RecentlyClosedBridge {
long nativeRecentlyClosedTabsBridge, List<RecentlyClosedTab> tabs, int maxTabCount);
private native boolean nativeOpenRecentlyClosedTab(long nativeRecentlyClosedTabsBridge,
Tab tab, int recentTabId, int windowOpenDisposition);
+ private native boolean nativeOpenMostRecentlyClosedTab(long nativeRecentlyClosedTabsBridge);
private native void nativeClearRecentlyClosedTabs(long nativeRecentlyClosedTabsBridge);
}

Powered by Google App Engine
This is Rietveld 408576698