| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 UI_ANDROID_VIEW_ANDROID_H_ | 5 #ifndef UI_ANDROID_VIEW_ANDROID_H_ |
| 6 #define UI_ANDROID_VIEW_ANDROID_H_ | 6 #define UI_ANDROID_VIEW_ANDROID_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // Detaches this view from its parent. | 79 // Detaches this view from its parent. |
| 80 void RemoveFromParent(); | 80 void RemoveFromParent(); |
| 81 | 81 |
| 82 void StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, | 82 void StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, |
| 83 const base::android::JavaRef<jobject>& jimage); | 83 const base::android::JavaRef<jobject>& jimage); |
| 84 | 84 |
| 85 ScopedAnchorView AcquireAnchorView(); | 85 ScopedAnchorView AcquireAnchorView(); |
| 86 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, | 86 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, |
| 87 const gfx::RectF& bounds); | 87 const gfx::RectF& bounds); |
| 88 | 88 |
| 89 // Returns the Java delegate for this view. This is used to delegate work |
| 90 // up to the embedding view (or the embedder that can deal with the |
| 91 // implementation details). |
| 92 const JavaObjectWeakGlobalRef GetViewAndroidDelegate() const; |
| 93 |
| 89 protected: | 94 protected: |
| 90 ViewAndroid* parent_; | 95 ViewAndroid* parent_; |
| 91 | 96 |
| 92 private: | 97 private: |
| 93 void RemoveChild(ViewAndroid* child); | 98 void RemoveChild(ViewAndroid* child); |
| 94 | 99 |
| 95 // Returns the Java delegate for this view. This is used to delegate work | |
| 96 // up to the embedding view (or the embedder that can deal with the | |
| 97 // implementation details). | |
| 98 const base::android::ScopedJavaLocalRef<jobject> | |
| 99 GetViewAndroidDelegate() const; | |
| 100 | |
| 101 std::list<ViewAndroid*> children_; | 100 std::list<ViewAndroid*> children_; |
| 102 scoped_refptr<cc::Layer> layer_; | 101 scoped_refptr<cc::Layer> layer_; |
| 103 JavaObjectWeakGlobalRef delegate_; | 102 JavaObjectWeakGlobalRef delegate_; |
| 104 | 103 |
| 105 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); | 104 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 } // namespace ui | 107 } // namespace ui |
| 109 | 108 |
| 110 #endif // UI_ANDROID_VIEW_ANDROID_H_ | 109 #endif // UI_ANDROID_VIEW_ANDROID_H_ |
| OLD | NEW |