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/tab_strip_scene_layer.h" | 5 #include "chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "chrome/browser/android/compositor/layer/tab_handle_layer.h" | 8 #include "chrome/browser/android/compositor/layer/tab_handle_layer.h" |
9 #include "chrome/browser/android/compositor/layer_title_cache.h" | 9 #include "chrome/browser/android/compositor/layer_title_cache.h" |
10 #include "content/public/browser/android/compositor.h" | 10 #include "content/public/browser/android/compositor.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 return tab_handle_layers_[write_index_++]; | 209 return tab_handle_layers_[write_index_++]; |
210 | 210 |
211 scoped_refptr<TabHandleLayer> layer_tree = | 211 scoped_refptr<TabHandleLayer> layer_tree = |
212 TabHandleLayer::Create(layer_title_cache); | 212 TabHandleLayer::Create(layer_title_cache); |
213 tab_handle_layers_.push_back(layer_tree); | 213 tab_handle_layers_.push_back(layer_tree); |
214 tab_strip_layer_->AddChild(layer_tree->layer()); | 214 tab_strip_layer_->AddChild(layer_tree->layer()); |
215 write_index_++; | 215 write_index_++; |
216 return layer_tree; | 216 return layer_tree; |
217 } | 217 } |
218 | 218 |
219 static jlong Init(JNIEnv* env, jobject jobj) { | 219 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& jobj) { |
220 // This will automatically bind to the Java object and pass ownership there. | 220 // This will automatically bind to the Java object and pass ownership there. |
221 TabStripSceneLayer* scene_layer = new TabStripSceneLayer(env, jobj); | 221 TabStripSceneLayer* scene_layer = new TabStripSceneLayer(env, jobj); |
222 return reinterpret_cast<intptr_t>(scene_layer); | 222 return reinterpret_cast<intptr_t>(scene_layer); |
223 } | 223 } |
224 | 224 |
225 bool RegisterTabStripSceneLayer(JNIEnv* env) { | 225 bool RegisterTabStripSceneLayer(JNIEnv* env) { |
226 return RegisterNativesImpl(env); | 226 return RegisterNativesImpl(env); |
227 } | 227 } |
228 | 228 |
229 } // namespace android | 229 } // namespace android |
230 } // namespace chrome | 230 } // namespace chrome |
OLD | NEW |