| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 if (!obj.is_null()) { | 330 if (!obj.is_null()) { |
| 331 Java_ContentViewCore_onRenderProcessChange(env, obj.obj()); | 331 Java_ContentViewCore_onRenderProcessChange(env, obj.obj()); |
| 332 } | 332 } |
| 333 } | 333 } |
| 334 | 334 |
| 335 SetFocusInternal(HasFocus()); | 335 SetFocusInternal(HasFocus()); |
| 336 SetAccessibilityEnabledInternal(accessibility_enabled_); | 336 SetAccessibilityEnabledInternal(accessibility_enabled_); |
| 337 } | 337 } |
| 338 | 338 |
| 339 RenderWidgetHostViewAndroid* | 339 RenderWidgetHostViewAndroid* |
| 340 ContentViewCoreImpl::GetRenderWidgetHostViewAndroid() { | 340 ContentViewCoreImpl::GetRenderWidgetHostViewAndroid() const { |
| 341 RenderWidgetHostView* rwhv = NULL; | 341 RenderWidgetHostView* rwhv = NULL; |
| 342 if (web_contents_) { | 342 if (web_contents_) { |
| 343 rwhv = web_contents_->GetRenderWidgetHostView(); | 343 rwhv = web_contents_->GetRenderWidgetHostView(); |
| 344 if (web_contents_->ShowingInterstitialPage()) { | 344 if (web_contents_->ShowingInterstitialPage()) { |
| 345 rwhv = static_cast<InterstitialPageImpl*>( | 345 rwhv = static_cast<InterstitialPageImpl*>( |
| 346 web_contents_->GetInterstitialPage())-> | 346 web_contents_->GetInterstitialPage())-> |
| 347 GetRenderViewHost()->GetView(); | 347 GetRenderViewHost()->GetView(); |
| 348 } | 348 } |
| 349 } | 349 } |
| 350 return static_cast<RenderWidgetHostViewAndroid*>(rwhv); | 350 return static_cast<RenderWidgetHostViewAndroid*>(rwhv); |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 } | 791 } |
| 792 | 792 |
| 793 ui::ViewAndroid* ContentViewCoreImpl::GetViewAndroid() const { | 793 ui::ViewAndroid* ContentViewCoreImpl::GetViewAndroid() const { |
| 794 return view_android_; | 794 return view_android_; |
| 795 } | 795 } |
| 796 | 796 |
| 797 ui::WindowAndroid* ContentViewCoreImpl::GetWindowAndroid() const { | 797 ui::WindowAndroid* ContentViewCoreImpl::GetWindowAndroid() const { |
| 798 return window_android_; | 798 return window_android_; |
| 799 } | 799 } |
| 800 | 800 |
| 801 scoped_refptr<cc::Layer> ContentViewCoreImpl::GetLayer() const { | 801 const scoped_refptr<cc::Layer>& ContentViewCoreImpl::GetLayer() const { |
| 802 return root_layer_.get(); | 802 return root_layer_; |
| 803 } | 803 } |
| 804 | 804 |
| 805 // ---------------------------------------------------------------------------- | 805 // ---------------------------------------------------------------------------- |
| 806 // Methods called from Java via JNI | 806 // Methods called from Java via JNI |
| 807 // ---------------------------------------------------------------------------- | 807 // ---------------------------------------------------------------------------- |
| 808 | 808 |
| 809 void ContentViewCoreImpl::SelectPopupMenuItems(JNIEnv* env, | 809 void ContentViewCoreImpl::SelectPopupMenuItems(JNIEnv* env, |
| 810 jobject obj, | 810 jobject obj, |
| 811 jlong selectPopupSourceFrame, | 811 jlong selectPopupSourceFrame, |
| 812 jintArray indices) { | 812 jintArray indices) { |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1333 reinterpret_cast<ui::WindowAndroid*>(window_android), |
| 1334 retained_objects_set); | 1334 retained_objects_set); |
| 1335 return reinterpret_cast<intptr_t>(view); | 1335 return reinterpret_cast<intptr_t>(view); |
| 1336 } | 1336 } |
| 1337 | 1337 |
| 1338 bool RegisterContentViewCore(JNIEnv* env) { | 1338 bool RegisterContentViewCore(JNIEnv* env) { |
| 1339 return RegisterNativesImpl(env); | 1339 return RegisterNativesImpl(env); |
| 1340 } | 1340 } |
| 1341 | 1341 |
| 1342 } // namespace content | 1342 } // namespace content |
| OLD | NEW |