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

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

Issue 701823002: Separate out Touch Selection Orientation enum (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/libwebviewchromium.gypi ('k') | content/browser/android/popup_touch_handle_drawable.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f480f55930d9616180945fc8f2e82d2849107ff0..91a019eba89157780bd68ed5d82c979b050d0c88 100644
--- a/content/browser/android/composited_touch_handle_drawable.cc
+++ b/content/browser/android/composited_touch_handle_drawable.cc
@@ -53,13 +53,13 @@ class HandleResources {
const SkBitmap& GetBitmap(ui::TouchHandleOrientation orientation) {
DCHECK(loaded_);
switch (orientation) {
- case ui::TOUCH_HANDLE_LEFT:
+ case ui::TouchHandleOrientation::LEFT:
return left_bitmap_;
- case ui::TOUCH_HANDLE_RIGHT:
+ case ui::TouchHandleOrientation::RIGHT:
return right_bitmap_;
- case ui::TOUCH_HANDLE_CENTER:
+ case ui::TouchHandleOrientation::CENTER:
return center_bitmap_;
- case ui::TOUCH_HANDLE_ORIENTATION_UNDEFINED:
+ case ui::TouchHandleOrientation::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_(ui::TOUCH_HANDLE_ORIENTATION_UNDEFINED),
+ orientation_(ui::TouchHandleOrientation::UNDEFINED),
layer_(cc::UIResourceLayer::Create()) {
g_selection_resources.Get().LoadIfNecessary(context);
DCHECK(root_layer);
@@ -111,16 +111,16 @@ void CompositedTouchHandleDrawable::SetOrientation(
layer_->SetBounds(gfx::Size(bitmap.width(), bitmap.height()));
switch (orientation_) {
- case ui::TOUCH_HANDLE_LEFT:
+ case ui::TouchHandleOrientation::LEFT:
focal_offset_from_origin_ = gfx::Vector2dF(bitmap.width() * 0.75f, 0);
break;
- case ui::TOUCH_HANDLE_RIGHT:
+ case ui::TouchHandleOrientation::RIGHT:
focal_offset_from_origin_ = gfx::Vector2dF(bitmap.width() * 0.25f, 0);
break;
- case ui::TOUCH_HANDLE_CENTER:
+ case ui::TouchHandleOrientation::CENTER:
focal_offset_from_origin_ = gfx::Vector2dF(bitmap.width() * 0.5f, 0);
break;
- case ui::TOUCH_HANDLE_ORIENTATION_UNDEFINED:
+ case ui::TouchHandleOrientation::UNDEFINED:
NOTREACHED() << "Invalid touch handle orientation.";
break;
};
« no previous file with comments | « android_webview/libwebviewchromium.gypi ('k') | content/browser/android/popup_touch_handle_drawable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698