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

Issue 151593005: Implement permission bubble view for Cocoa. (Closed)

Created:
6 years, 10 months ago by leng
Modified:
6 years, 9 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Adds classes to implement the permissions bubble on the Mac. PermissionBubbleCocoa is the Mac implementation of the platform- independent PermissionBubbleView. It creates the Cocoa implementation when requested. PermissionBubbleController is the Cocoa implementation for the PermissionBubbleCocoa. It is a UIViewController which displays the bubble, and closes itself. The PermissionBubbleCocoa object is owned by the BrowserWindowController, and provided to the current PermissionBubbleManager (tied to WebContents). The PermissionBubbleManager then uses the implementation of PermissionBubbleView to display the UI when required. Also adds MockPermissionBubbleDelegate for testing, and tests for PermissionBubbleController. BUG=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=254635

Patch Set 1 #

Patch Set 2 : added a few comments #

Total comments: 88

Patch Set 3 : addressed feedback #

Patch Set 4 : more feedback addressed #

Total comments: 23

Patch Set 5 : moved to cocoa/website_settings. #

Patch Set 6 : use ConstrainedWindowButton #

Patch Set 7 : Fixed variable name #

Total comments: 18

Patch Set 8 : better button sizing & layout #

Patch Set 9 : rebase #

Patch Set 10 : post-merge cleanup #

Patch Set 11 : rebase #

