[MacViews] Wire up ExtensionPopup |
|||||
Issue descriptionThis is used for browser actions I suspect. It is invoked via ExtensionActionPlatformDelegateCocoa::ShowPopup() and ExtensionPopup::Create().
,
Jun 8 2017
Note this is entirely WebUI. It doesn't need to block, or be blocked on, Harmony. I'm actually considering just doing this sooner rather than later due to long-standing bugs in the Cocoa version that nobody wants to fix and don't exist in the toolkit-views version. See e.g. Issue 428044
,
Oct 16 2017
,
Jan 30 2018
,
Jan 30 2018
For this to get plumbed correctly, top view Chrome also needs to be in views.
,
Jan 30 2018
re #c6: can you point to something specific? c/b/ui/views/extensions/extension_popup.* doesn't have any c/b/ui/views dependencies except for c/b/ui/views/extensions/extension_view_views.h c/b/ui/views/extensions/extension_view_views.* only depends on c/b/ui/views/extensions/extension_popup.h This should actually be one of the easier dialogs to plumb through :) It Should™️ just be a matter of updating chrome/browser/ui/cocoa/extensions/extension_view_mac.mm's ExtensionViewHost::CreateExtensionView() to optionally return the view created by chrome/browser/ui/views/extensions/extension_view_views.cc. To avoid duplicate symbols, guard the definition in chrome/browser/ui/views/extensions/extension_view_views.cc with #if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER) and repeat its guts in extension_view_mac.mm Of course.. that's just the plumbing side of things. *actually* getting a views::Webview to work reliably on Mac may run into some quirks.
,
Jan 31 2018
Re: #7 ExtensionPopup depends on an |anchor_view| [1] (this is the view used to place the popup) and this is passed on to the BubbleDialogDelegateView superclass. BubbleDialogDelegateView will register an observer on this view and its particularly interested when the bounds change and visibility changes so it can reposition itself. ToolbarActionView [2] provides itself as the |anchor_view| when showing the ExtensionPopup and those are held in the BrowserActionsContainer view [3] [1] https://cs.chromium.org/chromium/src/chrome/browser/ui/views/extensions/extension_popup.h?rcl=fe1175990287fbc73c20b7f59705cc3d4561b6c2&l=53 [2] https://cs.chromium.org/chromium/src/chrome/browser/ui/views/toolbar/toolbar_action_view.cc?rcl=1ee154a4ebb249610476f5e57c71fba009b604c8&l=229 [3] https://cs.chromium.org/chromium/src/chrome/browser/ui/views/toolbar/browser_actions_container.cc?rcl=1ee154a4ebb249610476f5e57c71fba009b604c8&l=156
,
Jan 31 2018
The land of Cocoa takes a rect approach and queries the rect directly against the BrowserActionsController (anchoredAt instead of anchor view). https://cs.chromium.org/chromium/src/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm?rcl=1ee154a4ebb249610476f5e57c71fba009b604c8&l=71
,
Jan 31 2018
Yeah we can't use toolbar_action_view.cc or browser_actions_container.cc However, we should be able to anchor the popup using the result of things like -[BrowserActionsController popupPointForView:..] and -[BrowserActionsController:popupPointForId:] BubbleDialogDelegateView can anchor on a point or a views::View. To fix parenting/lifetime it might be necessary to implement a browser-action-specific flavour of bubble_anchor_helper_views.h's KeepBubbleAnchored().
,
Feb 14 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b36af4e16af33aa286fd266869f4ed2b7d2e132a commit b36af4e16af33aa286fd266869f4ed2b7d2e132a Author: Robert Liao <robliao@chromium.org> Date: Wed Feb 14 18:11:19 2018 Add Child Move and Resize Support to the BubbleAnchorHelper The ExtensionPopup resizes its view dynamically after it can be anchored and shown. This change adds child resize support to BubbleAnchorHelper to accommodate that scenario. Move is brought along for free. BUG= 728174 Change-Id: I7ca12b92da339263ca5558254d2bbb0595a57b4c Reviewed-on: https://chromium-review.googlesource.com/915010 Commit-Queue: Robert Liao <robliao@chromium.org> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#536753} [modify] https://crrev.com/b36af4e16af33aa286fd266869f4ed2b7d2e132a/chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm [modify] https://crrev.com/b36af4e16af33aa286fd266869f4ed2b7d2e132a/chrome/browser/ui/cocoa/bubble_anchor_helper_views_unittest.mm
,
Feb 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/151790add2db27316a3fffed72028eb4729047d8 commit 151790add2db27316a3fffed72028eb4729047d8 Author: Robert Liao <robliao@chromium.org> Date: Thu Feb 15 01:19:38 2018 Revert "Add Child Move and Resize Support to the BubbleAnchorHelper" This reverts commit b36af4e16af33aa286fd266869f4ed2b7d2e132a. Reason for revert: There seem to be some rounding issues during continuous repositioning of the parent window. Original change's description: > Add Child Move and Resize Support to the BubbleAnchorHelper > > The ExtensionPopup resizes its view dynamically after it can be > anchored and shown. > > This change adds child resize support to BubbleAnchorHelper to > accommodate that scenario. Move is brought along for free. > > BUG= 728174 > > Change-Id: I7ca12b92da339263ca5558254d2bbb0595a57b4c > Reviewed-on: https://chromium-review.googlesource.com/915010 > Commit-Queue: Robert Liao <robliao@chromium.org> > Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> > Cr-Commit-Position: refs/heads/master@{#536753} TBR=ellyjones@chromium.org,robliao@chromium.org Change-Id: Ic8c3c6766f10a779b467605f808c883869def07e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 728174 Reviewed-on: https://chromium-review.googlesource.com/920604 Reviewed-by: Robert Liao <robliao@chromium.org> Commit-Queue: Robert Liao <robliao@chromium.org> Cr-Commit-Position: refs/heads/master@{#536915} [modify] https://crrev.com/151790add2db27316a3fffed72028eb4729047d8/chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm [modify] https://crrev.com/151790add2db27316a3fffed72028eb4729047d8/chrome/browser/ui/cocoa/bubble_anchor_helper_views_unittest.mm
,
Feb 15 2018
The attached image shows the views popup in the Cocoa browser.
,
Feb 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7dfb9b6d935c16d09aa36b7506c719794528aeaa commit 7dfb9b6d935c16d09aa36b7506c719794528aeaa Author: Robert Liao <robliao@chromium.org> Date: Fri Feb 16 20:39:51 2018 Add Child Resize Support to the BubbleAnchorHelper The ExtensionPopup resizes its view dynamically after it can be anchored and shown. This change adds child resize support to BubbleAnchorHelper to accommodate that scenario. BUG= 728174 Change-Id: I4422e5b1e0410ef6bed1ec7d1c77961cef061ced Reviewed-on: https://chromium-review.googlesource.com/922785 Commit-Queue: Robert Liao <robliao@chromium.org> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#537408} [modify] https://crrev.com/7dfb9b6d935c16d09aa36b7506c719794528aeaa/chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm [modify] https://crrev.com/7dfb9b6d935c16d09aa36b7506c719794528aeaa/chrome/browser/ui/cocoa/bubble_anchor_helper_views_unittest.mm
,
Feb 20 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/13f7178dec54c97684f63d330db749d648eee697 commit 13f7178dec54c97684f63d330db749d648eee697 Author: Robert Liao <robliao@chromium.org> Date: Tue Feb 20 18:07:10 2018 Refactor ExtensionPopupController Usage into ExtensionPopupTestManagerCocoa This allows for easy migration to the views version of ExtensionPopup. BUG= 728174 Change-Id: I2c9085952cd351247aeefa4247cef7fefa974c40 Reviewed-on: https://chromium-review.googlesource.com/924682 Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Commit-Queue: Robert Liao <robliao@chromium.org> Cr-Commit-Position: refs/heads/master@{#537819} [modify] https://crrev.com/13f7178dec54c97684f63d330db749d648eee697/chrome/browser/ui/cocoa/extensions/browser_action_test_util_mac.mm
,
Feb 21 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/86f94f52fd03c969761243b197bdbbb12f4da769 commit 86f94f52fd03c969761243b197bdbbb12f4da769 Author: Robert Liao <robliao@chromium.org> Date: Wed Feb 21 06:06:42 2018 Wire Up ExtensionPopup a la ExtensionPopupViewsMac to the Cocoa Browser BUG= 728174 Change-Id: Ib5ba27277f1eb12c793eac20a36798967ed17066 Reviewed-on: https://chromium-review.googlesource.com/922799 Commit-Queue: Robert Liao <robliao@chromium.org> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#538035} [modify] https://crrev.com/86f94f52fd03c969761243b197bdbbb12f4da769/chrome/browser/ui/BUILD.gn [rename] https://crrev.com/86f94f52fd03c969761243b197bdbbb12f4da769/chrome/browser/ui/cocoa/extensions/browser_action_test_util_views_mac.mm [modify] https://crrev.com/86f94f52fd03c969761243b197bdbbb12f4da769/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.h [modify] https://crrev.com/86f94f52fd03c969761243b197bdbbb12f4da769/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm [add] https://crrev.com/86f94f52fd03c969761243b197bdbbb12f4da769/chrome/browser/ui/cocoa/extensions/extension_popup_views_mac.h [add] https://crrev.com/86f94f52fd03c969761243b197bdbbb12f4da769/chrome/browser/ui/cocoa/extensions/extension_popup_views_mac.mm [modify] https://crrev.com/86f94f52fd03c969761243b197bdbbb12f4da769/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm [modify] https://crrev.com/86f94f52fd03c969761243b197bdbbb12f4da769/chrome/browser/ui/views/extensions/extension_view_views.cc
,
Feb 21 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b14da7b8517a3325b26267e68285bf8feb534e36 commit b14da7b8517a3325b26267e68285bf8feb534e36 Author: Robert Liao <robliao@chromium.org> Date: Wed Feb 21 18:48:18 2018 Quick Cleanup from https://chromium-review.googlesource.com/c/chromium/src/+/922799 BUG= 728174 TBR=tapted@chromium.org Quick style fixes. Change-Id: Ie1272cea3b6fc96dd607e0ec6e8ac484872baed6 Reviewed-on: https://chromium-review.googlesource.com/929305 Reviewed-by: Robert Liao <robliao@chromium.org> Commit-Queue: Robert Liao <robliao@chromium.org> Cr-Commit-Position: refs/heads/master@{#538165} [modify] https://crrev.com/b14da7b8517a3325b26267e68285bf8feb534e36/chrome/browser/ui/cocoa/extensions/extension_popup_views_mac.h [modify] https://crrev.com/b14da7b8517a3325b26267e68285bf8feb534e36/chrome/browser/ui/cocoa/extensions/extension_popup_views_mac.mm
,
Feb 22 2018
,
Mar 1 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cd92b8f19e21242c9e086d4501ef341be2ab8999 commit cd92b8f19e21242c9e086d4501ef341be2ab8999 Author: Robert Liao <robliao@chromium.org> Date: Thu Mar 01 17:53:20 2018 Temporarily Disable ExtensionPopup Views for Mac This change will be reverted after the M66 branch point. ExtensionPopup Views will need some harmonization work to bring it up to parity with some behavior provided by Mac. BUG= 728174 Change-Id: Ia01160117c9dbda10e57d4f4b5a4fe706a39f36c Reviewed-on: https://chromium-review.googlesource.com/941883 Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Commit-Queue: Robert Liao <robliao@chromium.org> Cr-Commit-Position: refs/heads/master@{#540203} [modify] https://crrev.com/cd92b8f19e21242c9e086d4501ef341be2ab8999/chrome/browser/ui/cocoa/browser_dialogs_views_mac.cc [modify] https://crrev.com/cd92b8f19e21242c9e086d4501ef341be2ab8999/chrome/browser/ui/cocoa/browser_dialogs_views_mac.h [modify] https://crrev.com/cd92b8f19e21242c9e086d4501ef341be2ab8999/chrome/browser/ui/cocoa/extensions/browser_action_test_util_views_mac.mm [modify] https://crrev.com/cd92b8f19e21242c9e086d4501ef341be2ab8999/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm [modify] https://crrev.com/cd92b8f19e21242c9e086d4501ef341be2ab8999/chrome/browser/ui/views/extensions/extension_view_views.cc
,
Mar 5 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a0259b3ae165b0673416f02848bed75082d639f4 commit a0259b3ae165b0673416f02848bed75082d639f4 Author: Robert Liao <robliao@chromium.org> Date: Mon Mar 05 18:45:39 2018 Revert "Temporarily Disable ExtensionPopup Views for Mac" This reverts commit cd92b8f19e21242c9e086d4501ef341be2ab8999. Reason for revert: M66 has branched. Original change's description: > Temporarily Disable ExtensionPopup Views for Mac > > This change will be reverted after the M66 branch point. > > ExtensionPopup Views will need some harmonization work to bring it up to > parity with some behavior provided by Mac. > > BUG= 728174 > > Change-Id: Ia01160117c9dbda10e57d4f4b5a4fe706a39f36c > Reviewed-on: https://chromium-review.googlesource.com/941883 > Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> > Commit-Queue: Robert Liao <robliao@chromium.org> > Cr-Commit-Position: refs/heads/master@{#540203} TBR=ellyjones@chromium.org,robliao@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 728174 Change-Id: I8db100c708ec2baf1cd0871f5e2bdc31db08c3c4 Reviewed-on: https://chromium-review.googlesource.com/947230 Reviewed-by: Robert Liao <robliao@chromium.org> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Commit-Queue: Robert Liao <robliao@chromium.org> Cr-Commit-Position: refs/heads/master@{#540880} [modify] https://crrev.com/a0259b3ae165b0673416f02848bed75082d639f4/chrome/browser/ui/cocoa/browser_dialogs_views_mac.cc [modify] https://crrev.com/a0259b3ae165b0673416f02848bed75082d639f4/chrome/browser/ui/cocoa/browser_dialogs_views_mac.h [modify] https://crrev.com/a0259b3ae165b0673416f02848bed75082d639f4/chrome/browser/ui/cocoa/extensions/browser_action_test_util_views_mac.mm [modify] https://crrev.com/a0259b3ae165b0673416f02848bed75082d639f4/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm [modify] https://crrev.com/a0259b3ae165b0673416f02848bed75082d639f4/chrome/browser/ui/views/extensions/extension_view_views.cc |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by tapted@chromium.org
, Jun 8 2017Labels: Proj-MacViews