diff --git a/atom/browser/api/atom_api_menu.cc b/atom/browser/api/atom_api_menu.cc index 0f9264fcc657..da208b365911 100644 --- a/atom/browser/api/atom_api_menu.cc +++ b/atom/browser/api/atom_api_menu.cc @@ -200,7 +200,6 @@ void Initialize(v8::Local exports, v8::Local unused, dict.SetMethod("setApplicationMenu", &Menu::SetApplicationMenu); dict.SetMethod("sendActionToFirstResponder", &Menu::SendActionToFirstResponder); - dict.SetMethod("noteNewRecentDocumentURL", &Menu::NoteNewRecentDocumentURL); #endif } diff --git a/atom/browser/api/atom_api_menu.h b/atom/browser/api/atom_api_menu.h index d3a73fb842bb..df50640b85ae 100644 --- a/atom/browser/api/atom_api_menu.h +++ b/atom/browser/api/atom_api_menu.h @@ -31,10 +31,6 @@ class Menu : public mate::TrackableObject, // Fake sending an action from the application menu. static void SendActionToFirstResponder(const std::string& action); - - // Add an item corresponding to the data located by a URL to the Open Recent - // menu, or replace an existing item with the same URL. - static void NoteNewRecentDocumentURL(const std::string& url); #endif AtomMenuModel* model() const { return model_.get(); } diff --git a/atom/browser/api/atom_api_menu_mac.mm b/atom/browser/api/atom_api_menu_mac.mm index c24674ed5d66..9741202dd727 100644 --- a/atom/browser/api/atom_api_menu_mac.mm +++ b/atom/browser/api/atom_api_menu_mac.mm @@ -139,13 +139,6 @@ void Menu::SendActionToFirstResponder(const std::string& action) { [NSApp sendAction:selector to:nil from:[NSApp mainMenu]]; } -// static -void Menu::NoteNewRecentDocumentURL(const std::string& url) { - [[NSDocumentController sharedDocumentController] - noteNewRecentDocumentURL: - [NSURL fileURLWithPath:base::SysUTF8ToNSString(url)]]; -} - // static mate::WrappableBase* Menu::New(mate::Arguments* args) { return new MenuMac(args->isolate(), args->GetThis()); diff --git a/docs/api/menu.md b/docs/api/menu.md index 91d5b625dbba..3ccd118091a4 100644 --- a/docs/api/menu.md +++ b/docs/api/menu.md @@ -43,13 +43,6 @@ emulating default macOS menu behaviors. Usually you would just use the See the [macOS Cocoa Event Handling Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html#//apple_ref/doc/uid/10000060i-CH3-SW7) for more information on macOS' native actions. -#### `Menu.noteNewRecentDocumentURL(url)` _macOS_ - -* `url` String - -Add an item corresponding to the data located by a URL to the Open Recent menu, -or replace an existing item with the same URL. - #### `Menu.buildFromTemplate(template)` * `template` MenuItemConstructorOptions[] diff --git a/lib/browser/api/menu.js b/lib/browser/api/menu.js index a9fe7d1dbe35..33c324d4fa8c 100644 --- a/lib/browser/api/menu.js +++ b/lib/browser/api/menu.js @@ -174,14 +174,6 @@ Menu.buildFromTemplate = function (template) { return menu } -Menu.noteNewRecentDocumentURL = function (url) { - if (process.platform === 'darwin') { - bindings.noteNewRecentDocumentURL(url); - } else { - throw new Error('Not supported') - } -} - /* Helper Functions */ // Search between separators to find a radio menu item and return its group id