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

Issue 2630473003: MacViews: Harmony for toolbar actions bubbles. (Closed)

Created:
3 years, 11 months ago by tapted
Modified:
3 years, 9 months ago
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: Harmony for toolbar actions bubbles. These are used for - DevModeBubbleDelegate - NtpOverriddenBubbleDelegate - ProxyOverriddenBubbleDelegate - SettingsApiBubbleDelegate - SuspiciousExtensionBubbleDelegate - BlockedActionBubbleDelegate Adds a ToolbarActionsBarBubbleViewsPresenter for showing the toolkit-views bubble on a Cocoa browser. It observes the Views bubble and notifies the Cocoa BrowserActionsController when it closes. One issue: the Cocoa bubble uses a `BOOL anchoredToAction;` data member whereas the Views bubble inspects the anchor_view's ID. The latter doesn't work for a Cocoa browser, so make these consistent by adding the same data member to the views bubble. Adds a TestBrowserDialog case for showing the DevModeBubble with Views on all desktop platforms. These need to be added for the other bubble types. Brings up all the views-based toolbar action bubble tests on Mac by factoring out two functions that depend on whether the Browser window is Cocoa or toolkit-views. Screenshot at http://crbug.com/654128#c5 (it's currently too wide under Harmony on Mac, but there are framework fixes coming for that). The interactive bubble test can be invoked with `browser_tests --gtest_filter=BrowserDialogTest.Invoke --interactive --dialog=ExtensionMessageBubbleViewBrowserTest.InvokeDialog_devmode_warning` BUG=654128, 654126, 654121 Review-Url: https://codereview.chromium.org/2630473003 Cr-Commit-Position: refs/heads/master@{#456329} Committed: https://chromium.googlesource.com/chromium/src/+/0400d0a14218e82b41e2be64fb3174e70352b4e7

Patch Set 1 : nits #

Patch Set 2 : Rebase, but some diff can be culled #

Patch Set 3 : Harmony anchoring #

Patch Set 4 : Cleanups #

Patch Set 5 : selfnits #

Patch Set 6 : Fix DialogBrowserTest #

Total comments: 14

Patch Set 7 : respond to comments #

Patch Set 8 : base::EraseIf #

Total comments: 9

Patch Set 9 : respond to comments #

Total comments: 9

Patch Set 10 : respond to comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+405 lines, -73 lines) Patch
M chrome/browser/ui/BUILD.gn View 1 2 3 4 5 6 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_actions_controller.h View 1 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm View 1 2 3 4 5 6 7 chunks +31 lines, -14 lines 0 comments Download
A chrome/browser/ui/cocoa/extensions/extension_message_bubble_views_browsertest_mac.mm View 1 2 3 1 chunk +89 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_views_presenter.h View 1 2 3 4 5 6 1 chunk +56 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_views_presenter.mm View 1 2 3 4 5 6 7 8 1 chunk +57 lines, -0 lines 0 comments Download
M chrome/browser/ui/extensions/extension_message_bubble_browsertest.h View 1 2 3 3 chunks +13 lines, -1 line 0 comments Download
M chrome/browser/ui/test/test_browser_dialog.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 5 chunks +61 lines, -47 lines 0 comments Download
A chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest_nonmac.cc View 1 2 3 4 5 6 7 8 9 1 chunk +51 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/toolbar/browser_actions_container.cc View 1 2 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.cc View 1 2 3 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views_unittest.cc View 1 2 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 84 (74 generated)
tapted
Hi Devlin, please take a look overall, for all the toolbar-y stuff +ellyjones: please take ...
3 years, 9 months ago (2017-03-08 00:55:20 UTC) #49
Elly Fong-Jones
lgtm :) https://codereview.chromium.org/2630473003/diff/260001/chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_views_presenter.h File chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_views_presenter.h (right): https://codereview.chromium.org/2630473003/diff/260001/chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_views_presenter.h#newcode37 chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_views_presenter.h:37: bool anchored_to_action_view); what is an action view ...
3 years, 9 months ago (2017-03-08 16:33:45 UTC) #56
Devlin
Nifty! A few small nits + questions for my own edification. https://codereview.chromium.org/2630473003/diff/260001/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm File chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm (right): ...
3 years, 9 months ago (2017-03-09 02:49:49 UTC) #57
tapted
https://codereview.chromium.org/2630473003/diff/260001/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm File chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm (right): https://codereview.chromium.org/2630473003/diff/260001/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm#newcode826 chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm:826: // No need to set |activeBubble_| as it's only ...
3 years, 9 months ago (2017-03-09 10:24:16 UTC) #64
Devlin
lgtm https://codereview.chromium.org/2630473003/diff/300001/chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_views_presenter.mm File chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_views_presenter.mm (right): https://codereview.chromium.org/2630473003/diff/300001/chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_views_presenter.mm#newcode22 chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_views_presenter.mm:22: DCHECK(!active_bubble_); nit: maybe DCHECK(!active_bubble_) << "|active_bubble_| should have ...
3 years, 9 months ago (2017-03-09 16:18:51 UTC) #65
tapted
+pkasting for chrome/browser/ui OWNERS Missing OWNER reviewers for these files: chrome/browser/ui/test/test_browser_dialog.cc chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest_nonmac.cc Please take ...
3 years, 9 months ago (2017-03-10 04:57:40 UTC) #70
Peter Kasting
LGTM https://codereview.chromium.org/2630473003/diff/320001/chrome/browser/ui/test/test_browser_dialog.cc File chrome/browser/ui/test/test_browser_dialog.cc (right): https://codereview.chromium.org/2630473003/diff/320001/chrome/browser/ui/test/test_browser_dialog.cc#newcode118 chrome/browser/ui/test/test_browser_dialog.cc:118: base::EraseIf(added, [](views::Widget* widget) { Nice use of this ...
3 years, 9 months ago (2017-03-10 08:29:55 UTC) #73
tapted
https://codereview.chromium.org/2630473003/diff/320001/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc File chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc (right): https://codereview.chromium.org/2630473003/diff/320001/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc#newcode56 chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc:56: void CloseBubble(Browser* browser) override; On 2017/03/10 08:29:54, Peter Kasting ...
3 years, 9 months ago (2017-03-13 06:04:57 UTC) #78
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/2630473003/340001
3 years, 9 months ago (2017-03-13 06:05:26 UTC) #81
commit-bot: I haz the power
3 years, 9 months ago (2017-03-13 06:10:04 UTC) #84
Message was sent while issue was closed.
Committed patchset #10 (id:340001) as
https://chromium.googlesource.com/chromium/src/+/0400d0a14218e82b41e2be64fb31...

Powered by Google App Engine
This is Rietveld 408576698