Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.cc

Issue 1379183003: [ContextualSearch] Adds long press promo for Contextual Search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing more comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
27 jint search_bar_background_resource_id, 27 jint search_bar_background_resource_id,
28 jint search_context_resource_id, 28 jint search_context_resource_id,
29 jint search_term_resource_id, 29 jint search_term_resource_id,
30 jint search_bar_shadow_resource_id, 30 jint search_bar_shadow_resource_id,
31 jint search_provider_icon_resource_id, 31 jint search_provider_icon_resource_id,
32 jint arrow_up_resource_id, 32 jint arrow_up_resource_id,
33 jint close_icon_resource_id, 33 jint close_icon_resource_id,
34 jint progress_bar_background_resource_id, 34 jint progress_bar_background_resource_id,
35 jint progress_bar_resource_id, 35 jint progress_bar_resource_id,
36 jint search_promo_resource_id, 36 jint search_promo_resource_id,
37 jint peek_promo_ripple_resource_id,
38 jint peek_promo_text_resource_id,
37 jobject jcontent_view_core, 39 jobject jcontent_view_core,
38 jboolean search_promo_visible, 40 jboolean search_promo_visible,
39 jfloat search_promo_height, 41 jfloat search_promo_height,
40 jfloat search_promo_opacity, 42 jfloat search_promo_opacity,
43 jboolean search_peek_promo_visible,
44 jfloat search_peek_promo_height,
45 jfloat search_peek_promo_padding,
46 jfloat search_peek_promo_ripple_width,
47 jfloat search_peek_promo_ripple_opacity,
48 jfloat search_peek_promo_text_opacity,
41 jfloat search_panel_X, 49 jfloat search_panel_X,
42 jfloat search_panel_y, 50 jfloat search_panel_y,
43 jfloat search_panel_width, 51 jfloat search_panel_width,
44 jfloat search_panel_height, 52 jfloat search_panel_height,
45 jfloat search_bar_margin_side, 53 jfloat search_bar_margin_side,
46 jfloat search_bar_height, 54 jfloat search_bar_height,
47 jfloat search_context_opacity, 55 jfloat search_context_opacity,
48 jfloat search_term_opacity, 56 jfloat search_term_opacity,
49 jboolean search_bar_border_visible, 57 jboolean search_bar_border_visible,
50 jfloat search_bar_border_y,
51 jfloat search_bar_border_height, 58 jfloat search_bar_border_height,
52 jboolean search_bar_shadow_visible, 59 jboolean search_bar_shadow_visible,
53 jfloat search_bar_shadow_opacity, 60 jfloat search_bar_shadow_opacity,
54 jfloat arrow_icon_opacity, 61 jfloat arrow_icon_opacity,
55 jfloat arrow_icon_rotation, 62 jfloat arrow_icon_rotation,
56 jfloat close_icon_opacity, 63 jfloat close_icon_opacity,
57 jboolean progress_bar_visible, 64 jboolean progress_bar_visible,
58 jfloat progress_bar_y,
59 jfloat progress_bar_height, 65 jfloat progress_bar_height,
60 jfloat progress_bar_opacity, 66 jfloat progress_bar_opacity,
61 jint progress_bar_completion, 67 jint progress_bar_completion,
62 jobject jresource_manager) { 68 jobject jresource_manager) {
63 ui::ResourceManager* resource_manager = 69 ui::ResourceManager* resource_manager =
64 ui::ResourceManagerImpl::FromJavaObject(jresource_manager); 70 ui::ResourceManagerImpl::FromJavaObject(jresource_manager);
65 // Lazily construct the contextual search layer, as the feature is only 71 // Lazily construct the contextual search layer, as the feature is only
66 // conditionally enabled. 72 // conditionally enabled.
67 if (!contextual_search_layer_.get()) { 73 if (!contextual_search_layer_.get()) {
68 if (!resource_manager) 74 if (!resource_manager)
(...skipping 14 matching lines...) Expand all
83 search_bar_background_resource_id, 89 search_bar_background_resource_id,
84 search_context_resource_id, 90 search_context_resource_id,
85 search_term_resource_id, 91 search_term_resource_id,
86 search_bar_shadow_resource_id, 92 search_bar_shadow_resource_id,
87 search_provider_icon_resource_id, 93 search_provider_icon_resource_id,
88 arrow_up_resource_id, 94 arrow_up_resource_id,
89 close_icon_resource_id, 95 close_icon_resource_id,
90 progress_bar_background_resource_id, 96 progress_bar_background_resource_id,
91 progress_bar_resource_id, 97 progress_bar_resource_id,
92 search_promo_resource_id, 98 search_promo_resource_id,
99 peek_promo_ripple_resource_id,
100 peek_promo_text_resource_id,
93 content_view_core, 101 content_view_core,
94 search_promo_visible, 102 search_promo_visible,
95 search_promo_height, 103 search_promo_height,
96 search_promo_opacity, 104 search_promo_opacity,
105 search_peek_promo_visible,
106 search_peek_promo_height,
107 search_peek_promo_padding,
108 search_peek_promo_ripple_width,
109 search_peek_promo_ripple_opacity,
110 search_peek_promo_text_opacity,
97 search_panel_X, 111 search_panel_X,
98 search_panel_y, 112 search_panel_y,
99 search_panel_width, 113 search_panel_width,
100 search_panel_height, 114 search_panel_height,
101 search_bar_margin_side, 115 search_bar_margin_side,
102 search_bar_height, 116 search_bar_height,
103 search_context_opacity, 117 search_context_opacity,
104 search_term_opacity, 118 search_term_opacity,
105 search_bar_border_visible, 119 search_bar_border_visible,
106 search_bar_border_y,
107 search_bar_border_height, 120 search_bar_border_height,
108 search_bar_shadow_visible, 121 search_bar_shadow_visible,
109 search_bar_shadow_opacity, 122 search_bar_shadow_opacity,
110 arrow_icon_opacity, 123 arrow_icon_opacity,
111 arrow_icon_rotation, 124 arrow_icon_rotation,
112 close_icon_opacity, 125 close_icon_opacity,
113 progress_bar_visible, 126 progress_bar_visible,
114 progress_bar_y,
115 progress_bar_height, 127 progress_bar_height,
116 progress_bar_opacity, 128 progress_bar_opacity,
117 progress_bar_completion); 129 progress_bar_completion);
118 } 130 }
119 131
120 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& jobj) { 132 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& jobj) {
121 // This will automatically bind to the Java object and pass ownership there. 133 // This will automatically bind to the Java object and pass ownership there.
122 ContextualSearchSceneLayer* tree_provider = 134 ContextualSearchSceneLayer* tree_provider =
123 new ContextualSearchSceneLayer(env, jobj); 135 new ContextualSearchSceneLayer(env, jobj);
124 return reinterpret_cast<intptr_t>(tree_provider); 136 return reinterpret_cast<intptr_t>(tree_provider);
125 } 137 }
126 138
127 bool RegisterContextualSearchSceneLayer(JNIEnv* env) { 139 bool RegisterContextualSearchSceneLayer(JNIEnv* env) {
128 return RegisterNativesImpl(env); 140 return RegisterNativesImpl(env);
129 } 141 }
130 142
131 } // namespace android 143 } // namespace android
132 } // namespace chrome 144 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698