| 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 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1524 static_cast<NavigationControllerImpl&>(web_contents_->GetController()); | 1524 static_cast<NavigationControllerImpl&>(web_contents_->GetController()); |
| 1525 controller.ReloadOriginalRequestURL(false); | 1525 controller.ReloadOriginalRequestURL(false); |
| 1526 } | 1526 } |
| 1527 } | 1527 } |
| 1528 | 1528 |
| 1529 void ContentViewCoreImpl::SetAccessibilityEnabled(JNIEnv* env, jobject obj, | 1529 void ContentViewCoreImpl::SetAccessibilityEnabled(JNIEnv* env, jobject obj, |
| 1530 bool enabled) { | 1530 bool enabled) { |
| 1531 SetAccessibilityEnabledInternal(enabled); | 1531 SetAccessibilityEnabledInternal(enabled); |
| 1532 } | 1532 } |
| 1533 | 1533 |
| 1534 void ContentViewCoreImpl::ShowSelectionHandlesAutomatically() const { |
| 1535 JNIEnv* env = AttachCurrentThread(); |
| 1536 ScopedJavaLocalRef<jobject> obj(java_ref_.get(env)); |
| 1537 if (obj.is_null()) |
| 1538 return; |
| 1539 Java_ContentViewCore_showSelectionHandlesAutomatically(env, obj.obj()); |
| 1540 } |
| 1541 |
| 1534 void ContentViewCoreImpl::SetAccessibilityEnabledInternal(bool enabled) { | 1542 void ContentViewCoreImpl::SetAccessibilityEnabledInternal(bool enabled) { |
| 1535 accessibility_enabled_ = enabled; | 1543 accessibility_enabled_ = enabled; |
| 1536 RenderWidgetHostViewAndroid* host_view = GetRenderWidgetHostViewAndroid(); | 1544 RenderWidgetHostViewAndroid* host_view = GetRenderWidgetHostViewAndroid(); |
| 1537 if (!host_view) | 1545 if (!host_view) |
| 1538 return; | 1546 return; |
| 1539 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From( | 1547 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From( |
| 1540 host_view->GetRenderWidgetHost()); | 1548 host_view->GetRenderWidgetHost()); |
| 1541 BrowserAccessibilityState* accessibility_state = | 1549 BrowserAccessibilityState* accessibility_state = |
| 1542 BrowserAccessibilityState::GetInstance(); | 1550 BrowserAccessibilityState::GetInstance(); |
| 1543 if (enabled) { | 1551 if (enabled) { |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1690 reinterpret_cast<ui::WindowAndroid*>(window_android), |
| 1683 retained_objects_set); | 1691 retained_objects_set); |
| 1684 return reinterpret_cast<intptr_t>(view); | 1692 return reinterpret_cast<intptr_t>(view); |
| 1685 } | 1693 } |
| 1686 | 1694 |
| 1687 bool RegisterContentViewCore(JNIEnv* env) { | 1695 bool RegisterContentViewCore(JNIEnv* env) { |
| 1688 return RegisterNativesImpl(env); | 1696 return RegisterNativesImpl(env); |
| 1689 } | 1697 } |
| 1690 | 1698 |
| 1691 } // namespace content | 1699 } // namespace content |
| OLD | NEW |