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

Unified Diff: content/shell/browser/shell_aura.cc

Issue 1391893003: NOT FOR REVIEW: Aura on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: content/shell/browser/shell_aura.cc
diff --git a/content/shell/browser/shell_aura.cc b/content/shell/browser/shell_aura.cc
index edc83efe36d24aab7a38c95e9c74694ce79d0176..1870440b3b3de48ad2eec5a022b861e85d42f1d8 100644
--- a/content/shell/browser/shell_aura.cc
+++ b/content/shell/browser/shell_aura.cc
@@ -11,8 +11,25 @@
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
+#if defined(OS_ANDROID)
+#include "jni/Shell_jni.h"
+#endif
+
namespace content {
+#if defined(OS_ANDROID)
+
+void CloseShell(JNIEnv* env, jclass clazz, jlong shellPtr) {
+ Shell* shell = reinterpret_cast<Shell*>(shellPtr);
+ shell->Close();
+}
+
+// static
+bool Shell::Register(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+#endif
+
// static
void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
CHECK(!platform_);
@@ -29,6 +46,13 @@ void Shell::PlatformExit() {
}
void Shell::PlatformCleanUp() {
+#if defined(OS_ANDROID)
+ JNIEnv* env = base::android::AttachCurrentThread();
+ if (java_object_.is_null())
+ return;
+
+ Java_Shell_onNativeDestroyed(env, java_object_.obj());
+#endif
}
void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {

Powered by Google App Engine
This is Rietveld 408576698