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

Issue 1250533003: [Mac] Remove BrowserCommandExecutor protocol. (Closed)

Created:
5 years, 5 months ago by jackhou1
Modified:
5 years, 4 months ago
Reviewers:
Robert Sesek, tapted
CC:
chromium-reviews, jennb, jianli, Dmitry Titov, dcheng, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mac] Remove BrowserCommandExecutor protocol. Only BrowserWindowController implements this. Other implementors just turn it into a no-op. ChromeEventProcessingWindow (CEPW) now simply checks whether it's a Browser window and executes the command. This is the first step to factor out keyboard shortcut handling in CEPW into a component that can be reused in Views as it removes one (of two) dependencies on -[NSWindow windowController], which cannot be used to implement browser-side behavior under Views. Added new browser_test for shortcuts in global_keyboard_shortcuts_mac. Some history: BrowserCommandExecutor was added in r30619 (6 years ago) to allow a non-browser window to execute browser commands, but became obsolete a month later in r32445 when HtmlDialogWindowController (now WebDialogWindowController) decided to ignore those commands instead. BUG=508438 Committed: https://crrev.com/06c25a9881b76f7e0b0ab27050d8c470fe9bdc2d Cr-Commit-Position: refs/heads/master@{#341062}

Patch Set 1 #

Patch Set 2 #

Total comments: 14

Patch Set 3 : Address comments. #

Patch Set 4 : Don't take a window for handleExtraKeyboardShortcut. #

Total comments: 4

Patch Set 5 : Address comments. #

Total comments: 2

Patch Set 6 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -280 lines) Patch
M chrome/browser/global_keyboard_shortcuts_mac.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/global_keyboard_shortcuts_mac.mm View 1 chunk +2 lines, -3 lines 0 comments Download
A chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm View 1 2 3 4 5 1 chunk +45 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h View 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm View 1 chunk +0 lines, -4 lines 0 comments Download
D chrome/browser/ui/cocoa/browser_command_executor.h View 1 chunk +0 lines, -15 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.h View 1 3 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_utils.mm View 1 2 3 1 chunk +1 line, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/chrome_event_processing_window.h View 1 2 3 1 chunk +4 lines, -13 lines 0 comments Download
M chrome/browser/ui/cocoa/chrome_event_processing_window.mm View 1 2 3 4 5 chunks +88 lines, -80 lines 0 comments Download
D chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm View 1 chunk +0 lines, -103 lines 0 comments Download
M chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm View 1 2 chunks +0 lines, -18 lines 0 comments Download
M chrome/browser/ui/cocoa/web_dialog_window_controller.mm View 3 chunks +0 lines, -18 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/chrome_tests.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 1 chunk +0 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 18 (4 generated)
jackhou1
tapted, PTAL This is a pretty simple change that removes the use of -[NSWindow windowController] ...
5 years, 5 months ago (2015-07-27 03:47:11 UTC) #2
tapted
On 2015/07/27 03:47:11, jackhou1 wrote: > This is a pretty simple change that removes the ...
5 years, 5 months ago (2015-07-27 04:58:57 UTC) #3
jackhou1
https://codereview.chromium.org/1250533003/diff/20001/chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm File chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm (right): https://codereview.chromium.org/1250533003/diff/20001/chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm#newcode22 chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm:22: class ScopedTabStripModelObserver : public TabStripModelObserver { On 2015/07/27 04:58:57, ...
5 years, 4 months ago (2015-07-28 05:19:45 UTC) #4
tapted
https://codereview.chromium.org/1250533003/diff/60001/chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm File chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm (right): https://codereview.chromium.org/1250533003/diff/60001/chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm#newcode22 chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm:22: // Observes a TabStripModel for a single ActiveTabChanged. I ...
5 years, 4 months ago (2015-07-28 06:57:10 UTC) #5
jackhou1
https://codereview.chromium.org/1250533003/diff/60001/chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm File chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm (right): https://codereview.chromium.org/1250533003/diff/60001/chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm#newcode22 chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm:22: // Observes a TabStripModel for a single ActiveTabChanged. On ...
5 years, 4 months ago (2015-07-29 00:33:53 UTC) #6
tapted
lgtm For an extra-compelling CL description, I think you can say "BrowserCommandExecutor was added 6 ...
5 years, 4 months ago (2015-07-29 01:18:06 UTC) #7
jackhou1
On 2015/07/29 01:18:06, tapted wrote: > lgtm > > For an extra-compelling CL description, I ...
5 years, 4 months ago (2015-07-29 01:23:37 UTC) #8
jackhou1
rsesek, please review for OWNERS in: chrome/browser/
5 years, 4 months ago (2015-07-29 01:24:56 UTC) #10
tapted
https://codereview.chromium.org/1250533003/diff/80001/chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm File chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm (right): https://codereview.chromium.org/1250533003/diff/80001/chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm#newcode20 chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm:20: IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, GlobalKeyboardShortcuts) { oops - I missed this. There ...
5 years, 4 months ago (2015-07-30 00:20:14 UTC) #11
Robert Sesek
LGTM. Nice refactor!
5 years, 4 months ago (2015-07-30 01:34:29 UTC) #12
jackhou1
https://codereview.chromium.org/1250533003/diff/80001/chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm File chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm (right): https://codereview.chromium.org/1250533003/diff/80001/chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm#newcode20 chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm:20: IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, GlobalKeyboardShortcuts) { On 2015/07/30 00:20:14, tapted wrote: > ...
5 years, 4 months ago (2015-07-30 01:45:57 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1250533003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1250533003/100001
5 years, 4 months ago (2015-07-30 01:46:38 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 4 months ago (2015-07-30 03:11:28 UTC) #17
commit-bot: I haz the power
5 years, 4 months ago (2015-07-30 03:12:00 UTC) #18
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/06c25a9881b76f7e0b0ab27050d8c470fe9bdc2d
Cr-Commit-Position: refs/heads/master@{#341062}

Powered by Google App Engine
This is Rietveld 408576698