Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
| (...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 877 WebContents* ContentViewCoreImpl::GetWebContents() const { | 877 WebContents* ContentViewCoreImpl::GetWebContents() const { |
| 878 return web_contents_; | 878 return web_contents_; |
| 879 } | 879 } |
| 880 | 880 |
| 881 void ContentViewCoreImpl::SetFocus(JNIEnv* env, | 881 void ContentViewCoreImpl::SetFocus(JNIEnv* env, |
| 882 const JavaParamRef<jobject>& obj, | 882 const JavaParamRef<jobject>& obj, |
| 883 jboolean focused) { | 883 jboolean focused) { |
| 884 SetFocusInternal(focused); | 884 SetFocusInternal(focused); |
| 885 } | 885 } |
| 886 | 886 |
| 887 void ContentViewCoreImpl::SetDIPScale(JNIEnv* env, | |
| 888 const JavaParamRef<jobject>& obj, | |
| 889 jfloat dipScale) { | |
| 890 dpi_scale_ = dipScale; | |
|
boliu
2016/09/14 04:35:32
I remember making this comment before. What's resp
Tima Vaisburd
2016/09/15 00:05:03
I probably never understood completely, so let me
boliu
2016/09/15 05:27:41
Yep
| |
| 891 } | |
| 892 | |
| 887 void ContentViewCoreImpl::SetFocusInternal(bool focused) { | 893 void ContentViewCoreImpl::SetFocusInternal(bool focused) { |
| 888 if (!GetRenderWidgetHostViewAndroid()) | 894 if (!GetRenderWidgetHostViewAndroid()) |
| 889 return; | 895 return; |
| 890 | 896 |
| 891 if (focused) | 897 if (focused) |
| 892 GetRenderWidgetHostViewAndroid()->Focus(); | 898 GetRenderWidgetHostViewAndroid()->Focus(); |
| 893 else | 899 else |
| 894 GetRenderWidgetHostViewAndroid()->Blur(); | 900 GetRenderWidgetHostViewAndroid()->Blur(); |
| 895 } | 901 } |
| 896 | 902 |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1602 return ScopedJavaLocalRef<jobject>(); | 1608 return ScopedJavaLocalRef<jobject>(); |
| 1603 | 1609 |
| 1604 return view->GetJavaObject(); | 1610 return view->GetJavaObject(); |
| 1605 } | 1611 } |
| 1606 | 1612 |
| 1607 bool RegisterContentViewCore(JNIEnv* env) { | 1613 bool RegisterContentViewCore(JNIEnv* env) { |
| 1608 return RegisterNativesImpl(env); | 1614 return RegisterNativesImpl(env); |
| 1609 } | 1615 } |
| 1610 | 1616 |
| 1611 } // namespace content | 1617 } // namespace content |
| OLD | NEW |