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

Issue 765643003: 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 instead change the InfoBar and InfoBarContainer implementations to access the constants through the InfoBarManager. The constants are also made available through a global to the whole embedder since the value were used in multiple places. The constants value depends on the UI system used (cocoa, android, views) and thus are defined in infobar_service_${ui_system}.cc. BUG=382924

Patch Set 1 #

Patch Set 2 : Fix compilation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -126 lines) Patch
M chrome/browser/extensions/extension_infobar_delegate.cc View 1 chunk +3 lines, -2 lines 0 comments Download
A chrome/browser/infobars/chrome_infobar_delegate.h View 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/browser/infobars/infobar_service.h View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/infobars/infobar_service.cc View 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/browser/infobars/infobar_service_android.cc View 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/browser/infobars/infobar_service_cocoa.cc View 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/browser/infobars/infobar_service_views.cc View 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm View 1 chunk +3 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_gradient_view.mm View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_utilities.mm View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/infobars/extension_infobar.cc View 2 chunks +6 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 1 10 chunks +26 lines, -30 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 chunk +3 lines, -0 lines 0 comments Download
M components/google/core/browser/google_url_tracker_unittest.cc View 2 chunks +15 lines, -0 lines 0 comments Download
M components/infobars.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M components/infobars/core/infobar.h View 2 chunks +14 lines, -11 lines 0 comments Download
M components/infobars/core/infobar.cc View 6 chunks +28 lines, -17 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 8 chunks +22 lines, -17 lines 0 comments Download
M components/infobars/core/infobar_delegate.h View 1 chunk +1 line, -1 line 0 comments Download
M components/infobars/core/infobar_manager.h View 2 chunks +4 lines, -0 lines 0 comments Download
M components/infobars/test/infobar_test.cc View 1 chunk +2 lines, -13 lines 0 comments Download

Messages

Total messages: 5 (4 generated)
sdefresne
6 years ago (2014-12-03 16:16:24 UTC) #5
The other implementation.

Powered by Google App Engine
This is Rietveld 408576698