| 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 "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 bool ViewAndroid::StartDragAndDrop(const JavaRef<jstring>& jtext, | 172 bool ViewAndroid::StartDragAndDrop(const JavaRef<jstring>& jtext, |
| 173 const JavaRef<jobject>& jimage) { | 173 const JavaRef<jobject>& jimage) { |
| 174 ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate()); | 174 ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate()); |
| 175 if (delegate.is_null()) | 175 if (delegate.is_null()) |
| 176 return false; | 176 return false; |
| 177 JNIEnv* env = base::android::AttachCurrentThread(); | 177 JNIEnv* env = base::android::AttachCurrentThread(); |
| 178 return Java_ViewAndroidDelegate_startDragAndDrop(env, delegate, jtext, | 178 return Java_ViewAndroidDelegate_startDragAndDrop(env, delegate, jtext, |
| 179 jimage); | 179 jimage); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void ViewAndroid::OnBackgroundColorChanged(SkColor color) { |
| 183 ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate()); |
| 184 if (delegate.is_null()) |
| 185 return; |
| 186 JNIEnv* env = base::android::AttachCurrentThread(); |
| 187 return Java_ViewAndroidDelegate_onBackgroundColorChanged(env, delegate, |
| 188 color); |
| 189 } |
| 190 |
| 182 } // namespace ui | 191 } // namespace ui |
| OLD | NEW |