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

Unified Diff: blimp/client/core/android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.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 | « no previous file | blimp/client/core/android/java/src/org/chromium/blimp/core/DummyBlimpClientContext.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.java
diff --git a/blimp/client/core/android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.java b/blimp/client/core/android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.java
index 080da76bfc69a2e9d2ff771d9642a81a009264dd..a71d95bedd80c8c50d0b44b3c94228c647332e5d 100644
--- a/blimp/client/core/android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.java
+++ b/blimp/client/core/android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.java
@@ -10,6 +10,7 @@ import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.blimp.core.settings.AboutBlimpPreferences;
import org.chromium.blimp_public.BlimpClientContext;
+import org.chromium.blimp_public.BlimpClientContextDelegate;
import org.chromium.blimp_public.BlimpSettingsCallbacks;
import org.chromium.blimp_public.contents.BlimpContents;
@@ -19,6 +20,26 @@ import org.chromium.blimp_public.contents.BlimpContents;
*/
@JNINamespace("blimp::client")
public class BlimpClientContextImpl implements BlimpClientContext {
+
+ // Delegate that contains functions Blimp needed in the embedder.
+ private BlimpClientContextDelegate mDelegate;
+
+ /**
+ * Get embedder delegate which provides necessary functionality and callbacks.
+ *
+ * The delegate is created through JNI in early startup.
+ *
+ * @return BlimpClientContextDelegate, which contains functions we need in embedder.
+ */
+ public BlimpClientContextDelegate getDelegate() {
+ return mDelegate;
+ }
+
+ @Override
+ public void setDelegate(BlimpClientContextDelegate delegate) {
+ mDelegate = delegate;
+ }
+
@CalledByNative
private static BlimpClientContextImpl create(long nativeBlimpClientContextImplAndroid) {
return new BlimpClientContextImpl(nativeBlimpClientContextImplAndroid);
« no previous file with comments | « no previous file | blimp/client/core/android/java/src/org/chromium/blimp/core/DummyBlimpClientContext.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698