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

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

Issue 2352773003: Fix the scale of Drag and Drop shadow image. (Closed)
Patch Set: Created 4 years, 3 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 cc::Layer* GetLayer() const; 69 cc::Layer* GetLayer() const;
70 void SetLayer(scoped_refptr<cc::Layer> layer); 70 void SetLayer(scoped_refptr<cc::Layer> layer);
71 71
72 // Adds this view as a child of another view. 72 // Adds this view as a child of another view.
73 void AddChild(ViewAndroid* child); 73 void AddChild(ViewAndroid* child);
74 74
75 // Detaches this view from its parent. 75 // Detaches this view from its parent.
76 void RemoveFromParent(); 76 void RemoveFromParent();
77 77
78 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, 78 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext,
79 const base::android::JavaRef<jobject>& jimage); 79 const base::android::JavaRef<jobject>& jimage,
80 const jfloat jPageScale);
80 81
81 ScopedAnchorView AcquireAnchorView(); 82 ScopedAnchorView AcquireAnchorView();
82 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, 83 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor,
83 const gfx::RectF& bounds); 84 const gfx::RectF& bounds);
84 85
85 protected: 86 protected:
86 ViewAndroid* parent_; 87 ViewAndroid* parent_;
87 88
88 private: 89 private:
89 void RemoveChild(ViewAndroid* child); 90 void RemoveChild(ViewAndroid* child);
90 91
91 // Returns the Java delegate for this view. This is used to delegate work 92 // Returns the Java delegate for this view. This is used to delegate work
92 // up to the embedding view (or the embedder that can deal with the 93 // up to the embedding view (or the embedder that can deal with the
93 // implementation details). 94 // implementation details).
94 const base::android::ScopedJavaLocalRef<jobject> 95 const base::android::ScopedJavaLocalRef<jobject>
95 GetViewAndroidDelegate() const; 96 GetViewAndroidDelegate() const;
96 97
97 std::list<ViewAndroid*> children_; 98 std::list<ViewAndroid*> children_;
98 scoped_refptr<cc::Layer> layer_; 99 scoped_refptr<cc::Layer> layer_;
99 JavaObjectWeakGlobalRef delegate_; 100 JavaObjectWeakGlobalRef delegate_;
100 101
101 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); 102 DISALLOW_COPY_AND_ASSIGN(ViewAndroid);
102 }; 103 };
103 104
104 } // namespace ui 105 } // namespace ui
105 106
106 #endif // UI_ANDROID_VIEW_ANDROID_H_ 107 #endif // UI_ANDROID_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698