| 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 | |
| 94 protected: | 89 protected: |
| 95 ViewAndroid* parent_; | 90 ViewAndroid* parent_; |
| 96 | 91 |
| 97 private: | 92 private: |
| 98 void RemoveChild(ViewAndroid* child); | 93 void RemoveChild(ViewAndroid* child); |
| 99 | 94 |
| 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 |
| 100 std::list<ViewAndroid*> children_; | 101 std::list<ViewAndroid*> children_; |
| 101 scoped_refptr<cc::Layer> layer_; | 102 scoped_refptr<cc::Layer> layer_; |
| 102 JavaObjectWeakGlobalRef delegate_; | 103 JavaObjectWeakGlobalRef delegate_; |
| 103 | 104 |
| 104 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); | 105 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 } // namespace ui | 108 } // namespace ui |
| 108 | 109 |
| 109 #endif // UI_ANDROID_VIEW_ANDROID_H_ | 110 #endif // UI_ANDROID_VIEW_ANDROID_H_ |
| OLD | NEW |