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/reader_mode_scene_layer.
h" | 5 #include "chrome/browser/android/compositor/scene_layer/reader_mode_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/reader_mode_layer.h" | 10 #include "chrome/browser/android/compositor/layer/reader_mode_layer.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 47 } |
48 | 48 |
49 void ReaderModeSceneLayer::SetResourceIds( | 49 void ReaderModeSceneLayer::SetResourceIds( |
50 JNIEnv* env, | 50 JNIEnv* env, |
51 const JavaParamRef<jobject>& object, | 51 const JavaParamRef<jobject>& object, |
52 jint text_resource_id, | 52 jint text_resource_id, |
53 jint bar_background_resource_id, | 53 jint bar_background_resource_id, |
54 jint bar_shadow_resource_id, | 54 jint bar_shadow_resource_id, |
55 jint panel_icon_resource_id, | 55 jint panel_icon_resource_id, |
56 jint close_icon_resource_id) { | 56 jint close_icon_resource_id) { |
57 | |
58 reader_mode_layer_->SetResourceIds( | 57 reader_mode_layer_->SetResourceIds( |
59 text_resource_id, | 58 text_resource_id, bar_background_resource_id, bar_shadow_resource_id, |
60 bar_background_resource_id, | 59 panel_icon_resource_id, close_icon_resource_id, 0); |
61 bar_shadow_resource_id, | |
62 panel_icon_resource_id, | |
63 close_icon_resource_id); | |
64 } | 60 } |
65 | 61 |
66 void ReaderModeSceneLayer::Update( | 62 void ReaderModeSceneLayer::Update( |
67 JNIEnv* env, | 63 JNIEnv* env, |
68 const JavaParamRef<jobject>& object, | 64 const JavaParamRef<jobject>& object, |
69 jfloat dp_to_px, | 65 jfloat dp_to_px, |
70 jfloat base_page_brightness, | 66 jfloat base_page_brightness, |
71 jfloat base_page_offset, | 67 jfloat base_page_offset, |
72 const JavaParamRef<jobject>& jweb_contents, | 68 const JavaParamRef<jobject>& jweb_contents, |
73 jfloat panel_X, | 69 jfloat panel_X, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 ReaderModeSceneLayer* reader_mode_scene_layer = | 151 ReaderModeSceneLayer* reader_mode_scene_layer = |
156 new ReaderModeSceneLayer(env, jobj); | 152 new ReaderModeSceneLayer(env, jobj); |
157 return reinterpret_cast<intptr_t>(reader_mode_scene_layer); | 153 return reinterpret_cast<intptr_t>(reader_mode_scene_layer); |
158 } | 154 } |
159 | 155 |
160 bool RegisterReaderModeSceneLayer(JNIEnv* env) { | 156 bool RegisterReaderModeSceneLayer(JNIEnv* env) { |
161 return RegisterNativesImpl(env); | 157 return RegisterNativesImpl(env); |
162 } | 158 } |
163 | 159 |
164 } // namespace android | 160 } // namespace android |
OLD | NEW |