| 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/contextual_search_scene_
layer.h" | 5 #include "chrome/browser/android/compositor/scene_layer/contextual_search_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/contextual_search_layer.h" | 8 #include "chrome/browser/android/compositor/layer/contextual_search_layer.h" |
| 9 #include "content/public/browser/android/content_view_core.h" | 9 #include "content/public/browser/android/content_view_core.h" |
| 10 #include "jni/ContextualSearchSceneLayer_jni.h" | 10 #include "jni/ContextualSearchSceneLayer_jni.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 jfloat search_bar_height, | 46 jfloat search_bar_height, |
| 47 jfloat search_context_opacity, | 47 jfloat search_context_opacity, |
| 48 jfloat search_term_opacity, | 48 jfloat search_term_opacity, |
| 49 jboolean search_bar_border_visible, | 49 jboolean search_bar_border_visible, |
| 50 jfloat search_bar_border_y, | 50 jfloat search_bar_border_y, |
| 51 jfloat search_bar_border_height, | 51 jfloat search_bar_border_height, |
| 52 jboolean search_bar_shadow_visible, | 52 jboolean search_bar_shadow_visible, |
| 53 jfloat search_bar_shadow_opacity, | 53 jfloat search_bar_shadow_opacity, |
| 54 jfloat arrow_icon_opacity, | 54 jfloat arrow_icon_opacity, |
| 55 jfloat arrow_icon_rotation, | 55 jfloat arrow_icon_rotation, |
| 56 jboolean close_icon_visible, | |
| 57 jfloat close_icon_opacity, | 56 jfloat close_icon_opacity, |
| 58 jboolean progress_bar_visible, | 57 jboolean progress_bar_visible, |
| 59 jfloat progress_bar_y, | 58 jfloat progress_bar_y, |
| 60 jfloat progress_bar_height, | 59 jfloat progress_bar_height, |
| 61 jfloat progress_bar_opacity, | 60 jfloat progress_bar_opacity, |
| 62 jint progress_bar_completion, | 61 jint progress_bar_completion, |
| 63 jobject jresource_manager) { | 62 jobject jresource_manager) { |
| 64 ui::ResourceManager* resource_manager = | 63 ui::ResourceManager* resource_manager = |
| 65 ui::ResourceManagerImpl::FromJavaObject(jresource_manager); | 64 ui::ResourceManagerImpl::FromJavaObject(jresource_manager); |
| 66 // Lazily construct the contextual search layer, as the feature is only | 65 // Lazily construct the contextual search layer, as the feature is only |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 search_bar_height, | 102 search_bar_height, |
| 104 search_context_opacity, | 103 search_context_opacity, |
| 105 search_term_opacity, | 104 search_term_opacity, |
| 106 search_bar_border_visible, | 105 search_bar_border_visible, |
| 107 search_bar_border_y, | 106 search_bar_border_y, |
| 108 search_bar_border_height, | 107 search_bar_border_height, |
| 109 search_bar_shadow_visible, | 108 search_bar_shadow_visible, |
| 110 search_bar_shadow_opacity, | 109 search_bar_shadow_opacity, |
| 111 arrow_icon_opacity, | 110 arrow_icon_opacity, |
| 112 arrow_icon_rotation, | 111 arrow_icon_rotation, |
| 113 close_icon_visible, | |
| 114 close_icon_opacity, | 112 close_icon_opacity, |
| 115 progress_bar_visible, | 113 progress_bar_visible, |
| 116 progress_bar_y, | 114 progress_bar_y, |
| 117 progress_bar_height, | 115 progress_bar_height, |
| 118 progress_bar_opacity, | 116 progress_bar_opacity, |
| 119 progress_bar_completion); | 117 progress_bar_completion); |
| 120 } | 118 } |
| 121 | 119 |
| 122 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& jobj) { | 120 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& jobj) { |
| 123 // This will automatically bind to the Java object and pass ownership there. | 121 // This will automatically bind to the Java object and pass ownership there. |
| 124 ContextualSearchSceneLayer* tree_provider = | 122 ContextualSearchSceneLayer* tree_provider = |
| 125 new ContextualSearchSceneLayer(env, jobj); | 123 new ContextualSearchSceneLayer(env, jobj); |
| 126 return reinterpret_cast<intptr_t>(tree_provider); | 124 return reinterpret_cast<intptr_t>(tree_provider); |
| 127 } | 125 } |
| 128 | 126 |
| 129 bool RegisterContextualSearchSceneLayer(JNIEnv* env) { | 127 bool RegisterContextualSearchSceneLayer(JNIEnv* env) { |
| 130 return RegisterNativesImpl(env); | 128 return RegisterNativesImpl(env); |
| 131 } | 129 } |
| 132 | 130 |
| 133 } // namespace android | 131 } // namespace android |
| 134 } // namespace chrome | 132 } // namespace chrome |
| OLD | NEW |