| 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_list_scene_layer.h" | 5 #include "chrome/browser/android/compositor/scene_layer/tab_list_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/content_layer.h" | 8 #include "chrome/browser/android/compositor/layer/content_layer.h" |
| 9 #include "chrome/browser/android/compositor/layer/tab_layer.h" | 9 #include "chrome/browser/android/compositor/layer/tab_layer.h" |
| 10 #include "chrome/browser/android/compositor/layer_title_cache.h" | 10 #include "chrome/browser/android/compositor/layer_title_cache.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 return layers_[write_index_++]; | 195 return layers_[write_index_++]; |
| 196 | 196 |
| 197 scoped_refptr<TabLayer> layer = TabLayer::Create( | 197 scoped_refptr<TabLayer> layer = TabLayer::Create( |
| 198 incognito, resource_manager_, layer_title_cache_, tab_content_manager_); | 198 incognito, resource_manager_, layer_title_cache_, tab_content_manager_); |
| 199 layers_.push_back(layer); | 199 layers_.push_back(layer); |
| 200 own_tree_->AddChild(layer->layer()); | 200 own_tree_->AddChild(layer->layer()); |
| 201 write_index_++; | 201 write_index_++; |
| 202 return layer; | 202 return layer; |
| 203 } | 203 } |
| 204 | 204 |
| 205 static jlong Init(JNIEnv* env, jobject jobj) { | 205 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& jobj) { |
| 206 // This will automatically bind to the Java object and pass ownership there. | 206 // This will automatically bind to the Java object and pass ownership there. |
| 207 TabListSceneLayer* scene_layer = new TabListSceneLayer(env, jobj); | 207 TabListSceneLayer* scene_layer = new TabListSceneLayer(env, jobj); |
| 208 return reinterpret_cast<intptr_t>(scene_layer); | 208 return reinterpret_cast<intptr_t>(scene_layer); |
| 209 } | 209 } |
| 210 | 210 |
| 211 bool RegisterTabListSceneLayer(JNIEnv* env) { | 211 bool RegisterTabListSceneLayer(JNIEnv* env) { |
| 212 return RegisterNativesImpl(env); | 212 return RegisterNativesImpl(env); |
| 213 } | 213 } |
| 214 | 214 |
| 215 } // namespace android | 215 } // namespace android |
| 216 } // namespace chrome | 216 } // namespace chrome |
| OLD | NEW |