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

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

Issue 1616073006: Remove cached Activity from TabWebContentsDelegate and ContextMenuPopulator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed findbugs Created 4 years, 11 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/tab/TabDelegateFactory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabDelegateFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabDelegateFactory.java
index da692ed80cdd081bbc57720fb5037b6ce1d9e408..3a1de89345a572b472cf3d869db1e2a9d340f339 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabDelegateFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabDelegateFactory.java
@@ -18,12 +18,10 @@ public class TabDelegateFactory {
/**
* Creates the {@link WebContentsDelegateAndroid} the tab will be initialized with.
* @param tab The associated {@link Tab}.
- * @param activity The {@link ChromeActivity} that the tab belongs to.
* @return The {@link WebContentsDelegateAndroid} to be used for this tab.
*/
- public TabWebContentsDelegateAndroid createWebContentsDelegate(
- Tab tab, ChromeActivity activity) {
- return new TabWebContentsDelegateAndroid(tab, activity);
+ public TabWebContentsDelegateAndroid createWebContentsDelegate(Tab tab) {
+ return new TabWebContentsDelegateAndroid(tab);
}
/**
@@ -40,12 +38,10 @@ public class TabDelegateFactory {
/**
* Creates the {@link ContextMenuPopulator} the tab will be initialized with.
* @param tab The associated {@link Tab}.
- * @param activity The {@link ChromeActivity} that the tab belongs to.
* @return The {@link ContextMenuPopulator} to be used for this tab.
*/
- public ContextMenuPopulator createContextMenuPopulator(Tab tab, ChromeActivity activity) {
- return new ChromeContextMenuPopulator(
- new TabContextMenuItemDelegate(tab, activity),
+ public ContextMenuPopulator createContextMenuPopulator(Tab tab) {
+ return new ChromeContextMenuPopulator(new TabContextMenuItemDelegate(tab),
ChromeContextMenuPopulator.NORMAL_MODE);
}

Powered by Google App Engine
This is Rietveld 408576698