Merge pull request #13050 from electron/3.0.0-deprecations
chore: removal of 3.0.0 deprecations
This commit is contained in:
commit
b89fe86fa1
32 changed files with 76 additions and 421 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -143,10 +143,6 @@ bool NativeWindowViews::ExecuteWindowsCommand(int command_id) {
|
|||
std::string command = AppCommandToString(command_id);
|
||||
NotifyWindowExecuteWindowsCommand(command);
|
||||
|
||||
if (command_id == APPCOMMAND_MEDIA_PLAY_PAUSE)
|
||||
// FIXME(htk3): Remove media-play_pause in 3.0
|
||||
NotifyWindowExecuteWindowsCommand("media-play_pause");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ void WebContentsPreferences::AppendCommandLineSwitches(
|
|||
}
|
||||
|
||||
// Enable blink features.
|
||||
if (dict_.GetString(options::kBlinkFeatures, &s))
|
||||
if (dict_.GetString(options::kEnableBlinkFeatures, &s))
|
||||
command_line->AppendSwitchASCII(::switches::kEnableBlinkFeatures, s);
|
||||
|
||||
// Disable blink features.
|
||||
|
|
|
@ -517,9 +517,6 @@ mate::Handle<NativeImage> NativeImage::CreateFromBuffer(
|
|||
options.Get("width", &width);
|
||||
options.Get("height", &height);
|
||||
options.Get("scaleFactor", &scale_factor);
|
||||
} else {
|
||||
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
|
||||
args->GetNext(&scale_factor);
|
||||
}
|
||||
|
||||
gfx::ImageSkia image_skia;
|
||||
|
|
|
@ -127,8 +127,7 @@ const char kOpenerID[] = "openerId";
|
|||
const char kScrollBounce[] = "scrollBounce";
|
||||
|
||||
// Enable blink features.
|
||||
// TODO(kevinsawicki) Rename to enableBlinkFeatures in 2.0
|
||||
const char kBlinkFeatures[] = "blinkFeatures";
|
||||
const char kEnableBlinkFeatures[] = "enableBlinkFeatures";
|
||||
|
||||
// Disable blink features.
|
||||
const char kDisableBlinkFeatures[] = "disableBlinkFeatures";
|
||||
|
|
|
@ -64,7 +64,7 @@ extern const char kExperimentalFeatures[];
|
|||
extern const char kExperimentalCanvasFeatures[];
|
||||
extern const char kOpenerID[];
|
||||
extern const char kScrollBounce[];
|
||||
extern const char kBlinkFeatures[];
|
||||
extern const char kEnableBlinkFeatures[];
|
||||
extern const char kDisableBlinkFeatures[];
|
||||
extern const char kNodeIntegrationInWorker[];
|
||||
extern const char kWebviewTag[];
|
||||
|
|
|
@ -206,12 +206,6 @@ void WebFrame::SetSpellCheckProvider(mate::Arguments* args,
|
|||
web_frame_->SetSpellCheckPanelHostClient(spell_check_client_.get());
|
||||
}
|
||||
|
||||
void WebFrame::RegisterURLSchemeAsSecure(const std::string& scheme) {
|
||||
// TODO(pfrazee): Remove 2.0
|
||||
blink::SchemeRegistry::RegisterURLSchemeAsSecure(
|
||||
WTF::String::FromUTF8(scheme.data(), scheme.length()));
|
||||
}
|
||||
|
||||
void WebFrame::RegisterURLSchemeAsBypassingCSP(const std::string& scheme) {
|
||||
// Register scheme to bypass pages's Content Security Policy.
|
||||
blink::SchemeRegistry::RegisterURLSchemeAsBypassingContentSecurityPolicy(
|
||||
|
@ -243,10 +237,6 @@ void WebFrame::RegisterURLSchemeAsPrivileged(const std::string& scheme,
|
|||
// Register scheme to privileged list (https, wss, data, chrome-extension)
|
||||
WTF::String privileged_scheme(
|
||||
WTF::String::FromUTF8(scheme.data(), scheme.length()));
|
||||
if (secure) {
|
||||
// TODO(pfrazee): Remove 2.0
|
||||
blink::SchemeRegistry::RegisterURLSchemeAsSecure(privileged_scheme);
|
||||
}
|
||||
if (bypassCSP) {
|
||||
blink::SchemeRegistry::RegisterURLSchemeAsBypassingContentSecurityPolicy(
|
||||
privileged_scheme);
|
||||
|
@ -442,13 +432,13 @@ v8::Local<v8::Value> WebFrame::FindFrameByName(const std::string& name) const {
|
|||
|
||||
v8::Local<v8::Value> WebFrame::FindFrameByRoutingId(int routing_id) const {
|
||||
content::RenderFrame* render_frame =
|
||||
content::RenderFrame::FromRoutingID(routing_id);
|
||||
content::RenderFrame::FromRoutingID(routing_id);
|
||||
blink::WebLocalFrame* local_frame = nullptr;
|
||||
if (render_frame)
|
||||
local_frame = render_frame->GetWebFrame();
|
||||
if (local_frame)
|
||||
return mate::CreateHandle(isolate(),
|
||||
new WebFrame(isolate(), local_frame)).ToV8();
|
||||
return mate::CreateHandle(isolate(), new WebFrame(isolate(), local_frame))
|
||||
.ToV8();
|
||||
else
|
||||
return v8::Null(isolate());
|
||||
}
|
||||
|
@ -479,8 +469,6 @@ void WebFrame::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("attachGuest", &WebFrame::AttachGuest)
|
||||
.SetMethod("detachGuest", &WebFrame::DetachGuest)
|
||||
.SetMethod("setSpellCheckProvider", &WebFrame::SetSpellCheckProvider)
|
||||
.SetMethod("registerURLSchemeAsSecure",
|
||||
&WebFrame::RegisterURLSchemeAsSecure)
|
||||
.SetMethod("registerURLSchemeAsBypassingCSP",
|
||||
&WebFrame::RegisterURLSchemeAsBypassingCSP)
|
||||
.SetMethod("registerURLSchemeAsPrivileged",
|
||||
|
|
|
@ -66,7 +66,6 @@ class WebFrame : public mate::Wrappable<WebFrame> {
|
|||
bool auto_spell_correct_turned_on,
|
||||
v8::Local<v8::Object> provider);
|
||||
|
||||
void RegisterURLSchemeAsSecure(const std::string& scheme);
|
||||
void RegisterURLSchemeAsBypassingCSP(const std::string& scheme);
|
||||
void RegisterURLSchemeAsPrivileged(const std::string& scheme,
|
||||
mate::Arguments* args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue