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

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

Issue 2308103002: Disable WebView/Chrome's drag and drop feature on M and below. (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
« no previous file with comments | « ui/android/view_android.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "ui/android/view_android.h" 5 #include "ui/android/view_android.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 cc::Layer* ViewAndroid::GetLayer() const { 159 cc::Layer* ViewAndroid::GetLayer() const {
160 return layer_.get(); 160 return layer_.get();
161 } 161 }
162 162
163 void ViewAndroid::SetLayer(scoped_refptr<cc::Layer> layer) { 163 void ViewAndroid::SetLayer(scoped_refptr<cc::Layer> layer) {
164 layer_ = layer; 164 layer_ = layer;
165 } 165 }
166 166
167 void ViewAndroid::StartDragAndDrop(const JavaRef<jstring>& jtext, 167 bool ViewAndroid::StartDragAndDrop(const JavaRef<jstring>& jtext,
168 const JavaRef<jobject>& jimage) { 168 const JavaRef<jobject>& jimage) {
169 ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate()); 169 ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
170 if (delegate.is_null()) 170 if (delegate.is_null())
171 return; 171 return false;
172 JNIEnv* env = base::android::AttachCurrentThread(); 172 JNIEnv* env = base::android::AttachCurrentThread();
173 Java_ViewAndroidDelegate_startDragAndDrop(env, delegate, jtext, jimage); 173 return Java_ViewAndroidDelegate_startDragAndDrop(env, delegate, jtext,
174 jimage);
174 } 175 }
175 176
176 } // namespace ui 177 } // namespace ui
OLDNEW
« no previous file with comments | « ui/android/view_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698