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

Issue 190063006: Infobar Componentization Proof of Concept (Closed)

Created:
6 years, 9 months ago by droger
Modified:
6 years, 8 months ago
Reviewers:
Peter Kasting, blundell
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, feature-media-reviews_chromium.org, vsevik, extensions-reviews_chromium.org, benquan, wjia+watch_chromium.org, browser-components-watch_chromium.org, mcasas+watch_chromium.org, yurys, fischman+watch_chromium.org, paulirish+reviews_chromium.org, Dane Wallinga, dyu1, devtools-reviews_chromium.org, estade+watch_chromium.org, aandrey+blink_chromium.org, Ilya Sherman, pfeldman, rouslan+autofillwatch_chromium.org, miu+watch_chromium.org, blundell, Peter Kasting, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Infobar Componentization Proof of Concept This is not intended for commit. The CL uses architecture described in the design doc, with the minor difference that this CL does not actually moves the files to components/. Moving files is left for a later pass, as this would just add a lot of noise to this already huge change. The key classes are in chrome/browser/infobar: - the core of InfoBarService has been split into InfoBarManager - InfoBarDelegate, InfoBarContainer, Infobar, ConfirmInfoBarDelegate have been changed to no longer depend on content/. A new ContentConfirmInfoBarDelegate has been added. This class is simply a ConfirmInfoBarDelegate that knows a WebContents. The rest of the CL is mostly code churn to update existing calls. In most cases, it is about converting from ConfirmInfoBarDelegate to ContentConfirmInfoBarDelegate. You can look at chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h( https://codereview.chromium.org/190063006/diff/150105/chrome/browser/custom_h... ) for one example of this.

Patch Set 1 : . #

Patch Set 2 : fix compile #

Total comments: 5

Patch Set 3 : minor fixes #

Total comments: 30
Unified diffs Side-by-side diffs Delta from patch set Stats (+1063 lines, -915 lines) Patch
M chrome/browser/accessibility/accessibility_extension_api.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/autofill/autofill_browsertest.cc View 5 chunks +17 lines, -7 lines 0 comments Download
M chrome/browser/autofill/autofill_cc_infobar_delegate.h View 4 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/autofill/autofill_cc_infobar_delegate.cc View 2 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/autofill/autofill_cc_infobar_delegate_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/autofill/autofill_interactive_uitest.cc View 4 chunks +14 lines, -6 lines 0 comments Download
M chrome/browser/automation/automation_provider_observers.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 4 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/chrome_quota_permission_context.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/content_settings/permission_queue_controller.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h View 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc View 3 chunks +11 lines, -8 lines 0 comments Download
M chrome/browser/devtools/devtools_window.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/download/download_browsertest.cc View 3 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/debugger/debugger_api.cc View 4 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/extensions/extension_infobar_delegate.h View 4 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_infobar_delegate.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_install_ui_browsertest.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/extensions/theme_installed_infobar_delegate.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/webstore_startup_installer_browsertest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc View 21 chunks +89 lines, -85 lines 0 comments Download
M chrome/browser/geolocation/geolocation_browsertest.cc View 3 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/geolocation/geolocation_infobar_delegate.h View 4 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/geolocation/geolocation_infobar_delegate.cc View 3 chunks +13 lines, -12 lines 0 comments Download
M chrome/browser/google/google_url_tracker_infobar_delegate.h View 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/google/google_url_tracker_infobar_delegate.cc View 4 chunks +11 lines, -8 lines 0 comments Download
M chrome/browser/google/google_url_tracker_unittest.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/infobars/confirm_infobar_delegate.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/infobars/confirm_infobar_delegate.cc View 1 chunk +2 lines, -2 lines 1 comment Download
A chrome/browser/infobars/content_confirm_infobar_delegate.h View 1 2 1 chunk +32 lines, -0 lines 1 comment Download
A chrome/browser/infobars/content_confirm_infobar_delegate.cc View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/browser/infobars/infobar.h View 4 chunks +10 lines, -8 lines 2 comments Download
M chrome/browser/infobars/infobar.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/infobars/infobar_container.h View 4 chunks +12 lines, -14 lines 2 comments Download
M chrome/browser/infobars/infobar_container.cc View 3 chunks +31 lines, -57 lines 0 comments Download
M chrome/browser/infobars/infobar_delegate.h View 4 chunks +16 lines, -12 lines 3 comments Download
M chrome/browser/infobars/infobar_delegate.cc View 5 chunks +8 lines, -24 lines 1 comment Download
A + chrome/browser/infobars/infobar_manager.h View 5 chunks +32 lines, -33 lines 5 comments Download
A + chrome/browser/infobars/infobar_manager.cc View 3 chunks +34 lines, -82 lines 1 comment Download
M chrome/browser/infobars/infobar_service.h View 3 chunks +23 lines, -52 lines 8 comments Download
M chrome/browser/infobars/infobar_service.cc View 1 2 4 chunks +63 lines, -99 lines 5 comments Download
M chrome/browser/infobars/infobars_browsertest.cc View 3 chunks +9 lines, -4 lines 1 comment Download
M chrome/browser/infobars/insecure_content_infobar_delegate.h View 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/infobars/insecure_content_infobar_delegate.cc View 3 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/infobars/simple_alert_infobar_delegate.h View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/infobars/simple_alert_infobar_delegate.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/managed_mode/managed_mode_interstitial.cc View 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/managed_mode/managed_mode_navigation_observer.cc View 4 chunks +14 lines, -12 lines 0 comments Download
M chrome/browser/media/chrome_media_stream_infobar_browsertest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/media/media_stream_infobar_delegate.h View 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/media/media_stream_infobar_delegate.cc View 3 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/media/midi_permission_infobar_delegate.h View 4 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/media/midi_permission_infobar_delegate.cc View 2 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/media/webrtc_browsertest_base.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/nacl_host/nacl_infobar_delegate.h View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/nacl_host/nacl_infobar_delegate.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/notifications/notification_browsertest.cc View 9 chunks +32 lines, -16 lines 0 comments Download
M chrome/browser/password_manager/password_manager_browsertest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/password_manager/save_password_infobar_delegate.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/password_manager/save_password_infobar_delegate.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/pepper_broker_infobar_delegate.h View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/pepper_broker_infobar_delegate.cc View 2 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/plugins/plugin_infobar_delegates.h View 8 chunks +17 lines, -10 lines 0 comments Download
M chrome/browser/plugins/plugin_infobar_delegates.cc View 9 chunks +58 lines, -37 lines 0 comments Download
M chrome/browser/policy/policy_browsertest.cc View 7 chunks +15 lines, -11 lines 0 comments Download
M chrome/browser/ssl/ssl_tab_helper.cc View 4 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/three_d_api_observer.cc View 4 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/translate/translate_browsertest.cc View 2 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/translate/translate_infobar_delegate.h View 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/translate/translate_infobar_delegate.cc View 9 chunks +16 lines, -11 lines 0 comments Download
M chrome/browser/translate/translate_manager_render_view_host_unittest.cc View 1 2 5 chunks +14 lines, -9 lines 0 comments Download
M chrome/browser/ui/apps/app_metro_infobar_delegate_win.h View 1 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/auto_login_infobar_delegate.h View 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/auto_login_infobar_delegate.cc View 2 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/confirm_infobar_controller_unittest.mm View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_cocoa.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_cocoa.mm View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm View 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/keystone_infobar_delegate.mm View 4 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/collected_cookies_infobar_delegate.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/collected_cookies_infobar_delegate.cc View 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/content_settings/media_setting_changed_infobar_delegate.h View 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/content_settings/media_setting_changed_infobar_delegate.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/extensions/extension_install_ui_default.cc View 4 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/ui/hung_plugin_tab_helper.cc View 7 chunks +20 lines, -14 lines 0 comments Download
M chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h View 3 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc View 4 chunks +15 lines, -5 lines 0 comments Download
M chrome/browser/ui/startup/autolaunch_prompt_win.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/startup/default_browser_prompt.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/startup/google_api_keys_infobar_delegate.h View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc View 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/ui/startup/obsolete_system_infobar_delegate.h View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc View 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/ui/startup/session_crashed_infobar_delegate.h View 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/startup/session_crashed_infobar_delegate.cc View 2 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/ui/startup/session_crashed_infobar_delegate_unittest.cc View 3 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_browsertest.cc View 4 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/website_settings/website_settings_infobar_delegate.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/website_settings/website_settings_infobar_delegate.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/website_settings/website_settings_unittest.cc View 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/gpu/webgl_infobar_browsertest.cc View 3 chunks +7 lines, -4 lines 0 comments Download
M chrome/test/ppapi/ppapi_test.cc View 3 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
droger
blundell: This is not finished yet, but sending this to you as a FYI to ...
6 years, 9 months ago (2014-03-07 16:44:09 UTC) #1
droger
The CL now compiles and has all the designed structure and dependencies. It may still ...
6 years, 9 months ago (2014-03-18 10:50:55 UTC) #2
droger
Here is a breakdown of the change. The CL uses architecture described in the design ...
6 years, 9 months ago (2014-03-18 12:08:26 UTC) #3
tfarina
Infobar? -> +Peter
6 years, 9 months ago (2014-03-18 13:47:18 UTC) #4
droger
On 2014/03/18 13:47:18, tfarina wrote: > Infobar? -> +Peter Yes I was planning on including ...
6 years, 9 months ago (2014-03-18 13:49:11 UTC) #5
tfarina
OK, so moving me and Peter back to CC list. Sorry.
6 years, 9 months ago (2014-03-18 13:50:12 UTC) #6
droger
pkasting: this is now ready for you to take a look. This is not intended ...
6 years, 9 months ago (2014-03-18 15:59:52 UTC) #7
Peter Kasting
I don't see any major problems in c/b/infobars/. https://codereview.chromium.org/190063006/diff/120002/chrome/browser/infobars/confirm_infobar_delegate.cc File chrome/browser/infobars/confirm_infobar_delegate.cc (right): https://codereview.chromium.org/190063006/diff/120002/chrome/browser/infobars/confirm_infobar_delegate.cc#newcode55 chrome/browser/infobars/confirm_infobar_delegate.cc:55: InfoBarDelegate::ShouldExpireInternal(details); ...
6 years, 9 months ago (2014-03-18 18:29:16 UTC) #8
droger
Thanks for the comments. Sorry for the formatting, it was the result of a raw ...
6 years, 9 months ago (2014-03-19 15:03:04 UTC) #9
blundell
https://codereview.chromium.org/190063006/diff/170001/chrome/browser/infobars/infobar_container.cc File chrome/browser/infobars/infobar_container.cc (left): https://codereview.chromium.org/190063006/diff/170001/chrome/browser/infobars/infobar_container.cc#oldcode149 chrome/browser/infobars/infobar_container.cc:149: registrar_.RemoveAll(); Presumably we should be removing ourselves as an ...
6 years, 9 months ago (2014-03-19 15:08:08 UTC) #10
Peter Kasting
6 years, 9 months ago (2014-03-19 18:11:09 UTC) #11
https://codereview.chromium.org/190063006/diff/120002/chrome/browser/infobars...
File chrome/browser/infobars/infobar_service.cc (right):

https://codereview.chromium.org/190063006/diff/120002/chrome/browser/infobars...
chrome/browser/infobars/infobar_service.cc:109: void
InfoBarService::OnInfoBarAdded(InfoBar* infobar) {
On 2014/03/19 15:08:09, blundell wrote:
> There are 20+ listeners for these notifications currently. As changing
> notification listeners to Observers can be time-consuming, would you be OK
with
> us taking this approach to avoid the work being blocked on the cleanup task
and
> at the same time incrementally working to change the notification listeners to
> be InfoBarManager::Observers?

Splitting work into smaller pieces is always fine as long as we agree on the
ultimate endpoint.  I'm surprised there are that many observers of this.  I
would have expected more like 5.

Powered by Google App Engine
This is Rietveld 408576698