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

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

Issue 2191743002: Setup the delegate in Chrome, so we may put chrome java functions we need in blimp to the delegate … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit issues. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java ('k') | no next file » | 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/blimp/ChromeBlimpClientContextDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/blimp/ChromeBlimpClientContextDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/blimp/ChromeBlimpClientContextDelegate.java
index d01e1fb108e1ea64b378bcff755e394692c44991..21a005710765507f2012be9d9786a235f3c293d2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/blimp/ChromeBlimpClientContextDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/blimp/ChromeBlimpClientContextDelegate.java
@@ -5,6 +5,7 @@
package org.chromium.chrome.browser.blimp;
import org.chromium.base.annotations.CalledByNative;
+import org.chromium.blimp_public.BlimpClientContextDelegate;
import org.chromium.chrome.browser.profiles.Profile;
/**
@@ -16,7 +17,7 @@ import org.chromium.chrome.browser.profiles.Profile;
* it, call {@link ChromeBlimpClientContextDelegate#createAndSetDelegateForContext(Profile)}.
* When the delegate should be deleted, a call to {@link #destroy} is required.
*/
-public class ChromeBlimpClientContextDelegate {
+public class ChromeBlimpClientContextDelegate implements BlimpClientContextDelegate {
/**
* Creates a new ChromeBlimpClientContextDelegate that is owned by the caller. It automatically
* attaches itself as the sole delegate for the BlimpClientContext attached to the given
@@ -38,7 +39,11 @@ public class ChromeBlimpClientContextDelegate {
private long mNativeChromeBlimpClientContextDelegateAndroid;
private ChromeBlimpClientContextDelegate(Profile profile) {
+ // Create native delegate object.
mNativeChromeBlimpClientContextDelegateAndroid = nativeInit(profile);
+
+ // Set ourselves as the Java delegate object.
+ BlimpClientContextFactory.getBlimpClientContextForProfile(profile).setDelegate(this);
}
@CalledByNative
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698