| 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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 } | 831 } |
| 832 | 832 |
| 833 void ContentViewCoreImpl::AttachLayer(scoped_refptr<cc::Layer> layer) { | 833 void ContentViewCoreImpl::AttachLayer(scoped_refptr<cc::Layer> layer) { |
| 834 root_layer_->InsertChild(layer, 0); | 834 root_layer_->InsertChild(layer, 0); |
| 835 root_layer_->SetIsDrawable(false); | 835 root_layer_->SetIsDrawable(false); |
| 836 } | 836 } |
| 837 | 837 |
| 838 void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) { | 838 void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) { |
| 839 layer->RemoveFromParent(); | 839 layer->RemoveFromParent(); |
| 840 | 840 |
| 841 if (!root_layer_->children().size()) | 841 if (root_layer_->children().empty()) |
| 842 root_layer_->SetIsDrawable(true); | 842 root_layer_->SetIsDrawable(true); |
| 843 } | 843 } |
| 844 | 844 |
| 845 void ContentViewCoreImpl::MoveRangeSelectionExtent(const gfx::PointF& extent) { | 845 void ContentViewCoreImpl::MoveRangeSelectionExtent(const gfx::PointF& extent) { |
| 846 if (!web_contents_) | 846 if (!web_contents_) |
| 847 return; | 847 return; |
| 848 | 848 |
| 849 web_contents_->MoveRangeSelectionExtent(gfx::ToRoundedPoint(extent)); | 849 web_contents_->MoveRangeSelectionExtent(gfx::ToRoundedPoint(extent)); |
| 850 } | 850 } |
| 851 | 851 |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 return ScopedJavaLocalRef<jobject>(); | 1642 return ScopedJavaLocalRef<jobject>(); |
| 1643 | 1643 |
| 1644 return view->GetJavaObject(); | 1644 return view->GetJavaObject(); |
| 1645 } | 1645 } |
| 1646 | 1646 |
| 1647 bool RegisterContentViewCore(JNIEnv* env) { | 1647 bool RegisterContentViewCore(JNIEnv* env) { |
| 1648 return RegisterNativesImpl(env) && JNI_DragEvent::RegisterNativesImpl(env); | 1648 return RegisterNativesImpl(env) && JNI_DragEvent::RegisterNativesImpl(env); |
| 1649 } | 1649 } |
| 1650 | 1650 |
| 1651 } // namespace content | 1651 } // namespace content |
| OLD | NEW |