Merge pull request #13050 from electron/3.0.0-deprecations

chore: removal of 3.0.0 deprecations
This commit is contained in:
Charles Kerr 2018-05-30 09:25:36 +02:00 committed by GitHub
commit b89fe86fa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 76 additions and 421 deletions

View file

@ -145,9 +145,6 @@ void Screen::BuildPrototype(v8::Isolate* isolate,
.SetMethod("dipToScreenPoint", &display::win::ScreenWin::DIPToScreenPoint)
.SetMethod("screenToDipRect", &ScreenToDIPRect)
.SetMethod("dipToScreenRect", &DIPToScreenRect)
#endif
#if defined(OS_MACOSX)
.SetMethod("getMenuBarHeight", &Screen::getMenuBarHeight)
#endif
.SetMethod("getDisplayMatching", &Screen::GetDisplayMatching);
}

View file

@ -40,10 +40,6 @@ class Screen : public mate::EventEmitter<Screen>,
display::Display GetDisplayNearestPoint(const gfx::Point& point);
display::Display GetDisplayMatching(const gfx::Rect& match_rect);
#if defined(OS_MACOSX)
int getMenuBarHeight();
#endif
// display::DisplayObserver:
void OnDisplayAdded(const display::Display& new_display) override;
void OnDisplayRemoved(const display::Display& old_display) override;

View file

@ -1,19 +0,0 @@
// Copyright (c) 2017 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#import <Cocoa/Cocoa.h>
#import "atom/browser/api/atom_api_screen.h"
namespace atom {
namespace api {
// TODO(codebytere): deprecated; remove in 3.0
int Screen::getMenuBarHeight() {
return [[NSApp mainMenu] menuBarHeight];
}
} // namespace api
} // namespace atom

View file

@ -821,7 +821,7 @@ void Session::BuildPrototype(v8::Isolate* isolate,
.SetMethod("setDownloadPath", &Session::SetDownloadPath)
.SetMethod("enableNetworkEmulation", &Session::EnableNetworkEmulation)
.SetMethod("disableNetworkEmulation", &Session::DisableNetworkEmulation)
.SetMethod("_setCertificateVerifyProc", &Session::SetCertVerifyProc)
.SetMethod("setCertificateVerifyProc", &Session::SetCertVerifyProc)
.SetMethod("setPermissionRequestHandler",
&Session::SetPermissionRequestHandler)
.SetMethod("clearHostResolverCache", &Session::ClearHostResolverCache)

View file

@ -40,16 +40,6 @@ struct Converter<atom::TrayIcon::HighlightMode> {
return true;
}
}
bool highlight;
if (ConvertFromV8(isolate, val, &highlight)) {
if (highlight)
*out = atom::TrayIcon::HighlightMode::SELECTION;
else
*out = atom::TrayIcon::HighlightMode::NEVER;
return true;
}
return false;
}
};

View file

@ -1296,15 +1296,9 @@ void WebContents::OpenDevTools(mate::Arguments* args) {
state = "detach";
}
if (args && args->Length() == 1) {
bool detach = false;
mate::Dictionary options;
if (args->GetNext(&options)) {
options.Get("mode", &state);
// TODO(kevinsawicki) Remove in 2.0
options.Get("detach", &detach);
if (state.empty() && detach)
state = "detach";
}
}
managed_web_contents()->SetDockState(state);