Chromium Code Reviews| Index: content/browser/web_contents/web_contents_android.cc |
| diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc |
| index 412213d1be94836d1502d3bf05a125b6f8dcee25..968be1ee4b1dad293606ab2c840fda8ec194ffa4 100644 |
| --- a/content/browser/web_contents/web_contents_android.cc |
| +++ b/content/browser/web_contents/web_contents_android.cc |
| @@ -40,6 +40,7 @@ |
| #include "net/android/network_library.h" |
| #include "ui/accessibility/ax_node_data.h" |
| #include "ui/android/overscroll_refresh_handler.h" |
| +#include "ui/android/window_android.h" |
| #include "ui/gfx/android/java_bitmap.h" |
| #include "ui/gfx/geometry/rect.h" |
| @@ -276,6 +277,15 @@ WebContentsAndroid::GetJavaObject() { |
| return base::android::ScopedJavaLocalRef<jobject>(obj_); |
| } |
| +base::android::ScopedJavaLocalRef<jobject> |
| +WebContentsAndroid::GetTopLevelNativeWindow(JNIEnv* env, |
| + const JavaParamRef<jobject>& obj) { |
| + ui::WindowAndroid* window_android = web_contents_->GetTopLevelNativeWindow(); |
| + if (!window_android) |
| + return ScopedJavaLocalRef<jobject>(); |
|
boliu
2017/02/02 03:34:00
nullptr should work
Ted C
2017/03/03 20:55:26
Done.
|
| + return window_android->GetJavaObject(); |
| +} |
| + |
| ScopedJavaLocalRef<jstring> WebContentsAndroid::GetTitle( |
| JNIEnv* env, |
| const JavaParamRef<jobject>& obj) const { |