| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 } | 236 } |
| 237 | 237 |
| 238 void ViewAndroid::SetLayer(scoped_refptr<cc::Layer> layer) { | 238 void ViewAndroid::SetLayer(scoped_refptr<cc::Layer> layer) { |
| 239 layer_ = layer; | 239 layer_ = layer; |
| 240 } | 240 } |
| 241 | 241 |
| 242 void ViewAndroid::SetLayout(ViewAndroid::LayoutParams params) { | 242 void ViewAndroid::SetLayout(ViewAndroid::LayoutParams params) { |
| 243 layout_params_ = params; | 243 layout_params_ = params; |
| 244 } | 244 } |
| 245 | 245 |
| 246 void ViewAndroid::ClearThumbnailPlaceholder() { |
| 247 ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate()); |
| 248 if (delegate.is_null()) |
| 249 return; |
| 250 JNIEnv* env = base::android::AttachCurrentThread(); |
| 251 Java_ViewAndroidDelegate_clearThumbnailPlaceholder(env, delegate); |
| 252 } |
| 253 |
| 246 bool ViewAndroid::StartDragAndDrop(const JavaRef<jstring>& jtext, | 254 bool ViewAndroid::StartDragAndDrop(const JavaRef<jstring>& jtext, |
| 247 const JavaRef<jobject>& jimage) { | 255 const JavaRef<jobject>& jimage) { |
| 248 ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate()); | 256 ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate()); |
| 249 if (delegate.is_null()) | 257 if (delegate.is_null()) |
| 250 return false; | 258 return false; |
| 251 JNIEnv* env = base::android::AttachCurrentThread(); | 259 JNIEnv* env = base::android::AttachCurrentThread(); |
| 252 return Java_ViewAndroidDelegate_startDragAndDrop(env, delegate, jtext, | 260 return Java_ViewAndroidDelegate_startDragAndDrop(env, delegate, jtext, |
| 253 jimage); | 261 jimage); |
| 254 } | 262 } |
| 255 | 263 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 matched = bound.Contains(int_point); | 388 matched = bound.Contains(int_point); |
| 381 } | 389 } |
| 382 if (matched && child->HitTest(send_to_client, event, offset_point)) | 390 if (matched && child->HitTest(send_to_client, event, offset_point)) |
| 383 return true; | 391 return true; |
| 384 } | 392 } |
| 385 } | 393 } |
| 386 return false; | 394 return false; |
| 387 } | 395 } |
| 388 | 396 |
| 389 } // namespace ui | 397 } // namespace ui |
| OLD | NEW |