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

Issue 377013002: android: Use UIResource for overscroll glow (Closed)

Created:
6 years, 5 months ago by powei
Modified:
6 years, 4 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, James Su, miu+watch_chromium.org, Ted C, David Trainor- moved to gerrit, aelias_OOO_until_Jul13
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

android: Use UIResource for overscroll glow Moved UIResourceProvider/UIResourceClientAndroid to ui from content to allow loading the glow resources as UIResource. The bitmaps are now loaded from the SystemUIResourceManager class. previous patch (abandoned): https://codereview.chromium.org/82553015/ android= https://chrome-internal-review.googlesource.com/#/c/168402/1 BUG=326326

Patch Set 1 : #

Patch Set 2 #

Total comments: 15

Patch Set 3 : addressed comments. moved resource loading to its own class. #

Total comments: 18

Patch Set 4 : addressed comments. moved system_ui_resource* implementation to content #

Total comments: 10

Patch Set 5 : addressed comments #

Total comments: 4

Patch Set 6 : addressed comments and added test #

Total comments: 3

Patch Set 7 : updated test file entry in gypi #

Total comments: 28

Patch Set 8 : rebased #

Patch Set 9 : addressed comments #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+820 lines, -163 lines) Patch
M content/browser/android/edge_effect.h View 1 2 3 4 5 6 7 8 6 chunks +13 lines, -6 lines 0 comments Download
M content/browser/android/edge_effect.cc View 1 2 3 4 5 5 chunks +93 lines, -31 lines 1 comment Download
M content/browser/android/overscroll_glow.h View 1 2 3 4 5 6 7 8 4 chunks +9 lines, -8 lines 0 comments Download
M content/browser/android/overscroll_glow.cc View 1 2 3 4 5 6 7 8 5 chunks +13 lines, -82 lines 0 comments Download
A content/browser/android/system_ui_resource.h View 1 2 3 4 5 6 7 8 1 chunk +68 lines, -0 lines 0 comments Download
A content/browser/android/system_ui_resource.cc View 1 2 3 4 5 6 7 8 1 chunk +60 lines, -0 lines 2 comments Download
A content/browser/android/system_ui_resource_manager_impl.h View 1 2 3 4 5 6 7 8 1 chunk +67 lines, -0 lines 0 comments Download
A content/browser/android/system_ui_resource_manager_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +162 lines, -0 lines 0 comments Download
A content/browser/android/system_ui_resource_manager_impl_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +202 lines, -0 lines 0 comments Download
M content/browser/android/ui_resource_provider_impl.h View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/android/ui_resource_provider_impl.cc View 1 2 3 4 3 chunks +10 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.h View 1 2 3 4 5 6 7 4 chunks +2 lines, -5 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 9 chunks +27 lines, -11 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ui/base/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A ui/base/android/system_ui_resource_layer.h View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
A ui/base/android/system_ui_resource_manager.h View 1 2 3 4 1 chunk +26 lines, -0 lines 0 comments Download
M ui/base/android/window_android_compositor.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M ui/base/ui_base.gyp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gfx/android/java_bitmap.h View 1 2 3 4 5 6 7 1 chunk +6 lines, -6 lines 0 comments Download
M ui/gfx/android/java_bitmap.cc View 1 2 3 4 5 6 7 3 chunks +21 lines, -11 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
powei
ptal. Thanks! https://codereview.chromium.org/377013002/diff/20002/content/browser/android/edge_effect.cc File content/browser/android/edge_effect.cc (right): https://codereview.chromium.org/377013002/diff/20002/content/browser/android/edge_effect.cc#newcode163 content/browser/android/edge_effect.cc:163: pull_distance_(0) { result of clang-format. Let me ...
6 years, 5 months ago (2014-07-08 19:12:43 UTC) #1
jdduke (slow)
Thanks for taking this on! https://codereview.chromium.org/377013002/diff/20002/content/browser/android/edge_effect.cc File content/browser/android/edge_effect.cc (right): https://codereview.chromium.org/377013002/diff/20002/content/browser/android/edge_effect.cc#newcode163 content/browser/android/edge_effect.cc:163: pull_distance_(0) { On 2014/07/08 ...
6 years, 5 months ago (2014-07-08 20:10:12 UTC) #2
jdduke (slow)
https://codereview.chromium.org/377013002/diff/20002/ui/base/android/window_android.h File ui/base/android/window_android.h (right): https://codereview.chromium.org/377013002/diff/20002/ui/base/android/window_android.h#newcode70 ui/base/android/window_android.h:70: cc::UIResourceId GetSystemUIResource(SystemUIResource system_resource); This pull and push model makes ...
6 years, 5 months ago (2014-07-08 20:42:08 UTC) #3
powei
https://codereview.chromium.org/377013002/diff/20002/content/browser/android/overscroll_glow.cc File content/browser/android/overscroll_glow.cc (left): https://codereview.chromium.org/377013002/diff/20002/content/browser/android/overscroll_glow.cc#oldcode38 content/browser/android/overscroll_glow.cc:38: return skia::ImageOperations::Resize( On 2014/07/08 20:10:11, jdduke wrote: > On ...
6 years, 5 months ago (2014-07-09 20:41:04 UTC) #4
jdduke (slow)
https://codereview.chromium.org/377013002/diff/20002/ui/base/android/window_android.h File ui/base/android/window_android.h (right): https://codereview.chromium.org/377013002/diff/20002/ui/base/android/window_android.h#newcode70 ui/base/android/window_android.h:70: cc::UIResourceId GetSystemUIResource(SystemUIResource system_resource); On 2014/07/09 20:41:03, powei wrote: > ...
6 years, 5 months ago (2014-07-09 21:12:13 UTC) #5
powei
https://codereview.chromium.org/377013002/diff/20002/ui/base/android/window_android.h File ui/base/android/window_android.h (right): https://codereview.chromium.org/377013002/diff/20002/ui/base/android/window_android.h#newcode70 ui/base/android/window_android.h:70: cc::UIResourceId GetSystemUIResource(SystemUIResource system_resource); On 2014/07/09 21:12:13, jdduke wrote: > ...
6 years, 5 months ago (2014-07-09 23:43:14 UTC) #6
jdduke (slow)
On 2014/07/09 23:43:14, powei wrote: > So we'll need another interface like ui::SystemUIResourceLayer to avoid ...
6 years, 5 months ago (2014-07-09 23:48:36 UTC) #7
powei
https://codereview.chromium.org/377013002/diff/20002/ui/base/android/window_android.cc File ui/base/android/window_android.cc (right): https://codereview.chromium.org/377013002/diff/20002/ui/base/android/window_android.cc#newcode99 ui/base/android/window_android.cc:99: if (ui_resource_map_.find(system_resource) == ui_resource_map_.end()) On 2014/07/08 20:10:11, jdduke wrote: ...
6 years, 5 months ago (2014-07-12 00:24:47 UTC) #8
jdduke (slow)
I'll take a closer look Monday, still wrapping my head around the impl/manager/client/provider nuances :) ...
6 years, 5 months ago (2014-07-12 01:01:09 UTC) #9
jdduke (slow)
The higher level question I have is why we need an abstract class for SystemUIResourceManager ...
6 years, 5 months ago (2014-07-12 01:06:49 UTC) #10
powei
On 2014/07/12 01:06:49, jdduke wrote: > The higher level question I have is why we ...
6 years, 5 months ago (2014-07-12 06:11:32 UTC) #11
powei
https://codereview.chromium.org/377013002/diff/90001/content/browser/android/overscroll_glow.h File content/browser/android/overscroll_glow.h (right): https://codereview.chromium.org/377013002/diff/90001/content/browser/android/overscroll_glow.h#newcode28 content/browser/android/overscroll_glow.h:28: class OverscrollGlowLayerWrapper { On 2014/07/12 01:01:09, jdduke wrote: > ...
6 years, 5 months ago (2014-07-16 17:10:52 UTC) #12
powei
cc aelias@
6 years, 5 months ago (2014-07-16 17:54:36 UTC) #13
jdduke (slow)
https://codereview.chromium.org/377013002/diff/170001/content/browser/android/system_ui_resource_manager_impl.cc File content/browser/android/system_ui_resource_manager_impl.cc (right): https://codereview.chromium.org/377013002/diff/170001/content/browser/android/system_ui_resource_manager_impl.cc#newcode60 content/browser/android/system_ui_resource_manager_impl.cc:60: if (GetData(type)->HasResource()) Should this be DCHECK(!GetData(type)->HasResource()); https://codereview.chromium.org/377013002/diff/170001/content/browser/android/system_ui_resource_manager_impl.cc#newcode129 content/browser/android/system_ui_resource_manager_impl.cc:129: DCHECK(resource); ...
6 years, 5 months ago (2014-07-16 19:01:51 UTC) #14
powei
https://codereview.chromium.org/377013002/diff/170001/content/browser/android/system_ui_resource_manager_impl.cc File content/browser/android/system_ui_resource_manager_impl.cc (right): https://codereview.chromium.org/377013002/diff/170001/content/browser/android/system_ui_resource_manager_impl.cc#newcode60 content/browser/android/system_ui_resource_manager_impl.cc:60: if (GetData(type)->HasResource()) On 2014/07/16 19:01:51, jdduke wrote: > Should ...
6 years, 5 months ago (2014-07-16 23:33:51 UTC) #15
jdduke (slow)
https://codereview.chromium.org/377013002/diff/170001/content/browser/android/system_ui_resource_manager_impl.h File content/browser/android/system_ui_resource_manager_impl.h (right): https://codereview.chromium.org/377013002/diff/170001/content/browser/android/system_ui_resource_manager_impl.h#newcode42 content/browser/android/system_ui_resource_manager_impl.h:42: class Data : public SystemUIResourceClient { On 2014/07/16 23:33:51, ...
6 years, 5 months ago (2014-07-17 00:02:18 UTC) #16
jdduke (slow)
Is SystemUIResourceManagerImpl anything we could unit test? https://codereview.chromium.org/377013002/diff/210001/content/browser/android/edge_effect.h File content/browser/android/edge_effect.h (right): https://codereview.chromium.org/377013002/diff/210001/content/browser/android/edge_effect.h#newcode35 content/browser/android/edge_effect.h:35: virtual void ...
6 years, 5 months ago (2014-07-17 19:56:51 UTC) #17
powei
added some simple unit tests. Ptal. https://codereview.chromium.org/377013002/diff/170001/content/browser/android/system_ui_resource_manager_impl.h File content/browser/android/system_ui_resource_manager_impl.h (right): https://codereview.chromium.org/377013002/diff/170001/content/browser/android/system_ui_resource_manager_impl.h#newcode42 content/browser/android/system_ui_resource_manager_impl.h:42: class Data : ...
6 years, 5 months ago (2014-07-21 21:25:59 UTC) #18
Ted C
https://codereview.chromium.org/377013002/diff/230001/content/content_tests.gypi File content/content_tests.gypi (right): https://codereview.chromium.org/377013002/diff/230001/content/content_tests.gypi#newcode399 content/content_tests.gypi:399: 'browser/android/system_ui_resource_manager_impl_unittest.cc', On 2014/07/21 21:25:58, powei wrote: > Seems like ...
6 years, 5 months ago (2014-07-21 23:17:05 UTC) #19
powei
https://codereview.chromium.org/377013002/diff/230001/content/content_tests.gypi File content/content_tests.gypi (right): https://codereview.chromium.org/377013002/diff/230001/content/content_tests.gypi#newcode399 content/content_tests.gypi:399: 'browser/android/system_ui_resource_manager_impl_unittest.cc', On 2014/07/21 23:17:04, Ted C wrote: > On ...
6 years, 5 months ago (2014-07-23 18:00:55 UTC) #20
jdduke (slow)
https://codereview.chromium.org/377013002/diff/250001/content/browser/android/edge_effect.h File content/browser/android/edge_effect.h (right): https://codereview.chromium.org/377013002/diff/250001/content/browser/android/edge_effect.h#newcode40 content/browser/android/edge_effect.h:40: EdgeEffect(ui::SystemUIResourceManager* resource_manager); Explicit. https://codereview.chromium.org/377013002/diff/250001/content/browser/android/overscroll_glow.cc File content/browser/android/overscroll_glow.cc (right): https://codereview.chromium.org/377013002/diff/250001/content/browser/android/overscroll_glow.cc#newcode166 content/browser/android/overscroll_glow.cc:166: ...
6 years, 5 months ago (2014-07-23 18:17:45 UTC) #21
powei
https://codereview.chromium.org/377013002/diff/250001/content/browser/android/edge_effect.h File content/browser/android/edge_effect.h (right): https://codereview.chromium.org/377013002/diff/250001/content/browser/android/edge_effect.h#newcode40 content/browser/android/edge_effect.h:40: EdgeEffect(ui::SystemUIResourceManager* resource_manager); On 2014/07/23 18:17:44, jdduke wrote: > Explicit. ...
6 years, 5 months ago (2014-07-23 21:56:09 UTC) #22
jdduke (slow)
content/browser/android/edge_effect.{cc,h} and content/browser/android/overscroll_glow.{cc,h} lgtm. You might want another pair of eyes to review SystemUIResourceManagerImpl as ...
6 years, 4 months ago (2014-07-28 20:45:38 UTC) #23
powei
6 years, 4 months ago (2014-07-28 23:14:57 UTC) #24
Message was sent while issue was closed.
Closing this as jdduke will pick up the remaining work.  Thanks!

Powered by Google App Engine
This is Rietveld 408576698