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

Issue 2790773002: Cleanup MenuRunner API (Closed)

Created:
3 years, 8 months ago by jonross
Modified:
3 years, 8 months ago
CC:
chromium-reviews, asanka, extensions-reviews_chromium.org, lgarron+watch_chromium.org, sadrul, Matt Giuca, Peter Beverloo, tfarina, mlamouri+watch-notifications_chromium.org, mac-reviews_chromium.org, shuchen+watch_chromium.org, dcheng, nona+watch_chromium.org, yusukes+watch_chromium.org, raymes+watch_chromium.org, chromium-apps-reviews_chromium.org, kalyank, James Su, dbeam+watch-downloads_chromium.org, awdf+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleanup MenuRunner API All menus have switched over to MenuRunner::ASYNC. The non-async code path has also been removed. Due to this the flag is redundant. This change removes its usage throughout the code base. MenuRunner::RunMenuAt features a return type to declare if a menu was deleted or not during execution. This was used for cleanup relating to the nesting of message loops. With the nested message loop code path gone this is no longer necessary. No call site was actively performing different functions on this. Now all callsites are notified via MenuDelegate::OnMenuClosed, or a callback provided to MenuRunner, when a proper closure occurs. Deletion during a run is only triggered by either an entire system shutdown, or when callsites explicitly delete the menu when executing a menu item. All callsites have been updated to cleanup properly when deleting the menu. With the closing logic cleaned up MenuRunner::RunMenuAt return is no longer needed. So this change removes it. TBR=ben@chromium.org TEST=manual and test suites BUG=557130 Review-Url: https://codereview.chromium.org/2790773002 Cr-Commit-Position: refs/heads/master@{#466469} Committed: https://chromium.googlesource.com/chromium/src/+/5ab7c2d09320aa6f4fc6ba0118908ac7e378e77b

Patch Set 1 #

Patch Set 2 : more references #

Patch Set 3 : Moar #

Patch Set 4 : More mac #

