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

Issue 2586373003: MacViews: Allow toolkit-views for "Global Error" bubbles. (Closed)

Created:
4 years ago by tapted
Modified:
3 years, 11 months ago
Reviewers:
Robert Sesek, msw
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, mac-reviews_chromium.org, tfarina, extensions-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Allow toolkit-views for "Global Error" bubbles. The views dialogs will be chosen when run with the --secondary-ui-md flag. When the parent is a Cocoa browser window, an anchor point is chosen rather than an anchor view, and the GlobalErrorBubbleView constructor is updated to use this point when the anchor view is null. The tricker part is that: a) These dialogs are persistent (they do not dismiss when they lose focus), and b) The dialogs appear on the right side of the window, This means they're more prone to "falling off" their anchor point when resizing the browser window. For this, add a "BubbleAnchorHelper" framework which is enabled by passing a visible toolkit-views bubble to a KeepBubbleAnchored() function. The framework captures the anchor position and ensures it is maintained when changes to the parent NSWindow are observed. Screenshot at http://crbug.com/675496#c1 BUG=675496 Review-Url: https://codereview.chromium.org/2586373003 Cr-Commit-Position: refs/heads/master@{#442503} Committed: https://chromium.googlesource.com/chromium/src/+/84ce68dbf0aee72a6cfc16b3d50124078836d83c

Patch Set 1 : ViewsBubbleAnchorHelper #

Patch Set 2 : neater #

Patch Set 3 : workee #

Patch Set 4 : a test \o/ #

Patch Set 5 : rebase again #

Patch Set 6 : unstage #

Total comments: 4

Patch Set 7 : addObserverForName #

Unified diffs Side-by-side diffs Delta from patch set Stats (+344 lines, -19 lines) Patch
M chrome/browser/ui/BUILD.gn View 1 2 3 4 6 chunks +7 lines, -4 lines 0 comments Download
A chrome/browser/ui/cocoa/bubble_anchor_helper_views.h View 1 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm View 1 2 3 4 5 6 1 chunk +109 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/bubble_anchor_helper_views_unittest.mm View 1 2 3 1 chunk +120 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/global_error_bubble_controller.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/global_error_bubble_controller.mm View 1 2 3 4 5 6 3 chunks +16 lines, -5 lines 0 comments Download
A chrome/browser/ui/cocoa/global_error_bubble_controller_views.mm View 1 2 1 chunk +32 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/toolbar/toolbar_controller.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm View 1 2 3 1 chunk +16 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/global_error_bubble_view.h View 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/global_error_bubble_view.cc View 1 2 3 chunks +15 lines, -4 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 42 (32 generated)
tapted
Hi Robert, please take a look
3 years, 11 months ago (2017-01-05 10:57:05 UTC) #25
Robert Sesek
> The tricker part is that: > a) These dialogs are persistent (they do not ...
3 years, 11 months ago (2017-01-05 19:50:08 UTC) #26
tapted
https://codereview.chromium.org/2586373003/diff/180001/chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm File chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm (right): https://codereview.chromium.org/2586373003/diff/180001/chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm#newcode107 chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm:107: - (instancetype)initWithAnchorHelper:(BubbleAnchorHelper*)helper On 2017/01/05 19:50:08, Robert Sesek wrote: > ...
3 years, 11 months ago (2017-01-06 00:14:05 UTC) #29
tapted
Whoops - forgot this bit. I had made a CL and everything: On 2017/01/05 19:50:08, ...
3 years, 11 months ago (2017-01-06 01:30:08 UTC) #32
Robert Sesek
On 2017/01/06 01:30:08, tapted wrote: > Whoops - forgot this bit. I had made a ...
3 years, 11 months ago (2017-01-06 22:28:59 UTC) #33
tapted
On 2017/01/06 22:28:59, Robert Sesek wrote: > On 2017/01/06 01:30:08, tapted wrote: > > Whoops ...
3 years, 11 months ago (2017-01-09 21:43:44 UTC) #34
tapted
+msw for c/b/ui/views/global_error_bubble_view.* OWNERS - please take a look
3 years, 11 months ago (2017-01-09 21:44:31 UTC) #36
msw
c/b/ui/views/global_error_bubble_view.* lgtm
3 years, 11 months ago (2017-01-10 00:44:31 UTC) #37
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/2586373003/200001
3 years, 11 months ago (2017-01-10 02:41:24 UTC) #39
commit-bot: I haz the power
3 years, 11 months ago (2017-01-10 05:54:24 UTC) #42
Message was sent while issue was closed.
Committed patchset #7 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/84ce68dbf0aee72a6cfc16b3d501...

Powered by Google App Engine
This is Rietveld 408576698