Chromium Code Reviews| Index: ui/android/view_android.h |
| diff --git a/ui/android/view_android.h b/ui/android/view_android.h |
| index 607a1acc72ae4dad10cfc8216cd5d76831b33c6f..8a05c83927f44eb5ea140dacb14ee2c1fdd7c11d 100644 |
| --- a/ui/android/view_android.h |
| +++ b/ui/android/view_android.h |
| @@ -18,6 +18,7 @@ class Layer; |
| namespace ui { |
| +class ViewClient; |
| class WindowAndroid; |
| // A simple container for a UI layer. |
| @@ -54,11 +55,9 @@ class UI_ANDROID_EXPORT ViewAndroid { |
| // Default copy/assign disabled by move constructor. |
| }; |
| - // A ViewAndroid may have its own delegate or otherwise will |
| - // use the next available parent's delegate. |
| - ViewAndroid(const base::android::JavaRef<jobject>& delegate); |
| - |
| + ViewAndroid(ViewClient* client); |
|
boliu
2016/12/06 00:34:14
explicit
Jinsuk Kim
2016/12/06 07:35:07
Done.
|
| ViewAndroid(); |
| + |
| virtual ~ViewAndroid(); |
| // Returns the window at the root of this hierarchy, or |null| |
| @@ -80,10 +79,17 @@ class UI_ANDROID_EXPORT ViewAndroid { |
| bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, |
| const base::android::JavaRef<jobject>& jimage); |
| + gfx::Size GetPhysicalBackingSize(); |
| + |
| ScopedAnchorView AcquireAnchorView(); |
| void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, |
| const gfx::RectF& bounds); |
| + // Internal implementation of ViewClient forwarding calls to the interface. |
| + bool OnPhysicalBackingSizeChanged(int width, int height); |
| + |
| + void UpdateLayerBounds(); |
| + |
| protected: |
| ViewAndroid* parent_; |
| @@ -96,9 +102,17 @@ class UI_ANDROID_EXPORT ViewAndroid { |
| const base::android::ScopedJavaLocalRef<jobject> |
| GetViewAndroidDelegate() const; |
| + int GetPhysicalBackingSizeWidthPix(); |
| + int GetPhysicalBackingSizeHeightPix(); |
| + void SetPhysicalBackingSize(int width, int height); |
| + |
| std::list<ViewAndroid*> children_; |
| scoped_refptr<cc::Layer> layer_; |
| JavaObjectWeakGlobalRef delegate_; |
| + ViewClient* client_; |
|
boliu
2016/12/06 00:34:14
ViewClient* const client_;, it should be const, ri
Jinsuk Kim
2016/12/06 07:35:07
Yes. Done.
|
| + |
| + int physical_width_pix_; |
| + int physical_height_pix_; |
| DISALLOW_COPY_AND_ASSIGN(ViewAndroid); |
| }; |