Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: ui/android/view_android.h

Issue 2259493005: Let PowerSaveBlocker manager anchor view in Java side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/power_save_blocker/power_save_blocker_android.cc ('k') | ui/android/view_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « device/power_save_blocker/power_save_blocker_android.cc ('k') | ui/android/view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698