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

Issue 554213003: Request the icon of a Web Notification in the renderer process. (Closed)

Created:
6 years, 3 months ago by Peter Beverloo
Modified:
6 years, 2 months ago
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Request the icon of a Web Notification in the renderer process. This will allow us to move the URL fetching logic out of /c/b/notifications/. Mind that this code will soon move to //content/child/, so we can't re-use some of the existing image fetching logic in //content/renderer/. BUG= Committed: https://crrev.com/d17f01a45c92d94869750d7cefb23aa73ed9514d Cr-Commit-Position: refs/heads/master@{#299685}

Patch Set 1 #

Patch Set 2 : Removes now redundant code #

Total comments: 3

Patch Set 3 : #

Total comments: 23

Patch Set 4 : Address comments. #

Patch Set 5 : Call the correct constructor #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 8

Patch Set 9 : comments #

Patch Set 10 : Fix the tests #

Total comments: 6

Patch Set 11 : rebase again #

Patch Set 12 : address comments #

Patch Set 13 : include logging.h #

Unified diffs Side-by-side diffs Delta from patch set Stats (+260 lines, -70 lines) Patch
M chrome/browser/notifications/desktop_notification_service.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -3 lines 0 comments Download
M chrome/browser/notifications/message_center_notification_manager.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/notifications/message_center_notifications_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/notifications/message_center_notifications_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/notifications/notification.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +1 line, -14 lines 0 comments Download
M chrome/browser/notifications/notification.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +3 lines, -11 lines 0 comments Download
M chrome/browser/notifications/notification_test_util.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/message_center/web_notification_tray_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -8 lines 0 comments Download
M content/common/desktop_notification_messages.h View 1 chunk +1 line, -1 line 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/show_desktop_notification_params.h View 2 chunks +4 lines, -2 lines 0 comments Download
A content/renderer/notification_icon_loader.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +73 lines, -0 lines 0 comments Download
A content/renderer/notification_icon_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +83 lines, -0 lines 0 comments Download
M content/renderer/notification_provider.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +18 lines, -1 line 0 comments Download
M content/renderer/notification_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +57 lines, -15 lines 0 comments Download

Messages

