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

Issue 2086663003: Change ChooserController ownership model (Closed)

Created:
4 years, 6 months ago by juncai
Modified:
4 years, 5 months ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org, markusheintz_, msramek+watch_chromium.org, raymes+watch_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change ChooserController ownership model Currently chooser bubble and chooser dialog have different ChooserController ownership models. For chooser bubble, the ChooserController is owned by ChooserBubbleDelegate, which is a subclass of BubbleDelegate and BubbleManager owns it. For chooser dialog, ChromeExtensionBluetoothChooser owns it, which is a subclass of BluetoothChooser. Since the ChooserController is only used by view classes, a better way is to let ChooserContentView (for non-Mac) and ChooserContentViewCocoa (for Mac) own it. BUG=621216 Committed: https://crrev.com/474e1e11c78fc65fe773af28dcec21bb3014b269 Cr-Commit-Position: refs/heads/master@{#402647}

Patch Set 1 : changed ChooserController ownership model #

Patch Set 2 : fix build errors #

Total comments: 6

Patch Set 3 : address reillyg@'s comments #

Total comments: 17

Patch Set 4 : changed some Cocoa function names to start with lowercase letter #

Total comments: 10

Patch Set 5 : address comments #

Patch Set 6 : address comments #

Patch Set 7 : removed temporary unique ptr at ChooserBubbleUiCocoa #

Unified diffs Side-by-side diffs Delta from patch set Stats (+376 lines, -378 lines) Patch
M chrome/browser/extensions/chrome_extension_chooser_dialog.h View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/chooser_content_view_cocoa.h View 1 2 3 4 5 3 chunks +31 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm View 1 2 3 4 5 5 chunks +120 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa.h View 2 chunks +9 lines, -14 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa.mm View 3 chunks +11 lines, -24 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.h View 1 2 3 chunks +5 lines, -19 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.mm View 1 2 3 4 5 4 chunks +11 lines, -61 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller_unittest.mm View 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.h View 1 2 3 4 5 6 2 chunks +7 lines, -11 lines 0 comments Download
M chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm View 1 2 3 4 5 6 12 chunks +51 lines, -128 lines 0 comments Download
M chrome/browser/ui/views/browser_dialogs_views.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/chooser_content_view.h View 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/chooser_content_view.cc View 5 chunks +15 lines, -37 lines 0 comments Download
M chrome/browser/ui/views/chooser_content_view_unittest.cc View 3 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/extensions/chooser_dialog_view.h View 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/extensions/chooser_dialog_view.cc View 4 chunks +12 lines, -13 lines 0 comments Download
M chrome/browser/ui/views/extensions/chooser_dialog_view_browsertest.cc View 3 chunks +18 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.h View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc View 8 chunks +29 lines, -25 lines 0 comments Download
M chrome/browser/ui/website_settings/chooser_bubble_delegate.h View 1 2 3 4 2 chunks +7 lines, -7 lines 0 comments Download
M components/chooser_controller.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M components/chooser_controller/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M components/chooser_controller/chooser_controller.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M components/chooser_controller/chooser_controller.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M components/chooser_controller/mock_chooser_controller.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 19 (4 generated)
juncai
reillyg@chromium.org: Please review changes in //chrome/browser/extensions/ //components/chooser_controller.gypi //components/chooser_controller/ rsesek@chromium.org: Please review changes in //chrome/browser/ui/cocoa/ msw@chromium.org: ...
4 years, 6 months ago (2016-06-21 22:56:46 UTC) #2
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2086663003/diff/20001/components/chooser_controller/chooser_controller.cc File components/chooser_controller/chooser_controller.cc (right): https://codereview.chromium.org/2086663003/diff/20001/components/chooser_controller/chooser_controller.cc#newcode21 components/chooser_controller/chooser_controller.cc:21: } Make owning_frame_ non-const to avoid this cast. This ...
4 years, 6 months ago (2016-06-21 23:47:45 UTC) #3
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2086663003/diff/20001/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc File chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc (right): https://codereview.chromium.org/2086663003/diff/20001/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc#newcode16 chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc:16: bluetooth_chooser_controller_ = bluetooth_chooser_controller.get(); Please add a comment here explaining ...
4 years, 6 months ago (2016-06-22 00:01:33 UTC) #4
juncai
https://codereview.chromium.org/2086663003/diff/20001/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc File chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc (right): https://codereview.chromium.org/2086663003/diff/20001/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc#newcode16 chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc:16: bluetooth_chooser_controller_ = bluetooth_chooser_controller.get(); On 2016/06/22 00:01:32, Reilly Grant wrote: ...
4 years, 6 months ago (2016-06-22 01:17:45 UTC) #5
msw
https://codereview.chromium.org/2086663003/diff/40001/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc File chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc (right): https://codereview.chromium.org/2086663003/diff/40001/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc#newcode16 chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc:16: // Since ChromeExtensionBluetoothChooser object is destroyed before the I ...
4 years, 6 months ago (2016-06-22 18:23:17 UTC) #6
Robert Sesek
https://codereview.chromium.org/2086663003/diff/60001/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h File chrome/browser/ui/cocoa/chooser_content_view_cocoa.h (right): https://codereview.chromium.org/2086663003/diff/60001/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h#newcode35 chrome/browser/ui/cocoa/chooser_content_view_cocoa.h:35: ChooserController: nit: lowercase first c https://codereview.chromium.org/2086663003/diff/60001/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h#newcode72 chrome/browser/ui/cocoa/chooser_content_view_cocoa.h:72: - (NSInteger)numOptions; ...
4 years, 6 months ago (2016-06-22 21:46:30 UTC) #7
juncai
https://codereview.chromium.org/2086663003/diff/40001/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc File chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc (right): https://codereview.chromium.org/2086663003/diff/40001/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc#newcode16 chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc:16: // Since ChromeExtensionBluetoothChooser object is destroyed before the On ...
4 years, 6 months ago (2016-06-22 22:41:21 UTC) #8
msw
I also think this is a bit confusing, but lgtm https://codereview.chromium.org/2086663003/diff/40001/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc File chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc (right): https://codereview.chromium.org/2086663003/diff/40001/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc#newcode16 ...
4 years, 6 months ago (2016-06-22 23:13:37 UTC) #9
Robert Sesek
On 2016/06/22 23:13:37, msw wrote: > I also think this is a bit confusing, but ...
4 years, 5 months ago (2016-06-27 22:13:50 UTC) #10
juncai
On 2016/06/27 22:13:50, Robert Sesek wrote: > On 2016/06/22 23:13:37, msw wrote: > > I ...
4 years, 5 months ago (2016-06-28 01:08:43 UTC) #11
Robert Sesek
LGTM thanks that's more clear
4 years, 5 months ago (2016-06-28 22:26:01 UTC) #12
Reilly Grant (use Gerrit)
lgtm
4 years, 5 months ago (2016-06-28 22:29:52 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2086663003/120001
4 years, 5 months ago (2016-06-28 23:29:47 UTC) #16
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 5 months ago (2016-06-29 01:57:00 UTC) #17
commit-bot: I haz the power
4 years, 5 months ago (2016-06-29 01:58:36 UTC) #19
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/474e1e11c78fc65fe773af28dcec21bb3014b269
Cr-Commit-Position: refs/heads/master@{#402647}

Powered by Google App Engine
This is Rietveld 408576698