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

Unified Diff: blimp/client/core/android/blimp_contents_factory.cc

Issue 2059443002: Java versions of BlimpContents[,Observer] and BlimpNavigationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome-with-blimp
Patch Set: git merge origin/master - track master 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: blimp/client/core/android/blimp_contents_factory.cc
diff --git a/blimp/client/core/android/blimp_contents_factory.cc b/blimp/client/core/android/blimp_contents_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..25c4c9c1c8c8bf109cba2839adb161e6a12bed35
--- /dev/null
+++ b/blimp/client/core/android/blimp_contents_factory.cc
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "blimp/client/core/android/blimp_contents_factory.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/scoped_java_ref.h"
+#include "blimp/client/core/android/blimp_contents_impl_android.h"
+#include "blimp/client/core/blimp_contents_impl.h"
+#include "jni/BlimpContentsFactory_jni.h"
+
+namespace blimp {
+namespace client {
+
+static base::android::ScopedJavaLocalRef<jobject> CreateBlimpContents(
+ JNIEnv* env,
+ const JavaParamRef<jclass>& clazz) {
+ // To delete |blimp_contents_impl|, the Java caller must call the
+ // destroy() method on BlimpContents.
+ BlimpContentsImpl* blimp_contents_impl = new BlimpContentsImpl;
+ return blimp_contents_impl->GetJavaBlimpContentsImpl();
+}
+
+bool RegisterBlimpContentsFactoryJni(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+} // namespace client
+} // namespace blimp
« no previous file with comments | « blimp/client/core/android/blimp_contents_factory.h ('k') | blimp/client/core/android/blimp_contents_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698