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

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: Resovle merge conflicts. Created 4 years, 5 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: 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 774f9de33fb6d80426aacb270e34720ae894413e..b5ea8b74e4b299c16bfec821aa687dcdfdb397f4 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,15 @@ import org.chromium.blimp_public.contents.BlimpContents;
*/
@JNINamespace("blimp::client")
public class BlimpClientContextImpl implements BlimpClientContext {
+
+ /**
+ * Get embedder delegate, so we can access chrome functionalities.
nyquist 2016/07/28 19:15:34 "Get embedder delegate which provides necessary fu
xingliu 2016/07/28 22:43:09 Done.
+ * @return BlimpClientContextDelegate, which contains functions we need in chrome.
+ */
+ public BlimpClientContextDelegate getClientContextDelegate() {
nyquist 2016/07/28 19:15:34 Just getDelegate() to match the C++ BlimpClientCon
xingliu 2016/07/28 22:43:09 Done.
+ return nativeGetClientContextDelegate(mNativeBlimpClientContextImplAndroid);
+ }
+
@CalledByNative
private static BlimpClientContextImpl create(long nativeBlimpClientContextImplAndroid) {
return new BlimpClientContextImpl(nativeBlimpClientContextImplAndroid);
@@ -64,4 +74,7 @@ public class BlimpClientContextImpl implements BlimpClientContext {
private native BlimpContents nativeCreateBlimpContents(
long nativeBlimpClientContextImplAndroid);
+
+ private native BlimpClientContextDelegate nativeGetClientContextDelegate(
+ long nativeBlimpClientContextImplAndroid);
}

Powered by Google App Engine
This is Rietveld 408576698