| 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 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1568 static_cast<NavigationControllerImpl&>(web_contents_->GetController()); | 1568 static_cast<NavigationControllerImpl&>(web_contents_->GetController()); |
| 1569 controller.ReloadOriginalRequestURL(false); | 1569 controller.ReloadOriginalRequestURL(false); |
| 1570 } | 1570 } |
| 1571 } | 1571 } |
| 1572 | 1572 |
| 1573 void ContentViewCoreImpl::SetAccessibilityEnabled(JNIEnv* env, jobject obj, | 1573 void ContentViewCoreImpl::SetAccessibilityEnabled(JNIEnv* env, jobject obj, |
| 1574 bool enabled) { | 1574 bool enabled) { |
| 1575 SetAccessibilityEnabledInternal(enabled); | 1575 SetAccessibilityEnabledInternal(enabled); |
| 1576 } | 1576 } |
| 1577 | 1577 |
| 1578 void ContentViewCoreImpl::ShowSelectionHandlesAutomatically() const { |
| 1579 JNIEnv* env = AttachCurrentThread(); |
| 1580 ScopedJavaLocalRef<jobject> obj(java_ref_.get(env)); |
| 1581 if (obj.is_null()) |
| 1582 return; |
| 1583 Java_ContentViewCore_showSelectionHandlesAutomatically(env, obj.obj()); |
| 1584 } |
| 1585 |
| 1578 void ContentViewCoreImpl::SetAccessibilityEnabledInternal(bool enabled) { | 1586 void ContentViewCoreImpl::SetAccessibilityEnabledInternal(bool enabled) { |
| 1579 accessibility_enabled_ = enabled; | 1587 accessibility_enabled_ = enabled; |
| 1580 RenderWidgetHostViewAndroid* host_view = GetRenderWidgetHostViewAndroid(); | 1588 RenderWidgetHostViewAndroid* host_view = GetRenderWidgetHostViewAndroid(); |
| 1581 if (!host_view) | 1589 if (!host_view) |
| 1582 return; | 1590 return; |
| 1583 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From( | 1591 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From( |
| 1584 host_view->GetRenderWidgetHost()); | 1592 host_view->GetRenderWidgetHost()); |
| 1585 BrowserAccessibilityState* accessibility_state = | 1593 BrowserAccessibilityState* accessibility_state = |
| 1586 BrowserAccessibilityState::GetInstance(); | 1594 BrowserAccessibilityState::GetInstance(); |
| 1587 if (enabled) { | 1595 if (enabled) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1696 reinterpret_cast<ui::ViewAndroid*>(view_android), |
| 1689 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1697 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
| 1690 return reinterpret_cast<intptr_t>(view); | 1698 return reinterpret_cast<intptr_t>(view); |
| 1691 } | 1699 } |
| 1692 | 1700 |
| 1693 bool RegisterContentViewCore(JNIEnv* env) { | 1701 bool RegisterContentViewCore(JNIEnv* env) { |
| 1694 return RegisterNativesImpl(env); | 1702 return RegisterNativesImpl(env); |
| 1695 } | 1703 } |
| 1696 | 1704 |
| 1697 } // namespace content | 1705 } // namespace content |
| OLD | NEW |