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

Issue 1308293002: [Mac] Refactor bookmark pulsing into BookmarkBubbleObserverCocoa. (Closed)

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

Description

[Mac] Refactor bookmark pulsing into BookmarkBubbleObserverCocoa. This moves c/b/ui/views/bookmarks/bookmark_bubble_view_observer.h to c/b/ui/bookmarks/bookmark_bubble_observer.h since there was nothing Views-specific about it. We can now use it with the Cocoa BookmarkBubbleController. Benefits: - Consumers of the platform-independent code in chrome/browser/ui/bookmarks become more consistent. - Further decoupling of the bookmark bubble from the browser window (e.g. allows the browser window to not care whether it shows a Cocoa bubble or a Views bubble). It also allows the pair of notifications (NSWindowWillCloseNotification on the bubble window and kPulseBookmarkButtonNotification) to be consolidated into an observer. BookmarkBubbleObserverCocoa encapsulates locking toolbar visibility and pulsing the currently edited bookmark during the bubble's lifetime. This allows moving the logic out of BookmarkBubbleController. Logic to pulse the bookmark now resides entirely in BookmarkBarController and can be better tested. This also removes kPulseBookmarkButtonNotification, which was only used by BookmarkBubbleController to inform BookmarkBarController to pulse a button in the bar. BUG=524320 Committed: https://crrev.com/5c23020388bcf81ea3b69d70bdd879671519231b Cr-Commit-Position: refs/heads/master@{#345716}

Patch Set 1 #

Patch Set 2 : Fix compile. #

Total comments: 28

Patch Set 3 : Address comments #

Total comments: 4

Patch Set 4 : Address comments. Update unit_tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+299 lines, -270 lines) Patch
A chrome/browser/ui/bookmarks/bookmark_bubble_observer.h View 1 chunk +23 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h View 3 chunks +17 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm View 1 2 3 5 chunks +55 lines, -38 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm View 1 chunk +31 lines, -22 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h View 1 2 4 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm View 1 2 10 chunks +18 lines, -61 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm View 1 2 3 6 chunks +29 lines, -39 lines 0 comments Download
A chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_observer_cocoa.h View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_observer_cocoa.mm View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_button.h View 1 chunk +0 lines, -14 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm View 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h View 1 2 3 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.mm View 1 2 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa_unittest.mm View 1 2 3 2 chunks +3 lines, -12 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm View 1 2 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.h View 1 2 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 2 chunks +14 lines, -20 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.h View 1 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h View 4 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc View 4 chunks +8 lines, -5 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/chrome_browser_ui.gypi View 1 2 3 chunks +3 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 15 (4 generated)
jackhou1
tapted, PTAL
5 years, 4 months ago (2015-08-24 08:32:20 UTC) #2
tapted
I really like this - those notifications make for some very confusing codepaths. The BUG= ...
5 years, 3 months ago (2015-08-25 01:13:21 UTC) #3
jackhou1
https://codereview.chromium.org/1308293002/diff/20001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h (right): https://codereview.chromium.org/1308293002/diff/20001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h#newcode27 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h:27: @class BookmarkContextMenuCocoaController; On 2015/08/25 01:13:20, tapted wrote: > is ...
5 years, 3 months ago (2015-08-25 04:32:29 UTC) #4
tapted
lgtm (although there are some compile errors). I think it's worth adding to the CL ...
5 years, 3 months ago (2015-08-25 05:46:34 UTC) #5
jackhou1
https://codereview.chromium.org/1308293002/diff/40001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm (right): https://codereview.chromium.org/1308293002/diff/40001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm#newcode2342 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm:2342: On 2015/08/25 05:46:34, tapted wrote: > nit: remove added ...
5 years, 3 months ago (2015-08-25 07:01:10 UTC) #6
jackhou1
asvitkine, please review for OWNERS of c/b/ui/cocoa/bookmarks/ msw, please review for OWNERS of c/b/ui/views/
5 years, 3 months ago (2015-08-25 22:40:53 UTC) #8
msw
c/b/ui/views/ lgtm
5 years, 3 months ago (2015-08-25 23:14:48 UTC) #9
Alexei Svitkine (slow)
lgtm
5 years, 3 months ago (2015-08-26 15:43:01 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1308293002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1308293002/60001
5 years, 3 months ago (2015-08-26 22:16:29 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 3 months ago (2015-08-26 23:14:22 UTC) #14
commit-bot: I haz the power
5 years, 3 months ago (2015-08-26 23:15:01 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/5c23020388bcf81ea3b69d70bdd879671519231b
Cr-Commit-Position: refs/heads/master@{#345716}

Powered by Google App Engine
This is Rietveld 408576698