OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser/android/content_view_core_impl.h" | 5 #include "content/browser/android/content_view_core_impl.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
334 SetFocusInternal(HasFocus()); | 334 SetFocusInternal(HasFocus()); |
335 SetAccessibilityEnabledInternal(accessibility_enabled_); | 335 SetAccessibilityEnabledInternal(accessibility_enabled_); |
336 } | 336 } |
337 | 337 |
338 RenderWidgetHostViewAndroid* | 338 RenderWidgetHostViewAndroid* |
339 ContentViewCoreImpl::GetRenderWidgetHostViewAndroid() const { | 339 ContentViewCoreImpl::GetRenderWidgetHostViewAndroid() const { |
340 RenderWidgetHostView* rwhv = NULL; | 340 RenderWidgetHostView* rwhv = NULL; |
341 if (web_contents_) { | 341 if (web_contents_) { |
342 rwhv = web_contents_->GetRenderWidgetHostView(); | 342 rwhv = web_contents_->GetRenderWidgetHostView(); |
343 if (web_contents_->ShowingInterstitialPage()) { | 343 if (web_contents_->ShowingInterstitialPage()) { |
344 rwhv = static_cast<InterstitialPageImpl*>( | 344 rwhv = |
345 web_contents_->GetInterstitialPage())-> | 345 web_contents_->GetInterstitialPage()->GetRenderViewHost()->GetView(); |
Charlie Reis
2015/01/07 20:55:38
This can probably become GetInterstitialPage()->Ge
knn
2015/01/07 23:50:29
Done. Thanks!
| |
346 GetRenderViewHost()->GetView(); | |
347 } | 346 } |
348 } | 347 } |
349 return static_cast<RenderWidgetHostViewAndroid*>(rwhv); | 348 return static_cast<RenderWidgetHostViewAndroid*>(rwhv); |
350 } | 349 } |
351 | 350 |
352 ScopedJavaLocalRef<jobject> ContentViewCoreImpl::GetJavaObject() { | 351 ScopedJavaLocalRef<jobject> ContentViewCoreImpl::GetJavaObject() { |
353 JNIEnv* env = AttachCurrentThread(); | 352 JNIEnv* env = AttachCurrentThread(); |
354 return java_ref_.get(env); | 353 return java_ref_.get(env); |
355 } | 354 } |
356 | 355 |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1354 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1353 reinterpret_cast<ui::WindowAndroid*>(window_android), |
1355 retained_objects_set); | 1354 retained_objects_set); |
1356 return reinterpret_cast<intptr_t>(view); | 1355 return reinterpret_cast<intptr_t>(view); |
1357 } | 1356 } |
1358 | 1357 |
1359 bool RegisterContentViewCore(JNIEnv* env) { | 1358 bool RegisterContentViewCore(JNIEnv* env) { |
1360 return RegisterNativesImpl(env); | 1359 return RegisterNativesImpl(env); |
1361 } | 1360 } |
1362 | 1361 |
1363 } // namespace content | 1362 } // namespace content |
OLD | NEW |