OLD | NEW |
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 Loading... |
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 |
OLD | NEW |