OLD | NEW |
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 "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 } | 251 } |
252 | 252 |
253 void ViewAndroid::SetLayer(scoped_refptr<cc::Layer> layer) { | 253 void ViewAndroid::SetLayer(scoped_refptr<cc::Layer> layer) { |
254 layer_ = layer; | 254 layer_ = layer; |
255 } | 255 } |
256 | 256 |
257 void ViewAndroid::SetLayout(ViewAndroid::LayoutParams params) { | 257 void ViewAndroid::SetLayout(ViewAndroid::LayoutParams params) { |
258 layout_params_ = params; | 258 layout_params_ = params; |
259 } | 259 } |
260 | 260 |
| 261 void ViewAndroid::ClearThumbnailPlaceholder() { |
| 262 ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate()); |
| 263 if (delegate.is_null()) |
| 264 return; |
| 265 JNIEnv* env = base::android::AttachCurrentThread(); |
| 266 Java_ViewAndroidDelegate_clearThumbnailPlaceholder(env, delegate); |
| 267 } |
| 268 |
261 bool ViewAndroid::StartDragAndDrop(const JavaRef<jstring>& jtext, | 269 bool ViewAndroid::StartDragAndDrop(const JavaRef<jstring>& jtext, |
262 const JavaRef<jobject>& jimage) { | 270 const JavaRef<jobject>& jimage) { |
263 ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate()); | 271 ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate()); |
264 if (delegate.is_null()) | 272 if (delegate.is_null()) |
265 return false; | 273 return false; |
266 JNIEnv* env = base::android::AttachCurrentThread(); | 274 JNIEnv* env = base::android::AttachCurrentThread(); |
267 return Java_ViewAndroidDelegate_startDragAndDrop(env, delegate, jtext, | 275 return Java_ViewAndroidDelegate_startDragAndDrop(env, delegate, jtext, |
268 jimage); | 276 jimage); |
269 } | 277 } |
270 | 278 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 matched = bound.Contains(int_point); | 403 matched = bound.Contains(int_point); |
396 } | 404 } |
397 if (matched && child->HitTest(send_to_client, event, offset_point)) | 405 if (matched && child->HitTest(send_to_client, event, offset_point)) |
398 return true; | 406 return true; |
399 } | 407 } |
400 } | 408 } |
401 return false; | 409 return false; |
402 } | 410 } |
403 | 411 |
404 } // namespace ui | 412 } // namespace ui |
OLD | NEW |