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

Issue 1307533002: [Mac] Enable MacViews bookmark bubble behind --enable-mac-views-dialogs. (Closed)

Created:
5 years, 4 months ago by jackhou1
Modified:
5 years, 4 months ago
Reviewers:
tapted
CC:
chromium-reviews, tfarina, noyau+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@modal
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mac] Enable MacViews bookmark bubble behind --enable-mac-views-dialogs. This allows BrowserWindowCocoa to show the Views BookmarkBubbleView. Similar to WebsiteSettingsPopupView, BookmarkBubbleView::ShowBubble() can now take an anchor rect instead of an anchor View. This will also use the Views bookmark editor when opened from the bubble. In constrained_window::CreateBrowserModalDialogViews, don't create a WidgetModalDialogHostObserverViews since the dialog position is automatically managed by NSWindow. Closed in favor of: https://codereview.chromium.org/1308713002/ BUG=511051

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rebase atop https://codereview.chromium.org/1309583002/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -47 lines) Patch
A chrome/browser/ui/bookmarks/bookmark_bubble_observer.h View 1 chunk +22 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_dialogs.h View 1 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm View 4 chunks +39 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.h View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h View 4 chunks +11 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc View 1 5 chunks +19 lines, -9 lines 0 comments Download
D chrome/browser/ui/views/bookmarks/bookmark_bubble_view_observer.h View 1 chunk +0 lines, -19 lines 0 comments Download
M chrome/browser/ui/views/browser_dialogs_views_mac.cc View 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 4 chunks +5 lines, -5 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 4 (1 generated)
jackhou1
tapted, PTAL I'll update the CL description with size impact tomorrow (it's compiling).
5 years, 4 months ago (2015-08-20 06:58:20 UTC) #2
tapted
The bubble seems a lot harder than the edit dialog... it's probably justified, but I ...
5 years, 4 months ago (2015-08-21 00:31:52 UTC) #3
jackhou1
5 years, 4 months ago (2015-08-21 01:55:58 UTC) #4
> The bubble seems a lot harder than the edit dialog... it's probably justified,
> but I think we should split it out to a different CL from the edit dialog if
> possible.
> 
> i.e. start with just edit dialog, accessible either with (Cocoa versions of)
> bookmarks_toolbar->Edit... or bookmark bubble -> Edit...
> 
> Then, address the bubble in isolation. Ideally bookmark_bubble_controller.mm
> doesn't get involved... Perhaps that means implementing a separate
> mac-views-only bridge class (or perhaps that's too hard). Currently there are
a
> few too many changes to existing classes (i.e. changes we should need to
revert
> whether we go with mac_views_browser or whether we rollback). The benefit of a
> separate bridge class would be that it's clear what code needs to be deleted
> once this experiment is over.

Split out bookmark editor changes to https://codereview.chromium.org/1309583002/

BookmarkBubbleController is somewhat coupled with the browser window. This CL
depends on it to lock visibility of the toolbar in fullscreen, and to pulse the
correct item in the bookmark bar. That said, I think we can avoid
BookmarkBubbleController by moving some logic in -startPulsingBookmarkButton: to
BookmarkBarController. I'll get back to you.

https://codereview.chromium.org/1307533002/diff/1/components/constrained_wind...
File components/constrained_window/constrained_window_views.cc (right):

https://codereview.chromium.org/1307533002/diff/1/components/constrained_wind...
components/constrained_window/constrained_window_views.cc:173: return widget;
On 2015/08/21 00:31:52, tapted wrote:
> I know the compiler allows it.. but there's something weird about making the
> code below unreachable on mac. Perhaps
> 
> #if defined(OS_MACOSX)
>   bool requires_positioning = false;
> #else
>   bool requires_positioning = dialog->UseNewStyleForThisDialog();
> #endif
> 
> if (!requires_positioning)
>   return widget;
> 
> 
> 
> But also this will affect the mac_views_browser build, where the code here
> currently works OK (I think..). Is mac_views_browser still OK with this
change?
> What breaks without it? Maybe there's an alternative..

Replied in https://codereview.chromium.org/1309583002/

Powered by Google App Engine
This is Rietveld 408576698