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

Unified Diff: ui/aura/window_tree_host_platform.cc

Issue 1455793005: Adding a way to associate Android Activities with PlatformWindowAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@auraclank_upstream_native_widget
Patch Set: Getting rid of WindowTreeHostPlatformAndroid.java, just using a static method in PlatformWindowAndr… Created 5 years, 1 month 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: ui/aura/window_tree_host_platform.cc
diff --git a/ui/aura/window_tree_host_platform.cc b/ui/aura/window_tree_host_platform.cc
index 10c50132dadf2e9a3013e0b29da5dfae52d2eea8..c183a196dd1b86fdcb2d89e15c3bf9c8b8f74eca 100644
--- a/ui/aura/window_tree_host_platform.cc
+++ b/ui/aura/window_tree_host_platform.cc
@@ -11,6 +11,7 @@
#include "ui/gfx/screen.h"
#if defined(OS_ANDROID)
+#include "ui/aura/client/aura_constants.h"
#include "ui/platform_window/android/platform_window_android.h"
#endif
@@ -71,6 +72,16 @@ gfx::AcceleratedWidget WindowTreeHostPlatform::GetAcceleratedWidget() {
}
void WindowTreeHostPlatform::ShowImpl() {
+#if defined(OS_ANDROID)
+ JNIEnv* env = base::android::AttachCurrentThread();
+ jobject activity = window()->GetProperty(
+ aura::client::kActivityForRootWindow);
+ ui::PlatformWindowAndroid::createForActivity(
+ env,
+ activity,
+ reinterpret_cast<jlong>(window_.get()),
+ reinterpret_cast<jlong>(window_->GetPlatformImeController()));
sadrul 2015/11/25 20:59:44 Curious as to the signature of this function ... w
mfomitchev 2015/11/27 20:57:15 Done.
+#endif
sadrul 2015/11/25 20:59:44 We shouldn't do this for every call to ::ShowImpl(
mfomitchev 2015/11/27 20:57:15 Oops, yes, forgot to fix this, thanks. Done. I pla
window_->Show();
}

Powered by Google App Engine
This is Rietveld 408576698