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

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

Issue 2536223003: Refactor ContentViewClient (3/6) (Closed)
Patch Set: fix tests Created 4 years 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
« ui/android/view_android.h ('K') | « 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« ui/android/view_android.h ('K') | « ui/android/view_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698