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

Issue 1250403002: [Mac] Move UI item validation to UserInterfaceItemCommandHandler. (Closed)

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

Description

[Mac] Move UI item validation to UserInterfaceItemCommandHandler. NSUserInterfaceValidations moves from BrowserWindowCocoa to the NSWindow. NSWindow then delegates them to UserInterfaceItemCommandHandler. The implementation moves to BrowserWindowCommandHandler, and is only set on the CommandDispatchingWindow for browser windows. This will allow MacViews to share the same UI item validation as Cocoa. BUG=508438 Committed: https://crrev.com/ebb37f1c45a019e44352d3440898ed309130b75c Cr-Commit-Position: refs/heads/master@{#347420}

Patch Set 1 #

Patch Set 2 : Sync and rebase. #

Patch Set 3 : Sync to new CommandDispatcher design. Add UserInterfaceItemCommandHandler. #

Total comments: 12

Patch Set 4 : Address comments. #

Patch Set 5 : Sync #

Total comments: 20

Patch Set 6 : Address comments. #

Total comments: 8

Patch Set 7 : Address comments. #

Patch Set 8 : Split out BrowserWindowCommandHandler and only use it in browser windows. #

Total comments: 18

Patch Set 9 : Address comments. #

Patch Set 10 : Properly release |commandHandler|. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+393 lines, -228 lines) Patch
A chrome/browser/ui/cocoa/browser_window_command_handler.h View 1 2 3 4 5 6 7 8 1 chunk +18 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/browser_window_command_handler.mm View 1 2 3 4 5 6 7 8 1 chunk +248 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.h View 1 2 3 4 5 6 8 2 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 7 8 7 chunks +6 lines, -220 lines 0 comments Download
M chrome/browser/ui/cocoa/chrome_event_processing_window.mm View 1 2 3 4 5 6 7 8 9 4 chunks +30 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_frame_mac.mm View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M ui/base/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M ui/base/cocoa/command_dispatcher.h View 1 2 3 4 5 6 7 8 9 3 chunks +16 lines, -0 lines 0 comments Download
A ui/base/cocoa/user_interface_item_command_handler.h View 1 2 3 4 5 6 7 8 9 1 chunk +34 lines, -0 lines 0 comments Download
M ui/base/ui_base.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/cocoa/native_widget_mac_nswindow.mm View 1 2 3 4 5 6 7 8 9 4 chunks +30 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 21 (3 generated)
jackhou1
tapted, PTAL I've also updated the combined CL: https://codereview.chromium.org/1259903002/
5 years, 3 months ago (2015-08-27 05:15:09 UTC) #2
tapted
some initial comments - still more to absorb https://codereview.chromium.org/1250403002/diff/40001/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.h File chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.h (right): https://codereview.chromium.org/1250403002/diff/40001/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.h#newcode13 chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.h:13: // ...
5 years, 3 months ago (2015-08-27 07:24:43 UTC) #3
tapted
ok I think I've grokked it https://codereview.chromium.org/1250403002/diff/40001/ui/base/cocoa/command_dispatcher.h File ui/base/cocoa/command_dispatcher.h (right): https://codereview.chromium.org/1250403002/diff/40001/ui/base/cocoa/command_dispatcher.h#newcode101 ui/base/cocoa/command_dispatcher.h:101: - (void)commandDispatch:(id)sender; What's ...
5 years, 3 months ago (2015-08-28 05:04:02 UTC) #4
jackhou1
https://codereview.chromium.org/1250403002/diff/40001/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.h File chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.h (right): https://codereview.chromium.org/1250403002/diff/40001/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.h#newcode13 chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.h:13: // shortcuts and executing them with chrome::ExecuteCommand. On 2015/08/27 ...
5 years, 3 months ago (2015-09-03 01:12:49 UTC) #5
tapted
https://codereview.chromium.org/1250403002/diff/80001/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm File chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm (right): https://codereview.chromium.org/1250403002/diff/80001/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm#newcode195 chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm:195: [menuItem setTitle:[controller titleForFullscreenMenuItem]]; titleForFullscreenMenuItem is only used by this ...
5 years, 3 months ago (2015-09-03 04:15:38 UTC) #6
jackhou1
https://codereview.chromium.org/1250403002/diff/80001/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm File chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm (right): https://codereview.chromium.org/1250403002/diff/80001/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm#newcode195 chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm:195: [menuItem setTitle:[controller titleForFullscreenMenuItem]]; On 2015/09/03 04:15:38, tapted wrote: > ...
5 years, 3 months ago (2015-09-03 06:15:39 UTC) #7
tapted
https://codereview.chromium.org/1250403002/diff/100001/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm File chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm (right): https://codereview.chromium.org/1250403002/diff/100001/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm#newcode121 chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm:121: return [controller titleForFullscreenMenuItem]; Can you remove titleForFullscreenMenuItem and put ...
5 years, 3 months ago (2015-09-03 06:54:49 UTC) #8
tapted
looks like there are some test failures too..
5 years, 3 months ago (2015-09-03 06:55:29 UTC) #9
jackhou1
All the tests are due to assuming that the window is a browser window. By ...
5 years, 3 months ago (2015-09-03 08:12:29 UTC) #10
jackhou1
tapted, PTAL at patch set 8.
5 years, 3 months ago (2015-09-04 01:50:33 UTC) #11
tapted
https://codereview.chromium.org/1250403002/diff/140001/chrome/browser/ui/cocoa/browser_window_command_handler.h File chrome/browser/ui/cocoa/browser_window_command_handler.h (right): https://codereview.chromium.org/1250403002/diff/140001/chrome/browser/ui/cocoa/browser_window_command_handler.h#newcode8 chrome/browser/ui/cocoa/browser_window_command_handler.h:8: #import <Cocoa/Cocoa.h> nit: Foundation/Foundation.h for NSObject https://codereview.chromium.org/1250403002/diff/140001/chrome/browser/ui/cocoa/browser_window_command_handler.h#newcode15 chrome/browser/ui/cocoa/browser_window_command_handler.h:15: : ...
5 years, 3 months ago (2015-09-04 02:56:24 UTC) #12
jackhou1
https://codereview.chromium.org/1250403002/diff/140001/chrome/browser/ui/cocoa/browser_window_command_handler.h File chrome/browser/ui/cocoa/browser_window_command_handler.h (right): https://codereview.chromium.org/1250403002/diff/140001/chrome/browser/ui/cocoa/browser_window_command_handler.h#newcode8 chrome/browser/ui/cocoa/browser_window_command_handler.h:8: #import <Cocoa/Cocoa.h> On 2015/09/04 02:56:24, tapted wrote: > nit: ...
5 years, 3 months ago (2015-09-04 06:13:59 UTC) #13
tapted
lgtm
5 years, 3 months ago (2015-09-04 12:19:05 UTC) #14
jackhou1
sky, please review for OWNERS of: chrome/browser/ui/views/frame/browser_frame_mac.mm ui/base/BUILD.gn ui/base/ui_base.gyp
5 years, 3 months ago (2015-09-04 12:22:33 UTC) #16
sky
LGTM
5 years, 3 months ago (2015-09-04 14:59:58 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1250403002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1250403002/180001
5 years, 3 months ago (2015-09-04 16:25:10 UTC) #19
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 3 months ago (2015-09-04 16:30:05 UTC) #20
commit-bot: I haz the power
5 years, 3 months ago (2015-09-04 16:30:49 UTC) #21
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/ebb37f1c45a019e44352d3440898ed309130b75c
Cr-Commit-Position: refs/heads/master@{#347420}

Powered by Google App Engine
This is Rietveld 408576698