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

Issue 256503004: Allow high-res bitmaps to be passed in from notifications API. (Closed)

Created:
6 years, 8 months ago by dewittj
Modified:
4 years, 4 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Allow high-res bitmaps to be passed in from notifications API. Previously the custom binding in JS would prevent an image that's larger than the size of the template from being sent to the browser process. This relaxes the maximum to be the largest supported scale factor of the machine. BUG=239676 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272211

Patch Set 1 #

Patch Set 2 : Adds dewittj to OWNERS for notifications custom bindings. #

Total comments: 3

Patch Set 3 : Removes hard coding of constants and adds custom bindings tests. #

Total comments: 10

Patch Set 4 : Address some comments. #

Total comments: 2

Patch Set 5 : Undo extra check to make tests pass again. #

Patch Set 6 : Redo the tests so that we can check validity of the icon bitmap. #

Patch Set 7 : Fix compile with an appropriate MESSAGE_CENTER_EXPORT #

Patch Set 8 : Restructure code so chrome_child.dll links #

Unified diffs Side-by-side diffs Delta from patch set Stats (+894 lines, -669 lines) Patch
M chrome/browser/extensions/api/notifications/notifications_api.cc View 1 2 3 4 5 6 7 13 chunks +63 lines, -18 lines 0 comments Download
M chrome/browser/extensions/api/notifications/notifications_apitest.cc View 1 2 3 4 5 3 chunks +15 lines, -615 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/common/extensions/api/notifications/notification_style.h View 1 2 3 4 5 6 7 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/common/extensions/api/notifications/notification_style.cc View 1 2 3 4 5 6 7 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
A chrome/renderer/extensions/notifications_native_handler.h View 1 2 3 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/renderer/extensions/notifications_native_handler.cc View 1 2 3 4 5 6 7 1 chunk +48 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/OWNERS View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/renderer/resources/extensions/notifications_custom_bindings.gtestjs View 1 2 3 4 5 1 chunk +104 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/notifications_custom_bindings.js View 1 2 3 4 5 1 chunk +43 lines, -34 lines 0 comments Download
A chrome/renderer/resources/extensions/notifications_test_util.js View 1 2 1 chunk +53 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/notifications/api/basic_usage/background.js View 1 2 3 4 5 1 chunk +305 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/notifications/api/basic_usage/manifest.json View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/test/data/extensions/api_test/notifications/api/by_user/background.js View 1 2 3 4 5 2 chunks +25 lines, -4 lines 0 comments Download
A chrome/test/data/extensions/api_test/notifications/api/partial_update/background.js View 1 2 3 4 5 1 chunk +141 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/notifications/api/partial_update/manifest.json View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
M ui/message_center/message_center_style.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
dewittj
ptal
6 years, 8 months ago (2014-04-24 18:31:34 UTC) #1
dewittj
ping
6 years, 8 months ago (2014-04-25 21:48:25 UTC) #2
Dmitry Titov
Cool, this will let developers to pass larger images w/o us scaling them in the ...
6 years, 7 months ago (2014-04-29 01:55:28 UTC) #3
dewittj
kalman: mind reviewing the custom bindings and owners changes?
6 years, 7 months ago (2014-04-29 16:28:17 UTC) #4
not at google - send to devlin
is there a way to test this? https://codereview.chromium.org/256503004/diff/20001/chrome/browser/extensions/api/notifications/notifications_api.cc File chrome/browser/extensions/api/notifications/notifications_api.cc (right): https://codereview.chromium.org/256503004/diff/20001/chrome/browser/extensions/api/notifications/notifications_api.cc#newcode262 chrome/browser/extensions/api/notifications/notifications_api.cc:262: // TODO(dewittj): ...
6 years, 7 months ago (2014-04-29 16:58:56 UTC) #5
dewittj
On 2014/04/29 16:58:56, kalman wrote: > is there a way to test this? Yes, there ...
6 years, 7 months ago (2014-04-29 17:01:30 UTC) #6
not at google - send to devlin
On 2014/04/29 17:01:30, dewittj wrote: > On 2014/04/29 16:58:56, kalman wrote: > > is there ...
6 years, 7 months ago (2014-04-29 17:12:51 UTC) #7
dewittj
> Are you automatically scaling? Yes, if the notification doesn't fit the size constraints it's ...
6 years, 7 months ago (2014-04-29 17:18:19 UTC) #8
not at google - send to devlin
> I would be really happy to have that. Is there precedent? There are a ...
6 years, 7 months ago (2014-04-29 17:24:11 UTC) #9
dewittj
ptal, let me know if this is the right way to go aboutt things.
6 years, 7 months ago (2014-05-15 22:04:08 UTC) #10
not at google - send to devlin
nice. lgtm generally with a couple of comments, Dmitry should probably have another look. https://codereview.chromium.org/256503004/diff/80001/chrome/browser/extensions/api/notifications/notifications_api.cc ...
6 years, 7 months ago (2014-05-15 23:40:18 UTC) #11
dewittj
https://codereview.chromium.org/256503004/diff/20001/chrome/browser/extensions/api/notifications/notifications_api.cc File chrome/browser/extensions/api/notifications/notifications_api.cc (right): https://codereview.chromium.org/256503004/diff/20001/chrome/browser/extensions/api/notifications/notifications_api.cc#newcode262 chrome/browser/extensions/api/notifications/notifications_api.cc:262: // TODO(dewittj): Return error if this fails. On 2014/04/29 ...
6 years, 7 months ago (2014-05-16 20:05:20 UTC) #12
not at google - send to devlin
still lgtm https://codereview.chromium.org/256503004/diff/100001/chrome/renderer/extensions/notifications_native_handler.cc File chrome/renderer/extensions/notifications_native_handler.cc (right): https://codereview.chromium.org/256503004/diff/100001/chrome/renderer/extensions/notifications_native_handler.cc#newcode44 chrome/renderer/extensions/notifications_native_handler.cc:44: content::V8ValueConverter::create()); you'd use the v8 APIs like ...
6 years, 7 months ago (2014-05-16 20:16:03 UTC) #13
Dmitry Titov
still lgtm, with a nit: https://codereview.chromium.org/256503004/diff/100001/chrome/browser/extensions/api/notifications/notifications_api.cc File chrome/browser/extensions/api/notifications/notifications_api.cc (right): https://codereview.chromium.org/256503004/diff/100001/chrome/browser/extensions/api/notifications/notifications_api.cc#newcode45 chrome/browser/extensions/api/notifications/notifications_api.cc:45: "Unable to successfully decode ...
6 years, 7 months ago (2014-05-16 22:21:41 UTC) #14
dewittj
On 2014/05/16 22:21:41, Dmitry Titov wrote: > still lgtm, with a nit: > > https://codereview.chromium.org/256503004/diff/100001/chrome/browser/extensions/api/notifications/notifications_api.cc ...
6 years, 7 months ago (2014-05-19 16:58:32 UTC) #15
dewittj
I took this opportunity (failing tests) to do a bunch of cleanup. * Call SetError ...
6 years, 7 months ago (2014-05-20 17:00:56 UTC) #16
dewittj
The CQ bit was checked by dewittj@chromium.org
6 years, 7 months ago (2014-05-20 19:12:15 UTC) #17
dewittj
On 2014/05/20 19:12:15, dewittj wrote: > The CQ bit was checked by mailto:dewittj@chromium.org I hit ...
6 years, 7 months ago (2014-05-20 19:12:32 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dewittj@chromium.org/256503004/150001
6 years, 7 months ago (2014-05-20 19:12:53 UTC) #19
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-21 00:09:21 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-21 01:05:16 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/7183) win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/10419)
6 years, 7 months ago (2014-05-21 01:05:16 UTC) #22
dewittj
fyi: I had to move the new GetNotificationBitmapSizes function into chrome/common/extensions/api/notifications/ so that chrome_child.dll could ...
6 years, 7 months ago (2014-05-21 21:51:57 UTC) #23
dewittj
The CQ bit was checked by dewittj@chromium.org
6 years, 7 months ago (2014-05-22 13:49:51 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dewittj@chromium.org/256503004/170001
6 years, 7 months ago (2014-05-22 13:50:45 UTC) #25
commit-bot: I haz the power
6 years, 7 months ago (2014-05-22 17:14:21 UTC) #26
Message was sent while issue was closed.
Change committed as 272211

Powered by Google App Engine
This is Rietveld 408576698