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

Side by Side Diff: chrome/browser/android/compositor/scene_layer/scene_layer.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/android/compositor/scene_layer/scene_layer.h" 5 #include "chrome/browser/android/compositor/scene_layer/scene_layer.h"
6 6
7 #include "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "content/public/browser/android/compositor.h" 8 #include "content/public/browser/android/compositor.h"
9 #include "jni/SceneLayer_jni.h" 9 #include "jni/SceneLayer_jni.h"
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 bool SceneLayer::ShouldShowBackground() { 53 bool SceneLayer::ShouldShowBackground() {
54 return false; 54 return false;
55 } 55 }
56 56
57 SkColor SceneLayer::GetBackgroundColor() { 57 SkColor SceneLayer::GetBackgroundColor() {
58 return SK_ColorWHITE; 58 return SK_ColorWHITE;
59 } 59 }
60 60
61 static jlong Init(JNIEnv* env, jobject jobj) { 61 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& jobj) {
62 // This will automatically bind to the Java object and pass ownership there. 62 // This will automatically bind to the Java object and pass ownership there.
63 SceneLayer* tree_provider = new SceneLayer(env, jobj); 63 SceneLayer* tree_provider = new SceneLayer(env, jobj);
64 return reinterpret_cast<intptr_t>(tree_provider); 64 return reinterpret_cast<intptr_t>(tree_provider);
65 } 65 }
66 66
67 bool RegisterSceneLayer(JNIEnv* env) { 67 bool RegisterSceneLayer(JNIEnv* env) {
68 return RegisterNativesImpl(env); 68 return RegisterNativesImpl(env);
69 } 69 }
70 70
71 } // namespace android 71 } // namespace android
72 } // namespace chrome 72 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698