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

Issue 1337703002: [Contextual Search] Add support for crushed sprites and animate the search provider icon (Closed)

Created:
5 years, 3 months ago by Theresa
Modified:
5 years, 1 month ago
CC:
chromium-reviews, Donn Denman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Contextual Search] Add support for crushed sprites and animate the search provider icon Adds support for loading and drawing a crushed sprite resource. Animates the search provider icon using a crushed sprite sheet every time on long press if the user has never opened the panel before and once a day on tap. BUG=529915 Committed: https://crrev.com/af303ba5a35c1e608d6e92cc2fead270cf819274 Cr-Commit-Position: refs/heads/master@{#356977}

Patch Set 1 #

Total comments: 30

Patch Set 2 : Changes from reviews #

Total comments: 6

Patch Set 3 : Crushed sprites #

Patch Set 4 : Changes from self-review #

Total comments: 6

Patch Set 5 : Changes from newt@ review #

Total comments: 28

Patch Set 6 : Changes from reviews, add integer-array for other resolutions #

Patch Set 7 : Rebase #

Total comments: 9

Patch Set 8 : Rename xml files -> google_icon_sprite_frames, other small changes #

Patch Set 9 : Manually scale crushed sprites #

Total comments: 1

Patch Set 10 : Adapt code to design doc #

Patch Set 11 : Cleanup from self-review #

Patch Set 12 : Fix findbugs & rebase #

Patch Set 13 : Another findbugs fix #

Patch Set 14 : Add unittest for new jni_array method #

Patch Set 15 : Add TODO's for other planned tests #

Total comments: 88

Patch Set 16 : Changes from last dtrainor@ review #

Total comments: 22

Patch Set 17 : More changes from dtrainor@ review #

Total comments: 12

Patch Set 18 : Rebase #

Patch Set 19 : Add back support for static icon #

Patch Set 20 : Add resource_manager_impl_unittest #

Patch Set 21 : Small changes from reviews #

Total comments: 16

Patch Set 22 : Changes from rmcilroy & pedrosimonetti reviews #

Patch Set 23 : Update comment #

Patch Set 24 : Rebase #

Patch Set 25 : Fix clang error #

Patch Set 26 : Fix CrushedSpriteTest (progaurd was removing a method) #

Total comments: 12

Patch Set 27 : Rebase #

