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