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

Issue 3183013: [Mac] Don't close the Wrench menu after using the zoom buttons if the menu was opened sticky. (Closed)

Created:
10 years, 4 months ago by Robert Sesek
Modified:
9 years, 7 months ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews, John Grabowski, darin-cc_chromium.org, brettw-cc_chromium.org, pam+watch_chromium.org, ben+cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

[Mac] Don't close the Wrench menu after using the zoom buttons if the menu was opened sticky. This runs the Task that updates the zoom information in the UI thread outside of the normal MessageLoop and instead runs it on the native run loop. R=mark BUG=48679 TEST=Open Wrench menu with a click. Use zoom buttons. Menu stays open and page zooms. Other buttons still close menu. TEST=Open Wrench menu with click-hold-drag. Hover and release on zoom buttons. Menu closes and page zooms. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=56566

Patch Set 1 #

Total comments: 31

Patch Set 2 : Address all comments. #

Total comments: 2

Patch Set 3 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+208 lines, -10 lines) Patch
M chrome/browser/cocoa/menu_tracked_button.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/menu_tracked_button.mm View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/wrench_menu_controller.h View 1 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/wrench_menu_controller.mm View 1 2 3 chunks +56 lines, -7 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 2 chunks +2 lines, -1 line 0 comments Download
A chrome/browser/ui_thread_helpers.h View 1 1 chunk +32 lines, -0 lines 0 comments Download
A chrome/browser/ui_thread_helpers_linux.cc View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
A chrome/browser/ui_thread_helpers_mac.mm View 1 2 1 chunk +63 lines, -0 lines 0 comments Download
A chrome/browser/ui_thread_helpers_win.cc View 1 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/wrench_menu_model.h View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Robert Sesek
10 years, 4 months ago (2010-08-17 18:49:43 UTC) #1
Mark Mentovai
http://codereview.chromium.org/3183013/diff/1/4 File chrome/browser/cocoa/wrench_menu_controller.h (right): http://codereview.chromium.org/3183013/diff/1/4#newcode21 chrome/browser/cocoa/wrench_menu_controller.h:21: } } // namespace WrenchMenuControllerInternal http://codereview.chromium.org/3183013/diff/1/5 File chrome/browser/cocoa/wrench_menu_controller.mm (left): ...
10 years, 4 months ago (2010-08-17 19:24:03 UTC) #2
Robert Sesek
Addressed all comments. http://codereview.chromium.org/3183013/diff/1/4 File chrome/browser/cocoa/wrench_menu_controller.h (right): http://codereview.chromium.org/3183013/diff/1/4#newcode21 chrome/browser/cocoa/wrench_menu_controller.h:21: } On 2010/08/17 19:24:03, Mark Mentovai ...
10 years, 4 months ago (2010-08-17 20:11:55 UTC) #3
Mark Mentovai
10 years, 4 months ago (2010-08-17 20:23:38 UTC) #4
LGTM

http://codereview.chromium.org/3183013/diff/1/9
File chrome/browser/ui_thread_helpers_mac.mm (right):

http://codereview.chromium.org/3183013/diff/1/9#newcode39
chrome/browser/ui_thread_helpers_mac.mm:39: UITaskHelperMac* runner =
[UITaskHelperMac new];
rsesek wrote:
> Autoreleasing factories annoy me for some reason.

But they’re all over Cocoa!

I don’t care about the difference between +uiTaskWithTask: or -initWithTask: as
long as you chose one of them. What you have now is good.

http://codereview.chromium.org/3183013/diff/10001/11004
File chrome/browser/cocoa/wrench_menu_controller.mm (right):

http://codereview.chromium.org/3183013/diff/10001/11004#newcode52
chrome/browser/cocoa/wrench_menu_controller.mm:52: WrenchMenuController*
controller_;  // weak, owns us
Come on! Just say weak, don’t say us!

http://codereview.chromium.org/3183013/diff/10001/11008
File chrome/browser/ui_thread_helpers_mac.mm (right):

http://codereview.chromium.org/3183013/diff/10001/11008#newcode54
chrome/browser/ui_thread_helpers_mac.mm:54: NSDefaultRunLoopMode, nil];
nil to its own line, too.

Powered by Google App Engine
This is Rietveld 408576698