Index: content/shell/android/shell_manager.cc |
diff --git a/content/shell/android/shell_manager.cc b/content/shell/android/shell_manager.cc |
index 127e25a3d97ad546d8eb15d24c4145aff2046db1..5972409ed639f2463ced406399487a43f0d99606 100644 |
--- a/content/shell/android/shell_manager.cc |
+++ b/content/shell/android/shell_manager.cc |
@@ -5,8 +5,13 @@ |
#include "content/shell/android/shell_manager.h" |
#include "base/android/jni_android.h" |
+#include "base/android/jni_string.h" |
#include "base/android/scoped_java_ref.h" |
#include "base/lazy_instance.h" |
+#include "content/shell/shell.h" |
+#include "content/shell/shell_browser_context.h" |
+#include "content/shell/shell_content_browser_client.h" |
+#include "googleurl/src/gurl.h" |
#include "jni/ShellManager_jni.h" |
using base::android::ScopedJavaLocalRef; |
@@ -32,4 +37,16 @@ static void Init(JNIEnv* env, jclass clazz, jobject obj) { |
base::android::ScopedJavaLocalRef<jobject>(env, obj)); |
} |
+void LaunchShell(JNIEnv* env, jclass clazz, jstring jurl) { |
+ ShellBrowserContext* browserContext = |
+ static_cast<ShellContentBrowserClient*>( |
+ GetContentClient()->browser())->browser_context(); |
+ GURL url(base::android::ConvertJavaStringToUTF8(env, jurl)); |
+ Shell::CreateNewWindow(browserContext, |
+ url, |
+ NULL, |
+ MSG_ROUTING_NONE, |
+ NULL); |
+} |
+ |
} // namespace content |