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

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

Issue 2638973004: Use ContainerView for PowerSaveBlocker to keep screen on (Closed)
Patch Set: fix tests Created 3 years, 11 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
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Detaches this view from its parent. 87 // Detaches this view from its parent.
88 void RemoveFromParent(); 88 void RemoveFromParent();
89 89
90 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, 90 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext,
91 const base::android::JavaRef<jobject>& jimage); 91 const base::android::JavaRef<jobject>& jimage);
92 92
93 ScopedAnchorView AcquireAnchorView(); 93 ScopedAnchorView AcquireAnchorView();
94 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, 94 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor,
95 const gfx::RectF& bounds); 95 const gfx::RectF& bounds);
96 96
97 base::android::ScopedJavaLocalRef<jobject> GetContainerView();
boliu 2017/01/18 18:21:16 add a comment this may return null
Jinsuk Kim 2017/01/19 23:48:08 Done.
98
97 protected: 99 protected:
98 ViewAndroid* parent_; 100 ViewAndroid* parent_;
99 101
100 private: 102 private:
101 void RemoveChild(ViewAndroid* child); 103 void RemoveChild(ViewAndroid* child);
102 104
103 // Returns the Java delegate for this view. This is used to delegate work 105 // Returns the Java delegate for this view. This is used to delegate work
104 // up to the embedding view (or the embedder that can deal with the 106 // up to the embedding view (or the embedder that can deal with the
105 // implementation details). 107 // implementation details).
106 const base::android::ScopedJavaLocalRef<jobject> 108 const base::android::ScopedJavaLocalRef<jobject>
107 GetViewAndroidDelegate() const; 109 GetViewAndroidDelegate() const;
108 110
109 std::list<ViewAndroid*> children_; 111 std::list<ViewAndroid*> children_;
110 scoped_refptr<cc::Layer> layer_; 112 scoped_refptr<cc::Layer> layer_;
111 JavaObjectWeakGlobalRef delegate_; 113 JavaObjectWeakGlobalRef delegate_;
112 gfx::Vector2dF content_offset_; // in CSS pixel 114 gfx::Vector2dF content_offset_; // in CSS pixel
113 115
114 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); 116 DISALLOW_COPY_AND_ASSIGN(ViewAndroid);
115 }; 117 };
116 118
117 } // namespace ui 119 } // namespace ui
118 120
119 #endif // UI_ANDROID_VIEW_ANDROID_H_ 121 #endif // UI_ANDROID_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698