| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_ | 6 #define CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_ |
| 7 | 7 |
| 8 #include "ui/touch_selection/touch_handle.h" | 8 #include "ui/touch_selection/touch_handle.h" |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // ui::TouchHandleDrawable implementation. | 24 // ui::TouchHandleDrawable implementation. |
| 25 void SetEnabled(bool enabled) override; | 25 void SetEnabled(bool enabled) override; |
| 26 void SetOrientation(ui::TouchHandleOrientation orientation, | 26 void SetOrientation(ui::TouchHandleOrientation orientation, |
| 27 bool mirror_vertical, | 27 bool mirror_vertical, |
| 28 bool mirror_horizontal) override; | 28 bool mirror_horizontal) override; |
| 29 void SetOrigin(const gfx::PointF& origin) override; | 29 void SetOrigin(const gfx::PointF& origin) override; |
| 30 void SetAlpha(float alpha) override; | 30 void SetAlpha(float alpha) override; |
| 31 gfx::RectF GetVisibleBounds() const override; | 31 gfx::RectF GetVisibleBounds() const override; |
| 32 float GetDrawableHorizontalPaddingRatio() const override; | 32 float GetDrawableHorizontalPaddingRatio() const override; |
| 33 | 33 |
| 34 static bool RegisterHandleViewResources(JNIEnv* env); | |
| 35 | |
| 36 private: | 34 private: |
| 37 void DetachLayer(); | 35 void DetachLayer(); |
| 38 void UpdateLayerPosition(); | 36 void UpdateLayerPosition(); |
| 39 | 37 |
| 40 const float dpi_scale_; | 38 const float dpi_scale_; |
| 41 float drawable_horizontal_padding_ratio_; | 39 float drawable_horizontal_padding_ratio_; |
| 42 ui::TouchHandleOrientation orientation_; | 40 ui::TouchHandleOrientation orientation_; |
| 43 gfx::PointF origin_position_; | 41 gfx::PointF origin_position_; |
| 44 scoped_refptr<cc::UIResourceLayer> layer_; | 42 scoped_refptr<cc::UIResourceLayer> layer_; |
| 45 | 43 |
| 46 DISALLOW_COPY_AND_ASSIGN(CompositedTouchHandleDrawable); | 44 DISALLOW_COPY_AND_ASSIGN(CompositedTouchHandleDrawable); |
| 47 }; | 45 }; |
| 48 | 46 |
| 49 } // namespace content | 47 } // namespace content |
| 50 | 48 |
| 51 #endif // CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_ | 49 #endif // CONTENT_BROWSER_ANDROID_COMPOSITED_TOUCH_HANDLE_DRAWABLE_H_ |
| OLD | NEW |