OLD | NEW |
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 "chrome/browser/android/compositor/scene_layer/toolbar_scene_layer.h" | 5 #include "chrome/browser/android/compositor/scene_layer/toolbar_scene_layer.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "cc/layers/solid_color_layer.h" | 9 #include "cc/layers/solid_color_layer.h" |
10 #include "chrome/browser/android/compositor/layer/toolbar_layer.h" | 10 #include "chrome/browser/android/compositor/layer/toolbar_layer.h" |
11 #include "content/public/browser/android/compositor.h" | 11 #include "content/public/browser/android/compositor.h" |
12 #include "content/public/browser/android/content_view_core.h" | 12 #include "content/public/browser/android/content_view_core.h" |
13 #include "jni/ToolbarSceneLayer_jni.h" | 13 #include "jni/ToolbarSceneLayer_jni.h" |
14 #include "ui/android/resources/resource_manager_impl.h" | 14 #include "ui/android/resources/resource_manager_impl.h" |
15 #include "ui/gfx/android/java_bitmap.h" | 15 #include "ui/gfx/android/java_bitmap.h" |
16 | 16 |
| 17 using base::android::JavaParamRef; |
| 18 |
17 namespace chrome { | 19 namespace chrome { |
18 namespace android { | 20 namespace android { |
19 | 21 |
20 ToolbarSceneLayer::ToolbarSceneLayer(JNIEnv* env, jobject jobj) | 22 ToolbarSceneLayer::ToolbarSceneLayer(JNIEnv* env, jobject jobj) |
21 : SceneLayer(env, jobj), | 23 : SceneLayer(env, jobj), |
22 should_show_background_(false), | 24 should_show_background_(false), |
23 background_color_(SK_ColorWHITE), | 25 background_color_(SK_ColorWHITE), |
24 content_container_(cc::Layer::Create()) { | 26 content_container_(cc::Layer::Create()) { |
25 layer()->AddChild(content_container_); | 27 layer()->AddChild(content_container_); |
26 layer()->SetIsDrawable(true); | 28 layer()->SetIsDrawable(true); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 new ToolbarSceneLayer(env, jobj); | 121 new ToolbarSceneLayer(env, jobj); |
120 return reinterpret_cast<intptr_t>(toolbar_scene_layer); | 122 return reinterpret_cast<intptr_t>(toolbar_scene_layer); |
121 } | 123 } |
122 | 124 |
123 bool RegisterToolbarSceneLayer(JNIEnv* env) { | 125 bool RegisterToolbarSceneLayer(JNIEnv* env) { |
124 return RegisterNativesImpl(env); | 126 return RegisterNativesImpl(env); |
125 } | 127 } |
126 | 128 |
127 } // namespace android | 129 } // namespace android |
128 } // namespace chrome | 130 } // namespace chrome |
OLD | NEW |