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

Issue 752853005: Remove dependency from infobars component to the embedder (Closed)

Created:
6 years ago by sdefresne
Modified:
6 years ago
Reviewers:
Peter Kasting, sky
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, tfarina, extensions-reviews_chromium.org, Pritam Nikam, blundell, droger
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Remove dependency from infobars component to the embedder The infobars::InfoBar::kSeparatorLineHeight, ... constants were declared in the infobars component but only defined in the embedder. Due to that, the component was not self contained and every client had to contains those symbols and ensure they were only defined once (or encounter linker errors). This change the constants to globals defined in infobars::InfoBar that should be initialized by the embedder using infobars::InfoBar::Initialize. Default values are provided in the component so that they can be used for the unit tests or as default values by the embedder. Added a call to infobars::Infobar::Initialize in chrome_browser_main.cc and define constants in the Chrome embedder that have varying value in function of the UI system used (views, cocoa, android, ios). BUG=382924

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -86 lines) Patch
M chrome/browser/chrome_browser_main.cc View 3 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_infobar_delegate.cc View 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/browser/ui/android/infobars/infobar_constants.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm View 1 chunk +2 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
A chrome/browser/ui/cocoa/infobars/infobar_constants.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_utilities.mm View 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/ui/infobar_constants.h View 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/browser/ui/ios/infobars/infobar_constants.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/infobars/extension_infobar.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/infobars/infobar_background.cc View 2 chunks +3 lines, -3 lines 0 comments Download
A chrome/browser/ui/views/infobars/infobar_constants.cc View 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_view.cc View 4 chunks +4 lines, -16 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 6 chunks +6 lines, -1 line 0 comments Download
M components/infobars.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M components/infobars/core/infobar.h View 1 chunk +18 lines, -7 lines 0 comments Download
M components/infobars/core/infobar.cc View 4 chunks +33 lines, -10 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.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M components/infobars/test/infobar_test.cc View 1 chunk +2 lines, -13 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
sdefresne
pkasting@chromium.org: please review change in - chrome/browser/ui/infobar_constants.h - chrome/browser/ui/*/infobars - components/infobars sky@chromium.org: please review changes ...
6 years ago (2014-12-03 13:30:44 UTC) #2
sdefresne
pritam.nikam@, blundell@, droger@: FYI
6 years ago (2014-12-03 13:31:40 UTC) #3
Peter Kasting
This solution doesn't feel quite right to me. Looking at how the constants are used, ...
6 years ago (2014-12-03 13:49:37 UTC) #4
sdefresne
On 2014/12/03 13:49:37, Peter Kasting wrote: > This solution doesn't feel quite right to me. ...
6 years ago (2014-12-03 15:53:01 UTC) #5
Peter Kasting
On 2014/12/03 15:53:01, sdefresne wrote: > On 2014/12/03 13:49:37, Peter Kasting wrote: > > This ...
6 years ago (2014-12-03 19:59:46 UTC) #6
sdefresne
On 2014/12/03 at 19:59:46, pkasting wrote: > On 2014/12/03 15:53:01, sdefresne wrote: > > On ...
6 years ago (2014-12-08 17:14:46 UTC) #7
Peter Kasting
On 2014/12/08 17:14:46, sdefresne wrote: > pkasting: did you find time to attempt a patch ...
6 years ago (2014-12-08 20:46:26 UTC) #8
Peter Kasting
OK, I have an implementation of my proposal up at https://codereview.chromium.org/793783003/ .
6 years ago (2014-12-10 22:11:10 UTC) #9
sdefresne
6 years ago (2014-12-11 10:34:52 UTC) #10
Message was sent while issue was closed.
On 2014/12/10 at 22:11:10, pkasting wrote:
> OK, I have an implementation of my proposal up at
https://codereview.chromium.org/793783003/ .

Thank you, your implementation is much cleaner. Closing.

Powered by Google App Engine
This is Rietveld 408576698