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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 root_layer_->SetIsDrawable(false); | 770 root_layer_->SetIsDrawable(false); |
771 } | 771 } |
772 | 772 |
773 void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) { | 773 void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) { |
774 layer->RemoveFromParent(); | 774 layer->RemoveFromParent(); |
775 | 775 |
776 if (!root_layer_->children().size()) | 776 if (!root_layer_->children().size()) |
777 root_layer_->SetIsDrawable(true); | 777 root_layer_->SetIsDrawable(true); |
778 } | 778 } |
779 | 779 |
| 780 void ContentViewCoreImpl::MoveSelectionExtent(const gfx::PointF& position) { |
| 781 if (!web_contents_) |
| 782 return; |
| 783 |
| 784 web_contents_->MoveSelectionExtent(gfx::Point(position.x(), position.y())); |
| 785 } |
| 786 |
780 void ContentViewCoreImpl::SelectBetweenCoordinates(const gfx::PointF& start, | 787 void ContentViewCoreImpl::SelectBetweenCoordinates(const gfx::PointF& start, |
781 const gfx::PointF& end) { | 788 const gfx::PointF& end) { |
782 if (!web_contents_) | 789 if (!web_contents_) |
783 return; | 790 return; |
784 | 791 |
785 gfx::Point start_point = gfx::Point(start.x(), start.y()); | 792 gfx::Point start_point = gfx::Point(start.x(), start.y()); |
786 gfx::Point end_point = gfx::Point(end.x(), end.y()); | 793 gfx::Point end_point = gfx::Point(end.x(), end.y()); |
787 if (start_point == end_point) | 794 if (start_point == end_point) |
788 return; | 795 return; |
789 | 796 |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1338 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1345 reinterpret_cast<ui::WindowAndroid*>(window_android), |
1339 retained_objects_set); | 1346 retained_objects_set); |
1340 return reinterpret_cast<intptr_t>(view); | 1347 return reinterpret_cast<intptr_t>(view); |
1341 } | 1348 } |
1342 | 1349 |
1343 bool RegisterContentViewCore(JNIEnv* env) { | 1350 bool RegisterContentViewCore(JNIEnv* env) { |
1344 return RegisterNativesImpl(env); | 1351 return RegisterNativesImpl(env); |
1345 } | 1352 } |
1346 | 1353 |
1347 } // namespace content | 1354 } // namespace content |
OLD | NEW |