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

Issue 2140963002: Added default implementations of GetAcceleratorForCommandId. (Closed)

Created:
4 years, 5 months ago by Matt Giuca
Modified:
4 years, 5 months ago
CC:
chromium-reviews, asanka, msramek+watch_chromium.org, sadrul, dcheng, noyau+watch_chromium.org, markusheintz_, extensions-reviews_chromium.org, Matt Giuca, raymes+watch_chromium.org, Peter Beverloo, vabr+watchlistautofill_chromium.org, chromium-apps-reviews_chromium.org, jennb, tapted, rouslan+autofill_chromium.org, mlamouri+watch-notifications_chromium.org, jianli, kalyank, Lei Zhang, tfarina, Dmitry Titov, jdonnelly+autofillwatch_chromium.org, tommycli, estade+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@acceleratorprovider-const
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added default implementations of GetAcceleratorForCommandId. Adds the default implementation to SimpleMenuModel and ButtonMenuItemModel classes that just returns false, and deletes all subclasses' overrides that just return false (over half the overrides; 39 in total). Returning false just means you have no accelerators; it is a fine default and there is no need to have every single subclass explicitly override and return false. RenderViewContextMenuBase: Remove the spurious override = 0 (which is now blocking the default implementation from propagating down). TBR=derat@chromium.org BUG=627344 Committed: https://crrev.com/c3a8965543812efb515b5a8ab56e0621b0c393ee Cr-Commit-Position: refs/heads/master@{#407416}

Patch Set 1 #

Patch Set 2 : Remove more overrides. #

Patch Set 3 : Remove yet more overrides. #

Patch Set 4 : Remove overrides on Mac and Chrome OS. #

Patch Set 5 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -296 lines) Patch
M ash/common/shelf/shelf_alignment_menu.h View 1 chunk +0 lines, -2 lines 0 comments Download
M ash/common/shelf/shelf_alignment_menu.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M ash/common/system/web_notification/web_notification_tray.h View 1 chunk +0 lines, -2 lines 0 comments Download
M ash/common/system/web_notification/web_notification_tray.cc View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M ash/shelf/shelf_view_unittest.cc View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M ash/shell/context_menu.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M ash/shell/context_menu.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M ash/shell_unittest.cc View 1 1 chunk +0 lines, -5 lines 0 comments Download
M ash/sysui/context_menu_mus.h View 1 chunk +0 lines, -2 lines 0 comments Download
M ash/sysui/context_menu_mus.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M ash/sysui/shelf_delegate_mus.cc View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/apps/app_browsertest.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/download/download_shelf_context_menu.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/download/download_shelf_context_menu.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_context_menu_model.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_context_menu_model.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/media_galleries/media_gallery_context_menu.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/media_galleries/media_gallery_context_menu.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/renderer_context_menu/mock_render_view_context_menu.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/renderer_context_menu/mock_render_view_context_menu.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/renderer_context_menu/open_with_menu_factory_ash.h View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/renderer_context_menu/open_with_menu_factory_ash.cc View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/ui/app_list/app_context_menu.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/app_list/app_context_menu.cc View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.cc View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_context_menu.cc View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_dialog_models.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_dialog_models.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_controller.mm View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/content_settings/content_setting_media_menu_model.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/content_settings/content_setting_media_menu_model.cc View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/panels/panel_extension_browsertest.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/ui/toolbar/app_menu_model.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/toolbar/app_menu_model.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/toolbar/media_router_contextual_menu.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/toolbar/media_router_contextual_menu.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/new_task_manager_view.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/new_task_manager_view.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/translate/translate_bubble_view.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/translate/translate_bubble_view.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/website_settings/permission_menu_model.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/website_settings/permission_menu_model.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M components/renderer_context_menu/render_view_context_menu_base.h View 1 chunk +0 lines, -4 lines 0 comments Download
M components/translate/core/browser/options_menu_model.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M components/translate/core/browser/options_menu_model.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M content/shell/browser/shell_web_contents_view_delegate_views.cc View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M ui/app_list/app_list_menu.h View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M ui/app_list/app_list_menu.cc View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M ui/base/cocoa/menu_controller_unittest.mm View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M ui/base/models/button_menu_item_model.h View 1 chunk +4 lines, -4 lines 0 comments Download
M ui/base/models/button_menu_item_model.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M ui/base/models/simple_menu_model.h View 1 chunk +4 lines, -4 lines 0 comments Download
M ui/base/models/simple_menu_model.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M ui/message_center/message_center_tray.cc View 2 chunks +0 lines, -8 lines 0 comments Download
M ui/message_center/views/notifier_settings_view.cc View 2 chunks +0 lines, -8 lines 0 comments Download
M ui/views/controls/menu/menu_runner_cocoa_unittest.mm View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M ui/views/examples/menu_example.cc View 1 2 chunks +0 lines, -9 lines 0 comments Download
M ui/views/examples/tree_view_example.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M ui/views/examples/tree_view_example.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M ui/views/touchui/touch_selection_controller_impl_unittest.cc View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 27 (15 generated)
Matt Giuca
Nico: Follow-up to the previous CL (https://codereview.chromium.org/2133013002). As I was updating all of the overrides ...
4 years, 5 months ago (2016-07-13 04:29:06 UTC) #6
Matt Giuca
TBRs: derat@chromium.org: ash/* hajimehoshi@chromium.org: components/translate/*
4 years, 5 months ago (2016-07-13 04:31:18 UTC) #8
Matt Giuca
4 years, 5 months ago (2016-07-13 04:31:42 UTC) #10
Avi (use Gerrit)
lgtm
4 years, 5 months ago (2016-07-13 04:42:28 UTC) #11
hajimehoshi
components/translate lgtm
4 years, 5 months ago (2016-07-13 04:46:26 UTC) #12
Matt Giuca
+sky it looks like Nico will be away for some time. Please have a look: ...
4 years, 5 months ago (2016-07-21 00:42:11 UTC) #15
sky
Said files LGTM
4 years, 5 months ago (2016-07-21 15:12:36 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2140963002/60001
4 years, 5 months ago (2016-07-22 05:37:43 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/39741) ios-device-gn on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 5 months ago (2016-07-22 05:40:17 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2140963002/80001
4 years, 5 months ago (2016-07-25 05:03:57 UTC) #23
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 5 months ago (2016-07-25 06:27:47 UTC) #25
commit-bot: I haz the power
4 years, 5 months ago (2016-07-25 06:28:58 UTC) #27
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/c3a8965543812efb515b5a8ab56e0621b0c393ee
Cr-Commit-Position: refs/heads/master@{#407416}

Powered by Google App Engine
This is Rietveld 408576698