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

Issue 793783003: Move infobar constants and the code that uses them from components/ to chrome/. (Closed)

Created:
6 years ago by Peter Kasting
Modified:
6 years ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move infobar constants and the code that uses them from components/ to chrome/. Both the infobar and the infobar container were making use of various infobar constants that were declared in components/ but (usually) defined in chrome/. This was a symptom of having put code in the component that really probably belonged in the embedder. This CL hoists the relevant logic to a new cross-platform InfoBarContainerDelegate class defined on the chrome side, which implements some of the methods of InfoBarContainer::Delegate. Platforms then subclass this to implement the remaining, platform-specific bits. This means that the constants in question now live solely in chrome/, avoiding a bunch of link-time nastiness when trying to build the components code separately. BUG=382924 TEST=none TBR=finnur Committed: https://crrev.com/07622896891ccc5e8279be55bae52c6323f025ff Cr-Commit-Position: refs/heads/master@{#308046}

Patch Set 1 #

Patch Set 2 : Fixes #

Patch Set 3 : Bad include path #

Total comments: 2

Patch Set 4 : NULL -> nullptr #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+271 lines, -198 lines) Patch
M chrome/browser/extensions/extension_infobar_delegate.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_cocoa.mm View 1 chunk +0 lines, -8 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_container_cocoa.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_container_cocoa.mm View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_utilities.mm View 1 2 2 chunks +2 lines, -1 line 0 comments Download
A chrome/browser/ui/infobar_container_delegate.h View 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/browser/ui/infobar_container_delegate.cc View 1 2 3 1 chunk +85 lines, -0 lines 1 comment Download
M chrome/browser/ui/views/frame/browser_view.h View 4 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 3 chunks +11 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/infobars/extension_infobar.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_background.cc View 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_view.cc View 5 chunks +10 lines, -18 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M components/infobars.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M components/infobars/core/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M components/infobars/core/infobar.h View 2 chunks +4 lines, -13 lines 0 comments Download
M components/infobars/core/infobar.cc View 1 4 chunks +14 lines, -31 lines 0 comments Download
D components/infobars/core/infobar_android.cc View 1 chunk +0 lines, -15 lines 0 comments Download
M components/infobars/core/infobar_container.h View 4 chunks +31 lines, -19 lines 0 comments Download
M components/infobars/core/infobar_container.cc View 7 chunks +32 lines, -54 lines 0 comments Download
M components/infobars/test/infobar_test.cc View 1 chunk +0 lines, -11 lines 0 comments Download

Messages

Total messages: 28 (7 generated)
Peter Kasting
sdefresne: Review dfalcantara: What should I do for Android? For the moment, this change doesn't ...
6 years ago (2014-12-10 22:10:59 UTC) #2
gone
Compiled and ran it locally, navigated to http://google.fr to get an Infobar to pop up. ...
6 years ago (2014-12-10 23:18:45 UTC) #3
Peter Kasting
On 2014/12/10 23:18:45, dfalcantara wrote: > Compiled and ran it locally, navigated to http://google.fr to ...
6 years ago (2014-12-10 23:49:44 UTC) #4
gone
+cjhopman as potential gyp guru
6 years ago (2014-12-11 00:00:07 UTC) #6
gone
On 2014/12/11 00:00:07, dfalcantara wrote: > +cjhopman as potential gyp guru AFAICT, those files aren't ...
6 years ago (2014-12-11 00:08:02 UTC) #7
cjhopman
On 2014/12/10 23:49:44, Peter Kasting wrote: > On 2014/12/10 23:18:45, dfalcantara wrote: > > Compiled ...
6 years ago (2014-12-11 00:08:54 UTC) #8
Peter Kasting
On 2014/12/11 00:08:54, cjhopman wrote: > On 2014/12/10 23:49:44, Peter Kasting wrote: > > On ...
6 years ago (2014-12-11 00:12:54 UTC) #9
gone
On 2014/12/11 00:12:54, Peter Kasting wrote: > On 2014/12/11 00:08:54, cjhopman wrote: > > On ...
6 years ago (2014-12-11 00:23:47 UTC) #10
cjhopman
On 2014/12/11 00:12:54, Peter Kasting wrote: > On 2014/12/11 00:08:54, cjhopman wrote: > > On ...
6 years ago (2014-12-11 00:28:27 UTC) #11
Peter Kasting
On 2014/12/11 00:23:47, dfalcantara wrote: > With your null pointer check, things seem to work ...
6 years ago (2014-12-11 00:46:07 UTC) #12
gone
I think one of the reasons we went with handling it all through Java was ...
6 years ago (2014-12-11 01:04:23 UTC) #13
sdefresne
lgtm https://codereview.chromium.org/793783003/diff/40001/chrome/browser/ui/infobar_container_delegate.cc File chrome/browser/ui/infobar_container_delegate.cc (right): https://codereview.chromium.org/793783003/diff/40001/chrome/browser/ui/infobar_container_delegate.cc#newcode34 chrome/browser/ui/infobar_container_delegate.cc:34: if (!DrawInfoBarArrows(NULL)) nit: maybe uses nullptr instead of ...
6 years ago (2014-12-11 10:33:48 UTC) #14
Peter Kasting
Landing. https://codereview.chromium.org/793783003/diff/40001/chrome/browser/ui/infobar_container_delegate.cc File chrome/browser/ui/infobar_container_delegate.cc (right): https://codereview.chromium.org/793783003/diff/40001/chrome/browser/ui/infobar_container_delegate.cc#newcode34 chrome/browser/ui/infobar_container_delegate.cc:34: if (!DrawInfoBarArrows(NULL)) On 2014/12/11 10:33:48, sdefresne wrote: > ...
6 years ago (2014-12-12 01:52:24 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/793783003/60001
6 years ago (2014-12-12 01:53:57 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/29897)
6 years ago (2014-12-12 02:02:40 UTC) #19
Peter Kasting
TBR=finnur for mechanical changes in chrome/browser/extensions/extension_infobar_delegate.cc.
6 years ago (2014-12-12 02:15:57 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/793783003/60001
6 years ago (2014-12-12 02:17:20 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001)
6 years ago (2014-12-12 03:34:31 UTC) #24
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/07622896891ccc5e8279be55bae52c6323f025ff Cr-Commit-Position: refs/heads/master@{#308046}
6 years ago (2014-12-12 03:35:16 UTC) #25
Lei Zhang
https://codereview.chromium.org/793783003/diff/60001/chrome/browser/ui/infobar_container_delegate.cc File chrome/browser/ui/infobar_container_delegate.cc (right): https://codereview.chromium.org/793783003/diff/60001/chrome/browser/ui/infobar_container_delegate.cc#newcode11 chrome/browser/ui/infobar_container_delegate.cc:11: kDefaultArrowTargetHeight; This creates a static initializer and the sizes ...
6 years ago (2014-12-12 10:11:34 UTC) #27
Finnur
6 years ago (2014-12-12 15:08:02 UTC) #28
Message was sent while issue was closed.
extension_infobar_delegate.cc LGTM

Powered by Google App Engine
This is Rietveld 408576698