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

Unified Diff: content/browser/android/composited_touch_handle_drawable.cc

Issue 759433002: Reland: Move TouchSelectionController from content to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Excluded ui/touch_selection from Windows GN build Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/composited_touch_handle_drawable.cc
diff --git a/content/browser/android/composited_touch_handle_drawable.cc b/content/browser/android/composited_touch_handle_drawable.cc
index 4c37e381c54a709c37846d6845daba9610dbe85a..ff734a117af9018560000713f3f2d84f389adc1f 100644
--- a/content/browser/android/composited_touch_handle_drawable.cc
+++ b/content/browser/android/composited_touch_handle_drawable.cc
@@ -50,16 +50,16 @@ class HandleResources {
center_bitmap_.setImmutable();
}
- const SkBitmap& GetBitmap(TouchHandleOrientation orientation) {
+ const SkBitmap& GetBitmap(ui::TouchHandleOrientation orientation) {
DCHECK(loaded_);
switch (orientation) {
- case TOUCH_HANDLE_LEFT:
+ case ui::TOUCH_HANDLE_LEFT:
return left_bitmap_;
- case TOUCH_HANDLE_RIGHT:
+ case ui::TOUCH_HANDLE_RIGHT:
return right_bitmap_;
- case TOUCH_HANDLE_CENTER:
+ case ui::TOUCH_HANDLE_CENTER:
return center_bitmap_;
- case TOUCH_HANDLE_ORIENTATION_UNDEFINED:
+ case ui::TOUCH_HANDLE_ORIENTATION_UNDEFINED:
NOTREACHED() << "Invalid touch handle orientation.";
};
return center_bitmap_;
@@ -83,7 +83,7 @@ CompositedTouchHandleDrawable::CompositedTouchHandleDrawable(
float dpi_scale,
jobject context)
: dpi_scale_(dpi_scale),
- orientation_(TOUCH_HANDLE_ORIENTATION_UNDEFINED),
+ orientation_(ui::TOUCH_HANDLE_ORIENTATION_UNDEFINED),
layer_(cc::UIResourceLayer::Create()) {
g_selection_resources.Get().LoadIfNecessary(context);
DCHECK(root_layer);
@@ -99,7 +99,7 @@ void CompositedTouchHandleDrawable::SetEnabled(bool enabled) {
}
void CompositedTouchHandleDrawable::SetOrientation(
- TouchHandleOrientation orientation) {
+ ui::TouchHandleOrientation orientation) {
DCHECK(layer_->parent());
orientation_ = orientation;
@@ -108,16 +108,16 @@ void CompositedTouchHandleDrawable::SetOrientation(
layer_->SetBounds(gfx::Size(bitmap.width(), bitmap.height()));
switch (orientation_) {
- case TOUCH_HANDLE_LEFT:
+ case ui::TOUCH_HANDLE_LEFT:
focal_offset_from_origin_ = gfx::Vector2dF(bitmap.width() * 0.75f, 0);
break;
- case TOUCH_HANDLE_RIGHT:
+ case ui::TOUCH_HANDLE_RIGHT:
focal_offset_from_origin_ = gfx::Vector2dF(bitmap.width() * 0.25f, 0);
break;
- case TOUCH_HANDLE_CENTER:
+ case ui::TOUCH_HANDLE_CENTER:
focal_offset_from_origin_ = gfx::Vector2dF(bitmap.width() * 0.5f, 0);
break;
- case TOUCH_HANDLE_ORIENTATION_UNDEFINED:
+ case ui::TOUCH_HANDLE_ORIENTATION_UNDEFINED:
NOTREACHED() << "Invalid touch handle orientation.";
break;
};
« no previous file with comments | « content/browser/android/composited_touch_handle_drawable.h ('k') | content/browser/android/content_view_core_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698