Patch Set 12 : Ensure only one delegate owns the view at a time #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+759 lines, -0 lines) Patch
M chrome/browser/ui/cocoa/browser_window_controller.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +13 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h View 1 2 3 4 5 6 7 8 9 1 chunk +45 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +59 lines, -0 lines 4 comments Download
A chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +44 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm View 1 2 3 4 5 6 7 8 9 1 chunk +309 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/website_settings/permission_bubble_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +230 lines, -0 lines 0 comments Download
A chrome/browser/ui/website_settings/mock_permission_bubble_request.h View 1 2 3 4 5 6 7 8 9 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/ui/website_settings/mock_permission_bubble_request.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 68 (0 generated)
leng
Rachel, Could you take a look before I send this to the owners, please? Thanks! ...
6 years, 10 months ago (2014-01-31 21:11:38 UTC) #1
groby-ooo-7-16
Thank you for providing a comprehensive test set! (Also, you already have a cocoa OWNER ...
6 years, 10 months ago (2014-01-31 22:31:51 UTC) #2
leng
https://codereview.chromium.org/151593005/diff/40001/chrome/browser/ui/cocoa/browser_window_controller.mm File chrome/browser/ui/cocoa/browser_window_controller.mm (right): https://codereview.chromium.org/151593005/diff/40001/chrome/browser/ui/cocoa/browser_window_controller.mm#newcode1601 chrome/browser/ui/cocoa/browser_window_controller.mm:1601: PermissionBubbleManager::FromWebContents(contents)->SetView( On 2014/01/31 22:31:51, groby wrote: > Is it ...
6 years, 10 months ago (2014-02-03 22:38:03 UTC) #3
leng
https://codereview.chromium.org/151593005/diff/40001/chrome/browser/ui/website_settings/mock_permission_bubble_delegate.h File chrome/browser/ui/website_settings/mock_permission_bubble_delegate.h (right): https://codereview.chromium.org/151593005/diff/40001/chrome/browser/ui/website_settings/mock_permission_bubble_delegate.h#newcode12 chrome/browser/ui/website_settings/mock_permission_bubble_delegate.h:12: class MockPermissionBubbleDelegate : public PermissionBubbleDelegate { On 2014/02/03 22:38:04, ...
6 years, 10 months ago (2014-02-04 00:04:21 UTC) #4
groby-ooo-7-16
Sorry, a few more additions :( Mostly nits, but the ConstrainedWindowButton question is slightly bigger. ...
6 years, 10 months ago (2014-02-04 02:39:29 UTC) #5
markusheintz_
https://codereview.chromium.org/151593005/diff/280001/chrome/browser/ui/website_settings/mock_permission_bubble_delegate.h File chrome/browser/ui/website_settings/mock_permission_bubble_delegate.h (right): https://codereview.chromium.org/151593005/diff/280001/chrome/browser/ui/website_settings/mock_permission_bubble_delegate.h#newcode12 chrome/browser/ui/website_settings/mock_permission_bubble_delegate.h:12: class MockPermissionBubbleDelegate : public PermissionBubbleDelegate { FYI. There is ...
6 years, 10 months ago (2014-02-04 09:53:38 UTC) #6
markusheintz_
I wonder whether there should be a website_settings subdirectory in chrome/browser/ui/cocoa/ now. Similiar to chrome/browser/ui/views/website_settings.
6 years, 10 months ago (2014-02-04 09:57:32 UTC) #7
groby-ooo-7-16
Thank you for catching the missing cocoa/website_settings directory - yes, please add.
6 years, 10 months ago (2014-02-04 18:47:10 UTC) #8
leng
I've added the ui/cocoa/website_settings directory. Should I move ui/cocoa/website_settings_bubble_controller* into that directory in a separate ...
6 years, 10 months ago (2014-02-04 21:48:21 UTC) #9
markusheintz_
Thanks a lot for adding a chrome/browser/ui/cocoa/website_settings sub dir. Regarding the MockPermissionBubbleDelegate: I'm ok if ...
6 years, 10 months ago (2014-02-10 16:58:35 UTC) #10
leng
@groby - ping?
6 years, 10 months ago (2014-02-11 17:27:40 UTC) #11
groby-ooo-7-16
LGTM w/ nits https://codereview.chromium.org/151593005/diff/550002/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h File chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h (right): https://codereview.chromium.org/151593005/diff/550002/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h#newcode41 chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h:41: DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa); nit: #include "base/macros.h" https://codereview.chromium.org/151593005/diff/550002/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm File ...
6 years, 10 months ago (2014-02-11 20:10:06 UTC) #12
leng
Making the sizing more robust for the buttons made me realize it should be more ...
6 years, 10 months ago (2014-02-11 22:45:47 UTC) #13
groby-ooo-7-16
Still LGTM :) (In general, if I post LGTM w/nits, feel free to commit immediately ...
6 years, 10 months ago (2014-02-12 19:28:02 UTC) #14
leng
On 2014/02/12 19:28:02, groby wrote: > Still LGTM :) (In general, if I post LGTM ...
6 years, 10 months ago (2014-02-12 22:54:52 UTC) #15
leng
The CQ bit was checked by leng@chromium.org
6 years, 10 months ago (2014-02-12 22:55:22 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/640001
6 years, 10 months ago (2014-02-12 22:57:41 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-12 23:32:33 UTC) #18
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=49940
6 years, 10 months ago (2014-02-12 23:32:33 UTC) #19
leng
On 2014/02/12 23:32:33, I haz the power (commit-bot) wrote: > Retried try job too often ...
6 years, 10 months ago (2014-02-12 23:34:51 UTC) #20
leng
On 2014/02/12 23:34:51, leng wrote: > On 2014/02/12 23:32:33, I haz the power (commit-bot) wrote: ...
6 years, 10 months ago (2014-02-14 18:24:42 UTC) #21
markusheintz_
On 2014/02/14 18:24:42, leng wrote: > On 2014/02/12 23:34:51, leng wrote: > > On 2014/02/12 ...
6 years, 10 months ago (2014-02-18 16:31:21 UTC) #22
leng
The CQ bit was checked by leng@chromium.org
6 years, 10 months ago (2014-02-20 10:51:53 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/990001
6 years, 10 months ago (2014-02-20 12:16:58 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-20 12:49:17 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel, mac_chromium_rel
6 years, 10 months ago (2014-02-20 12:49:18 UTC) #26
leng
The CQ bit was checked by leng@chromium.org
6 years, 10 months ago (2014-02-20 13:43:19 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/1180001
6 years, 10 months ago (2014-02-20 13:44:03 UTC) #28
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-20 16:48:20 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel
6 years, 10 months ago (2014-02-20 16:48:21 UTC) #30
leng
The CQ bit was checked by leng@chromium.org
6 years, 10 months ago (2014-02-21 08:50:57 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/1180001
6 years, 10 months ago (2014-02-21 08:51:24 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-21 08:51:27 UTC) #33
commit-bot: I haz the power
Failed to apply patch for chrome/browser/ui/cocoa/browser_window_controller.mm: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 10 months ago (2014-02-21 08:51:28 UTC) #34
leng
The CQ bit was checked by leng@chromium.org
6 years, 10 months ago (2014-02-21 09:39:32 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/1400001
6 years, 10 months ago (2014-02-21 09:39:56 UTC) #36
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-21 11:02:51 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel
6 years, 10 months ago (2014-02-21 11:02:52 UTC) #38
groby-ooo-7-16
The CQ bit was checked by groby@chromium.org
6 years, 9 months ago (2014-02-27 19:19:27 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/1400001
6 years, 9 months ago (2014-02-27 19:21:27 UTC) #40
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-02-27 22:37:22 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel
6 years, 9 months ago (2014-02-27 22:37:23 UTC) #42
leng
The CQ bit was checked by leng@chromium.org
6 years, 9 months ago (2014-02-28 00:46:11 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/1400001
6 years, 9 months ago (2014-02-28 00:49:26 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/1400001
6 years, 9 months ago (2014-02-28 01:18:23 UTC) #45
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-02-28 04:30:04 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel
6 years, 9 months ago (2014-02-28 04:30:06 UTC) #47
leng
On 2014/02/28 04:30:06, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 9 months ago (2014-02-28 23:16:58 UTC) #48
groby-ooo-7-16
https://codereview.chromium.org/151593005/diff/1600001/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm File chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm (right): https://codereview.chromium.org/151593005/diff/1600001/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm#newcode50 chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm:50: if (delegate_ == delegate) I'm confused - this seems ...
6 years, 9 months ago (2014-03-03 18:34:04 UTC) #49
leng
https://codereview.chromium.org/151593005/diff/1600001/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm File chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm (right): https://codereview.chromium.org/151593005/diff/1600001/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm#newcode50 chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm:50: if (delegate_ == delegate) On 2014/03/03 18:34:05, groby wrote: ...
6 years, 9 months ago (2014-03-03 19:01:03 UTC) #50
groby-ooo-7-16
LGTM for permission_bubble_cocoa.mm (Based on my understanding of offline communication with leng@, that was the ...
6 years, 9 months ago (2014-03-03 19:03:08 UTC) #51
leng
On 2014/03/03 19:03:08, groby wrote: > LGTM for permission_bubble_cocoa.mm (Based on my understanding of offline ...
6 years, 9 months ago (2014-03-03 19:04:28 UTC) #52
leng
The CQ bit was checked by leng@chromium.org
6 years, 9 months ago (2014-03-03 19:06:33 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/1600001
6 years, 9 months ago (2014-03-03 19:09:06 UTC) #54
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-03 19:21:59 UTC) #55
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) app_list_unittests, ash_unittests, aura_unittests, cacheinvalidation_unittests, cc_unittests, check_deps, ...
6 years, 9 months ago (2014-03-03 19:22:00 UTC) #56
leng
The CQ bit was checked by leng@chromium.org
6 years, 9 months ago (2014-03-03 19:44:14 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/1600001
6 years, 9 months ago (2014-03-03 19:44:51 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/1600001
6 years, 9 months ago (2014-03-03 20:04:57 UTC) #59
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-03 20:16:33 UTC) #60
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) app_list_unittests, ash_unittests, aura_unittests, base_unittests, browser_tests, cacheinvalidation_unittests, ...
6 years, 9 months ago (2014-03-03 20:16:36 UTC) #61
leng
The CQ bit was checked by leng@chromium.org
6 years, 9 months ago (2014-03-03 22:00:18 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/1600001
6 years, 9 months ago (2014-03-03 22:01:34 UTC) #63
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-03 23:21:09 UTC) #64
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) base_unittests, interactive_ui_tests, net_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=273474
6 years, 9 months ago (2014-03-03 23:21:10 UTC) #65
leng
The CQ bit was checked by leng@chromium.org
6 years, 9 months ago (2014-03-03 23:31:25 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/151593005/1600001
6 years, 9 months ago (2014-03-03 23:33:31 UTC) #67
commit-bot: I haz the power
6 years, 9 months ago (2014-03-04 01:51:05 UTC) #68
Message was sent while issue was closed.
Change committed as 254635

Powered by Google App Engine
This is Rietveld 408576698