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

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

Issue 2708613002: Add EventForwarder for routing touch events (Closed)
Patch Set: - Created 3 years, 10 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, 102 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext,
103 const base::android::JavaRef<jobject>& jimage); 103 const base::android::JavaRef<jobject>& jimage);
104 104
105 ScopedAnchorView AcquireAnchorView(); 105 ScopedAnchorView AcquireAnchorView();
106 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, 106 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor,
107 const gfx::RectF& bounds); 107 const gfx::RectF& bounds);
108 108
109 // This may return null. 109 // This may return null.
110 base::android::ScopedJavaLocalRef<jobject> GetContainerView(); 110 base::android::ScopedJavaLocalRef<jobject> GetContainerView();
111 111
112 // Virtual for testing.
113 virtual float GetDipScale();
114
112 protected: 115 protected:
113 // Internal implementation of ViewClient forwarding calls to the interface. 116 // Internal implementation of ViewClient forwarding calls to the interface.
114 bool OnTouchEventInternal(const MotionEventData& event); 117 bool OnTouchEventInternal(const MotionEventData& event);
115 118
116 // Virtual for testing.
117 virtual float GetDipScale();
118
119 ViewAndroid* parent_; 119 ViewAndroid* parent_;
120 120
121 private: 121 private:
122 // Returns true only if this is of type |ViewRoot|. 122 // Returns true only if this is of type |ViewRoot|.
123 bool IsViewRoot(); 123 bool IsViewRoot();
124 124
125 void RemoveChild(ViewAndroid* child); 125 void RemoveChild(ViewAndroid* child);
126 126
127 // Returns the Java delegate for this view. This is used to delegate work 127 // Returns the Java delegate for this view. This is used to delegate work
128 // up to the embedding view (or the embedder that can deal with the 128 // up to the embedding view (or the embedder that can deal with the
(...skipping 14 matching lines...) Expand all
143 bool match_parent_; // Bounds matches that of the parent if true. 143 bool match_parent_; // Bounds matches that of the parent if true.
144 144
145 gfx::Vector2dF content_offset_; // In CSS pixel. 145 gfx::Vector2dF content_offset_; // In CSS pixel.
146 146
147 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); 147 DISALLOW_COPY_AND_ASSIGN(ViewAndroid);
148 }; 148 };
149 149
150 } // namespace ui 150 } // namespace ui
151 151
152 #endif // UI_ANDROID_VIEW_ANDROID_H_ 152 #endif // UI_ANDROID_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698