Skip to content

Commit

Permalink
add report option in MacOS Help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
antonok-edm committed Nov 27, 2019
1 parent bcb580a commit 8667330
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
6 changes: 6 additions & 0 deletions app/brave_generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,12 @@ By installing this extension, you are agreeing to the Google Widevine Terms of U
Same as macOS
</message>
</if>
<!-- Mac Menubar Menus -->
<if expr="is_macosx">
<message name="IDS_REPORT_BROKEN_SITE_MAC" desc="The Mac menu item to report a broken site in the Help menu.">
Report a Broken Site
</message>
</if>
<!-- Brave Default Extensions -->
<message name="IDS_SETTINGS_BRAVE_DEFAULT_EXTENSIONS_TITLE" desc="The title for Brave default extensions in settings">
Extensions
Expand Down
18 changes: 18 additions & 0 deletions chromium_src/chrome/browser/ui/cocoa/main_menu_builder.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* Copyright (c) 2019 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "brave/app/brave_command_ids.h"
#include "brave/grit/brave_generated_resources.h"

#define BRAVE_BUILD_FILE_MENU \
Item(IDS_NEW_OFFTHERECORD_WINDOW_TOR) \
.command_id(IDC_NEW_OFFTHERECORD_WINDOW_TOR),

#define BRAVE_BUILD_HELP_MENU \
Item(IDS_REPORT_BROKEN_SITE_MAC) \
.command_id(IDC_SHOW_BRAVE_WEBCOMPAT_REPORTER),

#include "../../../../../../chrome/browser/ui/cocoa/main_menu_builder.mm" //NOLINT
#undef BRAVE_WEBCOMPAT_REPORTER_MENU_ENTRY
15 changes: 11 additions & 4 deletions patches/chrome-browser-ui-cocoa-main_menu_builder.mm.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
diff --git a/chrome/browser/ui/cocoa/main_menu_builder.mm b/chrome/browser/ui/cocoa/main_menu_builder.mm
index b0f66cc832e85b3d9da0b64ed1c3536563b16656..00414aa8a7edc794ba901d0ea92f44db7f8700a6 100644
index b0f66cc832e85b3d9da0b64ed1c3536563b16656..70e98fdc608b443022af1222e5fc8d8f7b21785e 100644
--- a/chrome/browser/ui/cocoa/main_menu_builder.mm
+++ b/chrome/browser/ui/cocoa/main_menu_builder.mm
@@ -98,6 +98,8 @@ base::scoped_nsobject<NSMenuItem> BuildFileMenu(
@@ -98,6 +98,7 @@ base::scoped_nsobject<NSMenuItem> BuildFileMenu(
Item(IDS_NEW_INCOGNITO_WINDOW_MAC)
.command_id(IDC_NEW_INCOGNITO_WINDOW)
.remove_if(is_pwa),
+ Item(IDS_NEW_OFFTHERECORD_WINDOW_TOR)
+ .command_id(IDC_NEW_OFFTHERECORD_WINDOW_TOR),
+ BRAVE_BUILD_FILE_MENU
Item(IDS_REOPEN_CLOSED_TABS_MAC)
.command_id(IDC_RESTORE_TAB)
.remove_if(is_pwa),
@@ -426,6 +428,7 @@ base::scoped_nsobject<NSMenuItem> BuildHelpMenu(
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
Item(IDS_FEEDBACK_MAC).command_id(IDC_FEEDBACK),
#endif
+ BRAVE_BUILD_HELP_MENU
Item(IDS_HELP_MAC)
.string_format_1(product_name)
.command_id(IDC_HELP_PAGE_VIA_MENU),

0 comments on commit 8667330

Please sign in to comment.