Patch Set 28 : Very small changes from last pedrosimonneti@ review #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+1498 lines, -89 lines) Patch
M base/android/jni_array.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +7 lines, -0 lines 0 comments Download
M base/android/jni_array.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +17 lines, -1 line 5 comments Download
M base/android/jni_array_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +56 lines, -5 lines 0 comments Download
M build/android/lint/suppressions.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +4 lines, -1 line 0 comments Download
D chrome/android/java/res/drawable-hdpi/google_icon.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-mdpi/google_icon.png View Binary file 0 comments Download
A chrome/android/java/res/drawable-mdpi/google_icon_sprite.png View 1 2 Binary file 0 comments Download
D chrome/android/java/res/drawable-xhdpi/google_icon.png View Binary file 0 comments Download
D chrome/android/java/res/drawable-xxhdpi/google_icon.png View Binary file 0 comments Download
A chrome/android/java/res/drawable-xxhdpi/google_icon_sprite.png View 1 2 9 Binary file 0 comments Download
D chrome/android/java/res/drawable-xxxhdpi/google_icon.png View Binary file 0 comments Download
A chrome/android/java/res/raw/google_icon_sprite.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +58 lines, -0 lines 0 comments Download
M chrome/android/java/res/values/dimens.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +3 lines, -0 lines 1 comment Download
A chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchIconSpriteControl.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +135 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +26 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelAnimation.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 8 chunks +19 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +34 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java View 1 2 3 4 5 6 7 8 9 2 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/android/compositor/layer/contextual_search_layer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/android/compositor/layer/contextual_search_layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 10 chunks +89 lines, -29 lines 0 comments Download
A chrome/browser/android/compositor/layer/crushed_sprite_layer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +62 lines, -0 lines 0 comments Download
A chrome/browser/android/compositor/layer/crushed_sprite_layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +118 lines, -0 lines 0 comments Download
M chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +50 lines, -44 lines 0 comments Download
M chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 7 chunks +14 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -0 lines 0 comments Download
M ui/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/resources/ResourceManager.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +36 lines, -1 line 0 comments Download
A ui/android/java/src/org/chromium/ui/resources/sprites/CrushedSpriteResource.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +263 lines, -0 lines 0 comments Download
A ui/android/java/src/org/chromium/ui/resources/sprites/CrushedSpriteResourceLoader.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +50 lines, -0 lines 0 comments Download
A ui/android/javatests/src/org/chromium/ui/resources/sprites/CrushedSpriteResourceTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +98 lines, -0 lines 0 comments Download
A ui/android/resources/crushed_sprite_resource.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +79 lines, -0 lines 0 comments Download
A ui/android/resources/crushed_sprite_resource.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +57 lines, -0 lines 0 comments Download
M ui/android/resources/resource_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +11 lines, -1 line 0 comments Download
M ui/android/resources/resource_manager_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +23 lines, -0 lines 0 comments Download
M ui/android/resources/resource_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +108 lines, -0 lines 0 comments Download
M ui/android/resources/resource_manager_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +39 lines, -0 lines 0 comments Download
M ui/android/ui_android.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 65 (9 generated)
Theresa
ptal newt@ - chrome/android/java/res & ChromePreferenceManager.java pedrosimonetti@ - chrome/android/java/src/org/chromium/chrome/browser/* changwan@ - chrome/android/compositor/*
5 years, 3 months ago (2015-09-11 00:24:18 UTC) #2
pedro (no code reviews)
Let's wait for the new assets before submitting this change, since they are unnecessarily bigger ...
5 years, 3 months ago (2015-09-11 22:49:42 UTC) #3
newt (away)
Please run tools/resources/optimize-png-files.sh on the images, especially since they're so large. e.g. > tools/resources/optimize-png-files.sh path/to/image.png ...
5 years, 3 months ago (2015-09-11 23:01:15 UTC) #4
Changwan Ryu
https://codereview.chromium.org/1337703002/diff/1/chrome/browser/android/compositor/layer/contextual_search_layer.cc File chrome/browser/android/compositor/layer/contextual_search_layer.cc (right): https://codereview.chromium.org/1337703002/diff/1/chrome/browser/android/compositor/layer/contextual_search_layer.cc#newcode163 chrome/browser/android/compositor/layer/contextual_search_layer.cc:163: float search_provider_icon_sprite_width = Nit: How about just naming them ...
5 years, 3 months ago (2015-09-14 01:51:30 UTC) #5
Theresa
I ran tools/resources/optimize-png-files.sh on the sprite sheets - we got a 2% average reduction. https://codereview.chromium.org/1337703002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelAnimation.java ...
5 years, 3 months ago (2015-09-14 19:48:25 UTC) #6
newt (away)
chrome/android/java/res and ChromePreferenceManager.java lgtm > I ran tools/resources/optimize-png-files.sh on the sprite sheets - we got ...
5 years, 3 months ago (2015-09-14 19:59:29 UTC) #7
Changwan Ryu
https://codereview.chromium.org/1337703002/diff/20001/chrome/browser/android/compositor/layer/contextual_search_layer.cc File chrome/browser/android/compositor/layer/contextual_search_layer.cc (right): https://codereview.chromium.org/1337703002/diff/20001/chrome/browser/android/compositor/layer/contextual_search_layer.cc#newcode153 chrome/browser/android/compositor/layer/contextual_search_layer.cc:153: search_provider_icon_sprites_per_row_ = Actually, you don't need to keep these ...
5 years, 3 months ago (2015-09-17 06:10:08 UTC) #8
Theresa
ptal - this has changed significantly. The original sprite sheets would have increased APK size ...
5 years, 3 months ago (2015-09-25 00:58:14 UTC) #9
newt (away)
Wow, the crushed sprites are... interesting looking :) I reviewed the resources, lint suppressions, and ...
5 years, 3 months ago (2015-09-25 01:21:27 UTC) #10
Theresa
https://codereview.chromium.org/1337703002/diff/60001/build/android/lint/suppressions.xml File build/android/lint/suppressions.xml (right): https://codereview.chromium.org/1337703002/diff/60001/build/android/lint/suppressions.xml#newcode57 build/android/lint/suppressions.xml:57: <ignore path="chrome/android/java/res/drawable-mdpi"/> On 2015/09/25 01:21:27, newt wrote: > nooooooooo ...
5 years, 3 months ago (2015-09-25 01:52:08 UTC) #11
newt (away)
https://codereview.chromium.org/1337703002/diff/80001/build/android/lint/suppressions.xml File build/android/lint/suppressions.xml (right): https://codereview.chromium.org/1337703002/diff/80001/build/android/lint/suppressions.xml#newcode57 build/android/lint/suppressions.xml:57: <ignore regexp=".*google_icon_sprite.png.*"/> Much better :D > Is the new ...
5 years, 3 months ago (2015-09-25 02:18:44 UTC) #12
pedro (no code reviews)
Hey Theresa, here are my comments. Overall, I think this CL is looking good, but ...
5 years, 2 months ago (2015-09-29 01:14:40 UTC) #13
Theresa
On 2015/09/25 02:18:44, newt wrote: > https://codereview.chromium.org/1337703002/diff/80001/build/android/lint/suppressions.xml > File build/android/lint/suppressions.xml (right): > > https://codereview.chromium.org/1337703002/diff/80001/build/android/lint/suppressions.xml#newcode57 > ...
5 years, 2 months ago (2015-09-29 17:24:28 UTC) #14
David Trainor- moved to gerrit
Comments, but in general looks good to me. lgtm, but wait for Pedro before landing ...
5 years, 2 months ago (2015-09-29 22:23:09 UTC) #16
pedro (no code reviews)
Took another look and am including one more comment. https://codereview.chromium.org/1337703002/diff/80001/chrome/browser/android/compositor/layer/crushed_sprite_layer.h File chrome/browser/android/compositor/layer/crushed_sprite_layer.h (right): https://codereview.chromium.org/1337703002/diff/80001/chrome/browser/android/compositor/layer/crushed_sprite_layer.h#newcode58 chrome/browser/android/compositor/layer/crushed_sprite_layer.h:58: ...
5 years, 2 months ago (2015-09-30 16:02:46 UTC) #17
Theresa
ptal - addressed or responded to all review comments. newt@ - there's a new lint ...
5 years, 2 months ago (2015-10-01 01:57:31 UTC) #18
Theresa
+enne@ for OWNERS on adding +cc/playback to chrome/browser/android/compositor/DEPS
5 years, 2 months ago (2015-10-01 01:58:48 UTC) #20
pedro (no code reviews)
lgtm Thanks Theresa! Just a couple more nits, but it looks good to me. https://codereview.chromium.org/1337703002/diff/120001/chrome/android/java/res/values-ldpi/contextual_search_crushed_sprite_frames.xml ...
5 years, 2 months ago (2015-10-01 16:38:35 UTC) #21
newt (away)
https://codereview.chromium.org/1337703002/diff/120001/build/android/lint/suppressions.xml File build/android/lint/suppressions.xml (right): https://codereview.chromium.org/1337703002/diff/120001/build/android/lint/suppressions.xml#newcode57 build/android/lint/suppressions.xml:57: <ignore regexp=".*google_icon_sprite.png.*"/> Just confirming: this regex won't cause other ...
5 years, 2 months ago (2015-10-01 17:19:46 UTC) #22
Theresa
https://codereview.chromium.org/1337703002/diff/120001/build/android/lint/suppressions.xml File build/android/lint/suppressions.xml (right): https://codereview.chromium.org/1337703002/diff/120001/build/android/lint/suppressions.xml#newcode57 build/android/lint/suppressions.xml:57: <ignore regexp=".*google_icon_sprite.png.*"/> On 2015/10/01 17:19:46, newt wrote: > Just ...
5 years, 2 months ago (2015-10-01 17:57:34 UTC) #23
newt (away)
Re: not animating ldpi. What will happen on tvdpi devices or future xxxxhdpi devices or ...
5 years, 2 months ago (2015-10-01 18:18:04 UTC) #24
Theresa
On 2015/10/01 18:18:04, newt wrote: > Re: not animating ldpi. What will happen on tvdpi ...
5 years, 2 months ago (2015-10-01 19:01:51 UTC) #25
Theresa
On 2015/10/01 19:01:51, Theresa Wellington wrote: > On 2015/10/01 18:18:04, newt wrote: > > Re: ...
5 years, 2 months ago (2015-10-01 19:02:08 UTC) #26
Theresa
newt@ / pedrosimonetti@ - ptal My efforts to avoid manual scaling were to no avail, ...
5 years, 2 months ago (2015-10-01 22:25:59 UTC) #27
pedro (no code reviews)
Mmmm... this animation is really tricky. I would vote for putting it behind a flag, ...
5 years, 2 months ago (2015-10-01 23:16:23 UTC) #28
Theresa
Update: I'm not going to try to push this through before the branch (the manual ...
5 years, 2 months ago (2015-10-02 00:26:37 UTC) #29
Theresa
ptal - changed implementation to match design doc: https://docs.google.com/document/d/1HcIDfdcc8GPO29D6756eZ8N_hp4jxmQaCRYktJZUPrQ/edit# For the most part, everything was ...
5 years, 2 months ago (2015-10-10 02:05:44 UTC) #30
Theresa
On 2015/10/10 02:05:44, Theresa Wellington wrote: > ptal - changed implementation to match design doc: ...
5 years, 2 months ago (2015-10-10 02:06:51 UTC) #31
David Trainor- moved to gerrit
https://chromiumcodereview.appspot.com/1337703002/diff/270001/base/android/jni_array.cc File base/android/jni_array.cc (right): https://chromiumcodereview.appspot.com/1337703002/diff/270001/base/android/jni_array.cc#newcode249 base/android/jni_array.cc:249: jint* ints = env->GetIntArrayElements(int_array.obj(), NULL); nullptr https://chromiumcodereview.appspot.com/1337703002/diff/270001/base/android/jni_array_unittest.cc File base/android/jni_array_unittest.cc ...
5 years, 2 months ago (2015-10-15 21:04:58 UTC) #32
Theresa
Thank you for all of the commits David. Fixed some stuff, responded to some other ...
5 years, 2 months ago (2015-10-24 00:06:46 UTC) #35
Theresa
Thank you for all of the commits David. Fixed some stuff, responded to some other ...
5 years, 2 months ago (2015-10-24 00:06:46 UTC) #36
Theresa
Thank you for all of the comments David. Fixed some stuff, responded to some other ...
5 years, 2 months ago (2015-10-24 00:07:40 UTC) #37
Theresa
https://codereview.chromium.org/1337703002/diff/270001/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchSearchProviderIconSpriteControl.java File chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchSearchProviderIconSpriteControl.java (right): https://codereview.chromium.org/1337703002/diff/270001/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchSearchProviderIconSpriteControl.java#newcode21 chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchSearchProviderIconSpriteControl.java:21: private static final int LAST_SPRITE_FRAME = 18; On 2015/10/24 ...
5 years, 2 months ago (2015-10-24 00:24:36 UTC) #38
pedro (no code reviews)
Just a couple comments regarding David's feedback on the previous patch. I still need to ...
5 years, 2 months ago (2015-10-24 00:29:00 UTC) #39
David Trainor- moved to gerrit
https://chromiumcodereview.appspot.com/1337703002/diff/270001/chrome/browser/android/compositor/layer/crushed_sprite_layer.cc File chrome/browser/android/compositor/layer/crushed_sprite_layer.cc (right): https://chromiumcodereview.appspot.com/1337703002/diff/270001/chrome/browser/android/compositor/layer/crushed_sprite_layer.cc#newcode43 chrome/browser/android/compositor/layer/crushed_sprite_layer.cc:43: !resource_->GetBitmapForLastFrame().empty()) { On 2015/10/24 00:06:44, Theresa Wellington wrote: > ...
5 years, 1 month ago (2015-10-27 15:14:47 UTC) #40
Theresa
I think this most recent patchset addresses all of David's comments. As discussed with Pedro ...
5 years, 1 month ago (2015-10-27 19:48:03 UTC) #41
pedro (no code reviews)
Here are some more comments. Will take a look at your most recent patch next. ...
5 years, 1 month ago (2015-10-27 20:32:00 UTC) #42
David Trainor- moved to gerrit
lgtm % pedro's comments https://chromiumcodereview.appspot.com/1337703002/diff/310001/chrome/browser/android/compositor/layer/crushed_sprite_layer.cc File chrome/browser/android/compositor/layer/crushed_sprite_layer.cc (right): https://chromiumcodereview.appspot.com/1337703002/diff/310001/chrome/browser/android/compositor/layer/crushed_sprite_layer.cc#newcode36 chrome/browser/android/compositor/layer/crushed_sprite_layer.cc:36: if (frame_count_ == -1 || ...
5 years, 1 month ago (2015-10-27 21:00:43 UTC) #43
Theresa
Added a test to resource_manager_impl_unittests. I'll finish addressing comments this evening after I get back ...
5 years, 1 month ago (2015-10-27 21:24:49 UTC) #44
Theresa
https://chromiumcodereview.appspot.com/1337703002/diff/290001/chrome/android/java/res/values/dimens.xml File chrome/android/java/res/values/dimens.xml (right): https://chromiumcodereview.appspot.com/1337703002/diff/290001/chrome/android/java/res/values/dimens.xml#newcode80 chrome/android/java/res/values/dimens.xml:80: <dimen name="contextual_search_sprite_size">36dp</dimen> On 2015/10/27 20:32:00, pedrosimonetti wrote: > Is ...
5 years, 1 month ago (2015-10-28 02:01:53 UTC) #45
Theresa
+rmcilroy@ - ptal at base/android/* changes. I added a method (and a test) for converting ...
5 years, 1 month ago (2015-10-28 02:03:43 UTC) #47
rmcilroy
https://chromiumcodereview.appspot.com/1337703002/diff/390001/base/android/jni_array.cc File base/android/jni_array.cc (right): https://chromiumcodereview.appspot.com/1337703002/diff/390001/base/android/jni_array.cc#newcode232 base/android/jni_array.cc:232: jbyte* bytes = env->GetByteArrayElements(bytes_array.obj(), NULL); nit - please make ...
5 years, 1 month ago (2015-10-28 11:22:12 UTC) #48
pedro (no code reviews)
A few more comments. https://codereview.chromium.org/1337703002/diff/390001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java File chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java (right): https://codereview.chromium.org/1337703002/diff/390001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java#newcode512 chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java:512: ContextualSearchPolicy.getInstance(mActivity).shouldAnimateSearchProviderIcon( ContextualSearchPolicy.getInstance(mActivity) --> mPolicy https://codereview.chromium.org/1337703002/diff/390001/chrome/browser/android/compositor/layer/contextual_search_layer.cc ...
5 years, 1 month ago (2015-10-28 18:31:14 UTC) #49
Theresa
rmcilroy@ & pedrosimonetti@ - addressed review comments, please take another look newt@ - ptal at ...
5 years, 1 month ago (2015-10-28 22:20:59 UTC) #50
rmcilroy
base/android LGTM, thanks.
5 years, 1 month ago (2015-10-29 11:19:22 UTC) #51
pedro (no code reviews)
lgtm Just a few more comments, but this change is looking good to me. Thanks ...
5 years, 1 month ago (2015-10-29 17:01:42 UTC) #52
Theresa
https://codereview.chromium.org/1337703002/diff/490001/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchIconSpriteControl.java File chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchIconSpriteControl.java (right): https://codereview.chromium.org/1337703002/diff/490001/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchIconSpriteControl.java#newcode43 chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchIconSpriteControl.java:43: private float mSize; On 2015/10/29 17:01:42, pedrosimonetti wrote: > ...
5 years, 1 month ago (2015-10-29 17:44:09 UTC) #53
newt (away)
still lgtm https://codereview.chromium.org/1337703002/diff/530001/chrome/android/java/res/values/dimens.xml File chrome/android/java/res/values/dimens.xml (right): https://codereview.chromium.org/1337703002/diff/530001/chrome/android/java/res/values/dimens.xml#newcode80 chrome/android/java/res/values/dimens.xml:80: <!-- TODO(twellington): Consider moving this to the ...
5 years, 1 month ago (2015-10-29 21:44:37 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1337703002/530001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1337703002/530001
5 years, 1 month ago (2015-10-29 21:51:20 UTC) #57
commit-bot: I haz the power
Committed patchset #28 (id:530001)
5 years, 1 month ago (2015-10-29 23:16:05 UTC) #58
commit-bot: I haz the power
Patchset 28 (id:??) landed as https://crrev.com/af303ba5a35c1e608d6e92cc2fead270cf819274 Cr-Commit-Position: refs/heads/master@{#356977}
5 years, 1 month ago (2015-10-29 23:16:47 UTC) #59
Dmitry Skiba
https://codereview.chromium.org/1337703002/diff/530001/base/android/jni_array.cc File base/android/jni_array.cc (right): https://codereview.chromium.org/1337703002/diff/530001/base/android/jni_array.cc#newcode248 base/android/jni_array.cc:248: jint* ints = env->GetIntArrayElements(int_array.obj(), nullptr); Hmm, do we really ...
5 years, 1 month ago (2015-10-30 16:46:19 UTC) #61
Theresa
https://codereview.chromium.org/1337703002/diff/530001/base/android/jni_array.cc File base/android/jni_array.cc (right): https://codereview.chromium.org/1337703002/diff/530001/base/android/jni_array.cc#newcode248 base/android/jni_array.cc:248: jint* ints = env->GetIntArrayElements(int_array.obj(), nullptr); On 2015/10/30 16:46:19, Dmitry ...
5 years, 1 month ago (2015-10-30 17:01:15 UTC) #62
Dmitry Skiba
https://codereview.chromium.org/1337703002/diff/530001/base/android/jni_array.cc File base/android/jni_array.cc (right): https://codereview.chromium.org/1337703002/diff/530001/base/android/jni_array.cc#newcode248 base/android/jni_array.cc:248: jint* ints = env->GetIntArrayElements(int_array.obj(), nullptr); On 2015/10/30 17:01:15, Theresa ...
5 years, 1 month ago (2015-10-30 17:17:32 UTC) #63
Theresa
https://codereview.chromium.org/1337703002/diff/530001/base/android/jni_array.cc File base/android/jni_array.cc (right): https://codereview.chromium.org/1337703002/diff/530001/base/android/jni_array.cc#newcode248 base/android/jni_array.cc:248: jint* ints = env->GetIntArrayElements(int_array.obj(), nullptr); On 2015/10/30 17:17:32, Dmitry ...
5 years, 1 month ago (2015-10-30 17:25:28 UTC) #64
Dmitry Skiba
5 years, 1 month ago (2015-10-30 17:37:26 UTC) #65
Message was sent while issue was closed.
https://codereview.chromium.org/1337703002/diff/530001/base/android/jni_array.cc
File base/android/jni_array.cc (right):

https://codereview.chromium.org/1337703002/diff/530001/base/android/jni_array...
base/android/jni_array.cc:248: jint* ints =
env->GetIntArrayElements(int_array.obj(), nullptr);
On 2015/10/30 17:25:28, Theresa Wellington wrote:
> On 2015/10/30 17:17:32, Dmitry Skiba wrote:
> > On 2015/10/30 17:01:15, Theresa Wellington wrote:
> > > On 2015/10/30 16:46:19, Dmitry Skiba wrote:
> > > > Hmm, do we really need to get 'ints' here? It doesn't seem to be used.
> > > 
> > > It's used to release the int array elements on line 250.
> > 
> > Yes, but 'ints' is not read from. For example in the function above,
> > JavaArrayOfByteArrayToStringVector(), 'bytes' variable (similar to our
'ints')
> > is used to initialize 'out[i]'. In our case JavaIntArrayToIntVector()
> retrieves
> > elements by itself, without using 'ints'.
> 
> I included this code because a new jintArray is created on line 246. As I
> understand it, calling ReleaseIntArrayElements on the jint* derived from that
> jintArray indicates that the native code no longer needs access to those
> elements. If that's not necessary, I can remove these lines in a new CL.

There are two ways of accessing array elements: GetIntArrayRegion() which just
copies range into pre-allocated buffer and GetIntArrayElements /
GetPrimitiveArrayCritical which can sometimes return internal representation of
the array (pin the array), but are also allowed to return a copy of array's
elements (hence isCopy argument which is nullptr in our case). Since we already
using GetIntArrayRegion(), we don't really need GetIntArrayElements /
ReleaseIntArrayElements. And I believe GetIntArrayRegion() is more efficient in
our case as it avoids possible intermediate copy.

Powered by Google App Engine
This is Rietveld 408576698