Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 829913004: WIP: Plumbing through text selection granularity control support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unified_text_selection_diff
Patch Set: Missing file. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 root_layer_->SetIsDrawable(false); 771 root_layer_->SetIsDrawable(false);
772 } 772 }
773 773
774 void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) { 774 void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) {
775 layer->RemoveFromParent(); 775 layer->RemoveFromParent();
776 776
777 if (!root_layer_->children().size()) 777 if (!root_layer_->children().size())
778 root_layer_->SetIsDrawable(true); 778 root_layer_->SetIsDrawable(true);
779 } 779 }
780 780
781 void ContentViewCoreImpl::MoveRangeSelectionExtent(const gfx::PointF& extent) { 781 void ContentViewCoreImpl::MoveRangeSelectionExtent(
782 const gfx::PointF& extent,
783 ui::TextSelectionGranularity granularity) {
782 if (!web_contents_) 784 if (!web_contents_)
783 return; 785 return;
784 786
785 web_contents_->MoveRangeSelectionExtent(gfx::Point(extent.x(), extent.y())); 787 web_contents_->MoveRangeSelectionExtent(gfx::Point(extent.x(), extent.y()),
788 granularity);
786 } 789 }
787 790
788 void ContentViewCoreImpl::SelectBetweenCoordinates(const gfx::PointF& base, 791 void ContentViewCoreImpl::SelectBetweenCoordinates(const gfx::PointF& base,
789 const gfx::PointF& extent) { 792 const gfx::PointF& extent) {
790 if (!web_contents_) 793 if (!web_contents_)
791 return; 794 return;
792 795
793 gfx::Point base_point = gfx::Point(base.x(), base.y()); 796 gfx::Point base_point = gfx::Point(base.x(), base.y());
794 gfx::Point extent_point = gfx::Point(extent.x(), extent.y()); 797 gfx::Point extent_point = gfx::Point(extent.x(), extent.y());
795 if (base_point == extent_point) 798 if (base_point == extent_point)
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 reinterpret_cast<ui::WindowAndroid*>(window_android), 1357 reinterpret_cast<ui::WindowAndroid*>(window_android),
1355 retained_objects_set); 1358 retained_objects_set);
1356 return reinterpret_cast<intptr_t>(view); 1359 return reinterpret_cast<intptr_t>(view);
1357 } 1360 }
1358 1361
1359 bool RegisterContentViewCore(JNIEnv* env) { 1362 bool RegisterContentViewCore(JNIEnv* env) {
1360 return RegisterNativesImpl(env); 1363 return RegisterNativesImpl(env);
1361 } 1364 }
1362 1365
1363 } // namespace content 1366 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698