Total messages: 32 (5 generated)
Peter Beverloo
Not ready for review yet (it needs it rough edges smoothed, especially in notification_provider.cc), but ...
6 years, 3 months ago (2014-09-16 20:09:43 UTC) #2
dewittj
Also may want to think about capping the amount of image data that can be ...
6 years, 3 months ago (2014-09-17 16:36:20 UTC) #3
Peter Beverloo
On 2014/09/17 16:36:20, dewittj wrote: > Also may want to think about capping the amount ...
6 years, 3 months ago (2014-09-17 16:39:27 UTC) #4
dewittj
On 2014/09/17 16:39:27, Peter Beverloo wrote: > Yes, I'm considering to resize the image to ...
6 years, 3 months ago (2014-09-17 16:54:32 UTC) #5
Jun Mukai
https://codereview.chromium.org/554213003/diff/20001/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/554213003/diff/20001/chrome/browser/notifications/desktop_notification_service.cc#newcode162 chrome/browser/notifications/desktop_notification_service.cc:162: gfx::Image::CreateFrom1xBitmap(params.icon), On 2014/09/17 16:36:20, dewittj wrote: > I think ...
6 years, 3 months ago (2014-09-17 16:57:47 UTC) #6
Peter Beverloo
This should be ready for review now. I do expect a few iterations. +mukai/dewittj for ...
6 years, 3 months ago (2014-09-18 16:54:37 UTC) #8
dewittj
https://codereview.chromium.org/554213003/diff/40001/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/554213003/diff/40001/chrome/browser/notifications/desktop_notification_service.cc#newcode169 chrome/browser/notifications/desktop_notification_service.cc:169: // appropriate resolution, doing so immediately should result in ...
6 years, 3 months ago (2014-09-18 17:46:50 UTC) #9
Mike West
A few drive-by comments. Hope they're helpful. https://codereview.chromium.org/554213003/diff/40001/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/554213003/diff/40001/chrome/browser/notifications/desktop_notification_service.cc#newcode174 chrome/browser/notifications/desktop_notification_service.cc:174: params.body, This ...
6 years, 3 months ago (2014-09-18 19:48:43 UTC) #11
Peter Beverloo
Thanks for the reviews! I uploaded a new iteration. https://codereview.chromium.org/554213003/diff/40001/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): https://codereview.chromium.org/554213003/diff/40001/chrome/browser/notifications/desktop_notification_service.cc#newcode169 chrome/browser/notifications/desktop_notification_service.cc:169: ...
6 years, 3 months ago (2014-09-19 14:15:48 UTC) #12
Mike West
https://codereview.chromium.org/554213003/diff/40001/content/renderer/notification_provider.cc File content/renderer/notification_provider.cc (right): https://codereview.chromium.org/554213003/diff/40001/content/renderer/notification_provider.cc#newcode96 content/renderer/notification_provider.cc:96: loader_.reset(blink::Platform::current()->createURLLoader()); On 2014/09/19 14:15:48, Peter Beverloo wrote: > On ...
6 years, 3 months ago (2014-09-19 15:00:28 UTC) #13
Peter Beverloo
I'll pull out all the constructor changes from the next iteration of this CL, it's ...
6 years, 3 months ago (2014-09-19 15:28:04 UTC) #14
Mike West
On 2014/09/19 15:28:04, Peter Beverloo wrote: > I'll pull out all the constructor changes from ...
6 years, 3 months ago (2014-09-19 15:41:41 UTC) #15
jamesr
In a renderer context why is this load not associated with any particular frame/document? Should ...
6 years, 2 months ago (2014-09-22 22:09:46 UTC) #16
Peter Beverloo
PTAL. On 2014/09/22 22:09:46, jamesr wrote: > In a renderer context why is this load ...
6 years, 2 months ago (2014-09-23 16:25:18 UTC) #17
jamesr
On 2014/09/23 16:25:18, Peter Beverloo wrote: > PTAL. > > On 2014/09/22 22:09:46, jamesr wrote: ...
6 years, 2 months ago (2014-09-23 16:32:23 UTC) #18
Peter Beverloo
On 2014/09/23 16:32:23, jamesr wrote: > On 2014/09/23 16:25:18, Peter Beverloo wrote: > > PTAL. ...
6 years, 2 months ago (2014-09-23 16:43:34 UTC) #19
jamesr
The fact that this is going to move to be more generic doesn't relax the ...
6 years, 2 months ago (2014-09-24 04:34:48 UTC) #20
jamesr
https://codereview.chromium.org/554213003/diff/140001/content/renderer/notification_provider.cc File content/renderer/notification_provider.cc (right): https://codereview.chromium.org/554213003/diff/140001/content/renderer/notification_provider.cc#newcode61 content/renderer/notification_provider.cc:61: int encoded_data_length) OVERRIDE; not lgtm. You shouldn't use OVERRIDE ...
6 years, 2 months ago (2014-09-24 04:39:54 UTC) #21
dewittj
chrome/browser/notifications lgtm one other thing: I'm not so familiar with the IPC code; but do ...
6 years, 2 months ago (2014-09-24 18:28:44 UTC) #22
Peter Beverloo
PTAL. All tests pass as well now. https://codereview.chromium.org/554213003/diff/140001/content/renderer/notification_provider.cc File content/renderer/notification_provider.cc (right): https://codereview.chromium.org/554213003/diff/140001/content/renderer/notification_provider.cc#newcode61 content/renderer/notification_provider.cc:61: int encoded_data_length) ...
6 years, 2 months ago (2014-10-01 19:34:08 UTC) #23
Peter Beverloo
James: Ping.
6 years, 2 months ago (2014-10-06 22:46:57 UTC) #24
jamesr
content/renderer/ lgtm https://codereview.chromium.org/554213003/diff/180001/content/renderer/notification_provider.cc File content/renderer/notification_provider.cc (right): https://codereview.chromium.org/554213003/diff/180001/content/renderer/notification_provider.cc#newcode41 content/renderer/notification_provider.cc:41: class NotificationProvider::IconDownloader : public blink::WebURLLoaderClient { put ...
6 years, 2 months ago (2014-10-06 22:56:24 UTC) #25
Peter Beverloo
All done. +mkwst@ for general review. +nasko@ for show_desktop_notification_params.h https://codereview.chromium.org/554213003/diff/180001/content/renderer/notification_provider.cc File content/renderer/notification_provider.cc (right): https://codereview.chromium.org/554213003/diff/180001/content/renderer/notification_provider.cc#newcode41 content/renderer/notification_provider.cc:41: ...
6 years, 2 months ago (2014-10-13 19:09:30 UTC) #27
nasko
IPC LGTM
6 years, 2 months ago (2014-10-14 22:52:06 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/554213003/410001
6 years, 2 months ago (2014-10-15 13:42:18 UTC) #30
commit-bot: I haz the power
Committed patchset #13 (id:410001)
6 years, 2 months ago (2014-10-15 15:14:31 UTC) #31
commit-bot: I haz the power
6 years, 2 months ago (2014-10-15 15:15:42 UTC) #32
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/d17f01a45c92d94869750d7cefb23aa73ed9514d
Cr-Commit-Position: refs/heads/master@{#299685}

Powered by Google App Engine
This is Rietveld 408576698