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

Unified Diff: content/shell/android/shell_manager.cc

Issue 10701177: Make content shell on android support relaunching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and removed unnecessary content:: namespacing. Created 8 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
« no previous file with comments | « content/shell/android/java/src/org/chromium/content_shell/ShellManager.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/shell/android/java/src/org/chromium/content_shell/ShellManager.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698