Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: removal of 3.0.0 deprecations #13050

Merged
merged 19 commits into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions atom/browser/api/atom_api_screen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 0 additions & 4 deletions atom/browser/api/atom_api_screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
19 changes: 0 additions & 19 deletions atom/browser/api/atom_api_screen_mac.mm

This file was deleted.

2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 0 additions & 10 deletions atom/browser/api/atom_api_tray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};
Expand Down
6 changes: 0 additions & 6 deletions atom/browser/api/atom_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions atom/browser/native_window_views_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion atom/browser/web_contents_preferences.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,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.
Expand Down
3 changes: 0 additions & 3 deletions atom/common/api/atom_api_native_image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions atom/common/options_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion atom/common/options_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down
18 changes: 3 additions & 15 deletions atom/renderer/api/atom_api_web_frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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());
}
Expand Down Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion atom/renderer/api/atom_api_web_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion docs/api/browser-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
canvas features. Default is `false`.
* `scrollBounce` Boolean (optional) - Enables scroll bounce (rubber banding) effect on
macOS. Default is `false`.
* `blinkFeatures` String (optional) - A list of feature strings separated by `,`, like
* `enableBlinkFeatures` String (optional) - A list of feature strings separated by `,`, like
`CSSVariables,KeyboardEventKey` to enable. The full list of supported feature
strings can be found in the [RuntimeEnabledFeatures.json5][runtime-enabled-features]
file.
Expand Down
4 changes: 0 additions & 4 deletions docs/api/screen.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ Returns [`Point`](structures/point.md)

The current absolute position of the mouse pointer.

### `screen.getMenuBarHeight()` _macOS_

Returns `Integer` - The height of the menu bar in pixels.

### `screen.getPrimaryDisplay()`

Returns [`Display`](structures/display.md) - The primary display.
Expand Down
10 changes: 0 additions & 10 deletions docs/api/web-frame.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ webFrame.setSpellCheckProvider('en-US', true, {
})
```

### `webFrame.registerURLSchemeAsSecure(scheme)`

* `scheme` String

Registers the `scheme` as secure scheme.

Secure schemes do not trigger mixed content warnings. For example, `https` and
`data` are secure schemes because they cannot be corrupted by active network
attackers.

### `webFrame.registerURLSchemeAsBypassingCSP(scheme)`

* `scheme` String
Expand Down
4 changes: 2 additions & 2 deletions docs/api/webview-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ A name by itself is given a `true` boolean value.
A preference can be set to another value by including an `=`, followed by the value.
Special values `yes` and `1` are interpreted as `true`, while `no` and `0` are interpreted as `false`.

### `blinkfeatures`
### `enableblinkfeatures`

```html
<webview src="https://www.github.com/" blinkfeatures="PreciseMemoryInfo, CSSVariables"></webview>
<webview src="https://www.github.com/" enableblinkfeatures="PreciseMemoryInfo, CSSVariables"></webview>
```

A list of strings which specifies the blink features to be enabled separated by `,`.
Expand Down
Loading