Patch Set 5 : More mac #

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+281 lines, -473 lines) Patch
M ash/root_window_controller.cc View 1 2 3 4 5 1 chunk +4 lines, -6 lines 0 comments Download
M ash/shelf/shelf_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ash/shell/window_type_launcher.cc View 1 2 3 4 5 1 chunk +4 lines, -8 lines 0 comments Download
M ash/shell_unittest.cc View 1 2 3 4 5 1 chunk +5 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_context_menu.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_context_menu.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc View 1 2 3 4 5 1 chunk +6 lines, -12 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_menu_controller_views.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_menu_controller_views.cc View 3 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/download/download_shelf_context_menu_view.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/extensions/media_galleries_dialog_views.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_frame.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.cc View 1 2 1 chunk +3 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/menu_model_adapter_test.cc View 2 chunks +4 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/menu_test_base.cc View 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/menu_view_drag_and_drop_test.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/page_info/permission_selector_row.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/status_icons/status_icon_win.cc View 1 2 1 chunk +2 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc View 1 chunk +3 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/task_manager_view.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/toolbar/app_menu.h View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/toolbar/app_menu.cc View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_action_view.cc View 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_button.cc View 1 2 3 4 5 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/translate/translate_bubble_view.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M components/renderer_context_menu/views/toolkit_delegate_views.cc View 1 chunk +5 lines, -6 lines 0 comments Download
M content/shell/browser/shell_web_contents_view_delegate_views.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M mash/browser/browser.cc View 1 1 chunk +5 lines, -6 lines 0 comments Download
M mash/example/window_type_launcher/window_type_launcher.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M ui/app_list/views/app_list_item_view.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M ui/app_list/views/search_result_tile_item_view.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/app_list/views/search_result_view.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/message_center/views/message_view_context_menu_controller.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M ui/views/controls/combobox/combobox.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M ui/views/controls/label.cc View 1 2 3 4 5 1 chunk +5 lines, -6 lines 0 comments Download
M ui/views/controls/menu/menu_controller.h View 1 chunk +7 lines, -8 lines 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 1 2 3 4 5 3 chunks +8 lines, -11 lines 0 comments Download
M ui/views/controls/menu/menu_controller_delegate.h View 1 1 chunk +3 lines, -4 lines 0 comments Download
M ui/views/controls/menu/menu_controller_unittest.cc View 14 chunks +30 lines, -72 lines 0 comments Download
M ui/views/controls/menu/menu_delegate.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/menu/menu_model_adapter.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/menu/menu_model_adapter.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ui/views/controls/menu/menu_runner.h View 1 2 3 chunks +11 lines, -32 lines 0 comments Download
M ui/views/controls/menu/menu_runner.cc View 3 chunks +9 lines, -8 lines 0 comments Download
M ui/views/controls/menu/menu_runner_cocoa_unittest.mm View 1 2 3 4 8 chunks +18 lines, -34 lines 0 comments Download
M ui/views/controls/menu/menu_runner_handler.h View 1 chunk +6 lines, -6 lines 0 comments Download
M ui/views/controls/menu/menu_runner_impl.h View 2 chunks +5 lines, -11 lines 0 comments Download
M ui/views/controls/menu/menu_runner_impl.cc View 4 chunks +10 lines, -16 lines 0 comments Download
M ui/views/controls/menu/menu_runner_impl_adapter.h View 1 chunk +5 lines, -5 lines 0 comments Download
M ui/views/controls/menu/menu_runner_impl_adapter.cc View 1 chunk +6 lines, -7 lines 0 comments Download
M ui/views/controls/menu/menu_runner_impl_cocoa.h View 1 chunk +5 lines, -5 lines 0 comments Download
M ui/views/controls/menu/menu_runner_impl_cocoa.mm View 2 chunks +6 lines, -8 lines 0 comments Download
M ui/views/controls/menu/menu_runner_impl_interface.h View 1 chunk +5 lines, -6 lines 0 comments Download
M ui/views/controls/menu/menu_runner_unittest.cc View 15 chunks +26 lines, -47 lines 0 comments Download
M ui/views/controls/scrollbar/base_scroll_bar.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 2 chunks +6 lines, -9 lines 0 comments Download
M ui/views/examples/menu_example.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M ui/views/examples/tree_view_example.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M ui/views/test/combobox_test_api.cc View 1 chunk +6 lines, -7 lines 0 comments Download
M ui/views/test/menu_test_utils.h View 3 chunks +2 lines, -6 lines 0 comments Download
M ui/views/test/menu_test_utils.cc View 2 chunks +1 line, -4 lines 0 comments Download

Messages

Total messages: 40 (30 generated)
jonross
Hey sky@ This is a followup to the last menu cleanup patch. With the switch ...
3 years, 8 months ago (2017-03-31 23:47:58 UTC) #23
sky
Don't we still need the return type for the mac side that may still run ...
3 years, 8 months ago (2017-04-01 17:15:09 UTC) #24
jonross
On 2017/04/01 17:15:09, sky wrote: > Don't we still need the return type for the ...
3 years, 8 months ago (2017-04-07 17:47:56 UTC) #25
sky
LGTM
3 years, 8 months ago (2017-04-07 19:16:45 UTC) #26
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/2790773002/80001
3 years, 8 months ago (2017-04-07 19:26:55 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/405763)
3 years, 8 months ago (2017-04-07 19:39:00 UTC) #30
jonross
Hey Ben, Could you provide an owners review to: components/renderer_context_menu/views/toolkit_delegate_views.cc content/shell/browser/shell_web_contents_view_delegate_views.cc They have been updated ...
3 years, 8 months ago (2017-04-07 20:55:21 UTC) #32
jonross
I have TBRed ben@ as the changes to those files were mechanical based on the ...
3 years, 8 months ago (2017-04-21 21:38:36 UTC) #36
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/2790773002/100001
3 years, 8 months ago (2017-04-21 21:38:52 UTC) #37
commit-bot: I haz the power
3 years, 8 months ago (2017-04-21 22:34:51 UTC) #40
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/5ab7c2d09320aa6f4fc6ba011890...

Powered by Google App Engine
This is Rietveld 408576698