| 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 "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" | 
| 9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" | 
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 56 } | 56 } | 
| 57 | 57 | 
| 58 void ContextualSearchSceneLayer::UpdateContextualSearchLayer( | 58 void ContextualSearchSceneLayer::UpdateContextualSearchLayer( | 
| 59     JNIEnv* env, | 59     JNIEnv* env, | 
| 60     const JavaParamRef<jobject>& object, | 60     const JavaParamRef<jobject>& object, | 
| 61     jint search_bar_background_resource_id, | 61     jint search_bar_background_resource_id, | 
| 62     jint search_context_resource_id, | 62     jint search_context_resource_id, | 
| 63     jint search_term_resource_id, | 63     jint search_term_resource_id, | 
| 64     jint search_caption_resource_id, | 64     jint search_caption_resource_id, | 
| 65     jint search_bar_shadow_resource_id, | 65     jint search_bar_shadow_resource_id, | 
| 66     jint panel_icon_resource_id, | 66     jint sprite_resource_id, | 
| 67     jint search_provider_icon_sprite_metadata_resource_id, | 67     jint search_provider_icon_sprite_metadata_resource_id, | 
|  | 68     jint static_icon_resource_id, | 
| 68     jint arrow_up_resource_id, | 69     jint arrow_up_resource_id, | 
| 69     jint close_icon_resource_id, | 70     jint close_icon_resource_id, | 
| 70     jint progress_bar_background_resource_id, | 71     jint progress_bar_background_resource_id, | 
| 71     jint progress_bar_resource_id, | 72     jint progress_bar_resource_id, | 
| 72     jint search_promo_resource_id, | 73     jint search_promo_resource_id, | 
| 73     jint peek_promo_ripple_resource_id, | 74     jint peek_promo_ripple_resource_id, | 
| 74     jint peek_promo_text_resource_id, | 75     jint peek_promo_text_resource_id, | 
| 75     jfloat dp_to_px, | 76     jfloat dp_to_px, | 
| 76     jfloat base_page_brightness, | 77     jfloat base_page_brightness, | 
| 77     jfloat base_page_offset, | 78     jfloat base_page_offset, | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 96     jfloat search_term_opacity, | 97     jfloat search_term_opacity, | 
| 97     jfloat search_term_caption_spacing, | 98     jfloat search_term_caption_spacing, | 
| 98     jfloat search_caption_animation_percentage, | 99     jfloat search_caption_animation_percentage, | 
| 99     jboolean search_caption_visible, | 100     jboolean search_caption_visible, | 
| 100     jboolean search_bar_border_visible, | 101     jboolean search_bar_border_visible, | 
| 101     jfloat search_bar_border_height, | 102     jfloat search_bar_border_height, | 
| 102     jboolean search_bar_shadow_visible, | 103     jboolean search_bar_shadow_visible, | 
| 103     jfloat search_bar_shadow_opacity, | 104     jfloat search_bar_shadow_opacity, | 
| 104     jboolean search_provider_icon_sprite_visible, | 105     jboolean search_provider_icon_sprite_visible, | 
| 105     jfloat search_provider_icon_sprite_completion_percentage, | 106     jfloat search_provider_icon_sprite_completion_percentage, | 
|  | 107     jboolean static_icon_visible, | 
| 106     jboolean thumbnail_visible, | 108     jboolean thumbnail_visible, | 
| 107     jfloat thumbnail_visibility_percentage, |  | 
| 108     jint thumbnail_size, |  | 
| 109     jstring j_thumbnail_url, | 109     jstring j_thumbnail_url, | 
|  | 110     jfloat static_image_visibility_percentage, | 
|  | 111     jint static_image_size, | 
| 110     jfloat arrow_icon_opacity, | 112     jfloat arrow_icon_opacity, | 
| 111     jfloat arrow_icon_rotation, | 113     jfloat arrow_icon_rotation, | 
| 112     jfloat close_icon_opacity, | 114     jfloat close_icon_opacity, | 
| 113     jboolean progress_bar_visible, | 115     jboolean progress_bar_visible, | 
| 114     jfloat progress_bar_height, | 116     jfloat progress_bar_height, | 
| 115     jfloat progress_bar_opacity, | 117     jfloat progress_bar_opacity, | 
| 116     jint progress_bar_completion, | 118     jint progress_bar_completion, | 
| 117     jobject j_profile) { | 119     jobject j_profile) { | 
| 118 | 120 | 
| 119   // Load the thumbnail if necessary. | 121   // Load the thumbnail if necessary. | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
| 146 | 148 | 
| 147   // Move the base page contents up. | 149   // Move the base page contents up. | 
| 148   content_container_->SetPosition(gfx::PointF(0.0f, base_page_offset)); | 150   content_container_->SetPosition(gfx::PointF(0.0f, base_page_offset)); | 
| 149 | 151 | 
| 150   contextual_search_layer_->SetProperties( | 152   contextual_search_layer_->SetProperties( | 
| 151       search_bar_background_resource_id, | 153       search_bar_background_resource_id, | 
| 152       search_context_resource_id, | 154       search_context_resource_id, | 
| 153       search_term_resource_id, | 155       search_term_resource_id, | 
| 154       search_caption_resource_id, | 156       search_caption_resource_id, | 
| 155       search_bar_shadow_resource_id, | 157       search_bar_shadow_resource_id, | 
| 156       panel_icon_resource_id, | 158       sprite_resource_id, | 
| 157       search_provider_icon_sprite_metadata_resource_id, | 159       search_provider_icon_sprite_metadata_resource_id, | 
|  | 160       static_icon_resource_id, | 
| 158       arrow_up_resource_id, | 161       arrow_up_resource_id, | 
| 159       close_icon_resource_id, | 162       close_icon_resource_id, | 
| 160       progress_bar_background_resource_id, | 163       progress_bar_background_resource_id, | 
| 161       progress_bar_resource_id, | 164       progress_bar_resource_id, | 
| 162       search_promo_resource_id, | 165       search_promo_resource_id, | 
| 163       peek_promo_ripple_resource_id, | 166       peek_promo_ripple_resource_id, | 
| 164       peek_promo_text_resource_id, | 167       peek_promo_text_resource_id, | 
| 165       dp_to_px, | 168       dp_to_px, | 
| 166       content_layer, | 169       content_layer, | 
| 167       search_promo_visible, | 170       search_promo_visible, | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
| 184       search_term_opacity, | 187       search_term_opacity, | 
| 185       search_term_caption_spacing, | 188       search_term_caption_spacing, | 
| 186       search_caption_animation_percentage, | 189       search_caption_animation_percentage, | 
| 187       search_caption_visible, | 190       search_caption_visible, | 
| 188       search_bar_border_visible, | 191       search_bar_border_visible, | 
| 189       search_bar_border_height, | 192       search_bar_border_height, | 
| 190       search_bar_shadow_visible, | 193       search_bar_shadow_visible, | 
| 191       search_bar_shadow_opacity, | 194       search_bar_shadow_opacity, | 
| 192       search_provider_icon_sprite_visible, | 195       search_provider_icon_sprite_visible, | 
| 193       search_provider_icon_sprite_completion_percentage, | 196       search_provider_icon_sprite_completion_percentage, | 
|  | 197       static_icon_visible, | 
| 194       thumbnail_visible, | 198       thumbnail_visible, | 
| 195       thumbnail_visibility_percentage, | 199       static_image_visibility_percentage, | 
| 196       thumbnail_size, | 200       static_image_size, | 
| 197       arrow_icon_opacity, | 201       arrow_icon_opacity, | 
| 198       arrow_icon_rotation, | 202       arrow_icon_rotation, | 
| 199       close_icon_opacity, | 203       close_icon_opacity, | 
| 200       progress_bar_visible, | 204       progress_bar_visible, | 
| 201       progress_bar_height, | 205       progress_bar_height, | 
| 202       progress_bar_opacity, | 206       progress_bar_opacity, | 
| 203       progress_bar_completion); | 207       progress_bar_completion); | 
| 204 | 208 | 
| 205   // Make the layer visible if it is not already. | 209   // Make the layer visible if it is not already. | 
| 206   contextual_search_layer_->layer()->SetHideLayerAndSubtree(false); | 210   contextual_search_layer_->layer()->SetHideLayerAndSubtree(false); | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 265   ContextualSearchSceneLayer* tree_provider = | 269   ContextualSearchSceneLayer* tree_provider = | 
| 266       new ContextualSearchSceneLayer(env, jobj); | 270       new ContextualSearchSceneLayer(env, jobj); | 
| 267   return reinterpret_cast<intptr_t>(tree_provider); | 271   return reinterpret_cast<intptr_t>(tree_provider); | 
| 268 } | 272 } | 
| 269 | 273 | 
| 270 bool RegisterContextualSearchSceneLayer(JNIEnv* env) { | 274 bool RegisterContextualSearchSceneLayer(JNIEnv* env) { | 
| 271   return RegisterNativesImpl(env); | 275   return RegisterNativesImpl(env); | 
| 272 } | 276 } | 
| 273 | 277 | 
| 274 }  // namespace android | 278 }  // namespace android | 
| OLD | NEW | 
|---|