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

Side by Side Diff: content/shell/android/shell_manager.cc

Issue 147533004: Remove unneeded JNI registrations. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Fix android webview build issues. Created 6 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/android/shell_manager.h" 5 #include "content/shell/android/shell_manager.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 jobject j_shell_manager = g_global_state.Get().j_shell_manager.obj(); 45 jobject j_shell_manager = g_global_state.Get().j_shell_manager.obj();
46 Java_ShellManager_removeShell(env, j_shell_manager, shell_view); 46 Java_ShellManager_removeShell(env, j_shell_manager, shell_view);
47 } 47 }
48 48
49 // Register native methods 49 // Register native methods
50 bool RegisterShellManager(JNIEnv* env) { 50 bool RegisterShellManager(JNIEnv* env) {
51 return RegisterNativesImpl(env); 51 return RegisterNativesImpl(env);
52 } 52 }
53 53
54 static void Init(JNIEnv* env, jclass clazz, jobject obj) { 54 static void Init(JNIEnv* env, jclass clazz, jobject obj) {
55 LOG(ERROR) << "SLSLSLSL: Init()";
55 g_global_state.Get().j_shell_manager.Reset( 56 g_global_state.Get().j_shell_manager.Reset(
56 base::android::ScopedJavaLocalRef<jobject>(env, obj)); 57 base::android::ScopedJavaLocalRef<jobject>(env, obj));
57 } 58 }
58 59
59 void LaunchShell(JNIEnv* env, jclass clazz, jstring jurl) { 60 void LaunchShell(JNIEnv* env, jclass clazz, jstring jurl) {
60 ShellBrowserContext* browserContext = 61 ShellBrowserContext* browserContext =
61 ShellContentBrowserClient::Get()->browser_context(); 62 ShellContentBrowserClient::Get()->browser_context();
62 GURL url(base::android::ConvertJavaStringToUTF8(env, jurl)); 63 GURL url(base::android::ConvertJavaStringToUTF8(env, jurl));
63 Shell::CreateNewWindow(browserContext, 64 Shell::CreateNewWindow(browserContext,
64 url, 65 url,
65 NULL, 66 NULL,
66 MSG_ROUTING_NONE, 67 MSG_ROUTING_NONE,
67 gfx::Size()); 68 gfx::Size());
68 } 69 }
69 70
70 } // namespace content 71 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698