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

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

Issue 2842693005: Store physical backing size in ViewAndroid (Closed)
Patch Set: no UpdateLayerBounds Created 3 years, 7 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 // Detaches this view from its parent. 127 // Detaches this view from its parent.
128 void RemoveFromParent(); 128 void RemoveFromParent();
129 129
130 // Sets the layout relative to parent. Used to do hit testing against events. 130 // Sets the layout relative to parent. Used to do hit testing against events.
131 void SetLayout(LayoutParams params); 131 void SetLayout(LayoutParams params);
132 132
133 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, 133 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext,
134 const base::android::JavaRef<jobject>& jimage); 134 const base::android::JavaRef<jobject>& jimage);
135 135
136 gfx::Size GetPhysicalBackingSize();
137 void OnPhysicalBackingSizeChanged(const gfx::Size& size);
136 void OnBackgroundColorChanged(unsigned int color); 138 void OnBackgroundColorChanged(unsigned int color);
137 void OnTopControlsChanged(float top_controls_offset, 139 void OnTopControlsChanged(float top_controls_offset,
138 float top_content_offset); 140 float top_content_offset);
139 void OnBottomControlsChanged(float bottom_controls_offset, 141 void OnBottomControlsChanged(float bottom_controls_offset,
140 float bottom_content_offset); 142 float bottom_content_offset);
141 int GetSystemWindowInsetBottom(); 143 int GetSystemWindowInsetBottom();
142 144
143 ScopedAnchorView AcquireAnchorView(); 145 ScopedAnchorView AcquireAnchorView();
144 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, 146 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor,
145 const gfx::RectF& bounds); 147 const gfx::RectF& bounds);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 std::list<ViewAndroid*> children_; 196 std::list<ViewAndroid*> children_;
195 scoped_refptr<cc::Layer> layer_; 197 scoped_refptr<cc::Layer> layer_;
196 JavaObjectWeakGlobalRef delegate_; 198 JavaObjectWeakGlobalRef delegate_;
197 199
198 ViewClient* const client_; 200 ViewClient* const client_;
199 201
200 // Basic view layout information. Used to do hit testing deciding whether 202 // Basic view layout information. Used to do hit testing deciding whether
201 // the passed events should be processed by the view. 203 // the passed events should be processed by the view.
202 LayoutParams layout_params_; 204 LayoutParams layout_params_;
203 205
206 gfx::Size physical_size_;
207
204 gfx::Vector2dF content_offset_; // in CSS pixel. 208 gfx::Vector2dF content_offset_; // in CSS pixel.
205 std::unique_ptr<EventForwarder> event_forwarder_; 209 std::unique_ptr<EventForwarder> event_forwarder_;
206 210
207 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); 211 DISALLOW_COPY_AND_ASSIGN(ViewAndroid);
208 }; 212 };
209 213
210 } // namespace ui 214 } // namespace ui
211 215
212 #endif // UI_ANDROID_VIEW_ANDROID_H_ 216 #endif // UI_ANDROID_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698