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 = web_contents_->GetInterstitialPage() |
345 web_contents_->GetInterstitialPage())-> | 345 ->GetMainFrame() |
346 GetRenderViewHost()->GetView(); | 346 ->GetRenderViewHost() |
| 347 ->GetView(); |
347 } | 348 } |
348 } | 349 } |
349 return static_cast<RenderWidgetHostViewAndroid*>(rwhv); | 350 return static_cast<RenderWidgetHostViewAndroid*>(rwhv); |
350 } | 351 } |
351 | 352 |
352 ScopedJavaLocalRef<jobject> ContentViewCoreImpl::GetJavaObject() { | 353 ScopedJavaLocalRef<jobject> ContentViewCoreImpl::GetJavaObject() { |
353 JNIEnv* env = AttachCurrentThread(); | 354 JNIEnv* env = AttachCurrentThread(); |
354 return java_ref_.get(env); | 355 return java_ref_.get(env); |
355 } | 356 } |
356 | 357 |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1355 reinterpret_cast<ui::WindowAndroid*>(window_android), |
1355 retained_objects_set); | 1356 retained_objects_set); |
1356 return reinterpret_cast<intptr_t>(view); | 1357 return reinterpret_cast<intptr_t>(view); |
1357 } | 1358 } |
1358 | 1359 |
1359 bool RegisterContentViewCore(JNIEnv* env) { | 1360 bool RegisterContentViewCore(JNIEnv* env) { |
1360 return RegisterNativesImpl(env); | 1361 return RegisterNativesImpl(env); |
1361 } | 1362 } |
1362 | 1363 |
1363 } // namespace content | 1364 } // namespace content |
OLD | NEW |