Chromium Code Reviews| Index: content/shell/browser/shell_android.cc |
| diff --git a/content/shell/browser/shell_android.cc b/content/shell/browser/shell_android.cc |
| index b11ba37abaa1d3c7eba35fbc76ddf17159853ba2..9c8647760f9ef453657f9169e5c5c082bb36337e 100644 |
| --- a/content/shell/browser/shell_android.cc |
| +++ b/content/shell/browser/shell_android.cc |
| @@ -30,6 +30,10 @@ void Shell::PlatformExit() { |
| } |
| void Shell::PlatformCleanUp() { |
| + JNIEnv* env = AttachCurrentThread(); |
| + if (java_object_.is_null()) |
| + return; |
| + Java_Shell_onNativeDestroyed(env, java_object_.obj()); |
| } |
| void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { |
| @@ -83,8 +87,7 @@ bool Shell::PlatformIsFullscreenForTabOrPending( |
| } |
| void Shell::Close() { |
| - CloseShellView(java_object_.obj()); |
| - java_object_.Reset(); |
| + RemoveShellView(java_object_.obj()); |
| delete this; |
| } |
| @@ -93,4 +96,10 @@ bool Shell::Register(JNIEnv* env) { |
| return RegisterNativesImpl(env); |
| } |
| +// static |
| +void CloseShell(JNIEnv* env, jclass clazz, jlong nativeShell) { |
|
cjhopman
2014/01/09 02:12:44
This function should be generated by the jni gener
Ted C
2014/01/09 02:46:32
Oh Chris, how you got my hopes and dashed them so
|
| + Shell* shell = reinterpret_cast<Shell*>(nativeShell); |
| + shell->Close(); |
| +} |
| + |
| } // namespace content |