diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index ae5eec64cf93..399b4d36d2ec 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -52,11 +52,6 @@ namespace api { namespace { -// This function is implemented in JavaScript -using DeprecatedOptionsCheckCallback = - base::Callback)>; -DeprecatedOptionsCheckCallback g_deprecated_options_check; - void OnCapturePageDone( v8::Isolate* isolate, const base::Callback& callback, @@ -66,52 +61,6 @@ void OnCapturePageDone( callback.Run(gfx::Image::CreateFrom1xBitmap(bitmap)); } -// Converts min-width to minWidth, returns false if no conversion is needed. -bool TranslateOldKey(const std::string& key, std::string* new_key) { - if (key.find('-') == std::string::npos) - return false; - new_key->reserve(key.size()); - bool next_upper_case = false; - for (char c : key) { - if (c == '-') { - next_upper_case = true; - } else if (next_upper_case) { - new_key->push_back(base::ToUpperASCII(c)); - next_upper_case = false; - } else { - new_key->push_back(c); - } - } - return true; -} - -// Converts min-width to minWidth recursively in the dictionary. -void TranslateOldOptions(v8::Isolate* isolate, v8::Local options) { - auto context = isolate->GetCurrentContext(); - auto maybe_keys = options->GetOwnPropertyNames(context); - if (maybe_keys.IsEmpty()) - return; - std::vector keys; - if (!mate::ConvertFromV8(isolate, maybe_keys.ToLocalChecked(), &keys)) - return; - mate::Dictionary dict(isolate, options); - for (const auto& key : keys) { - v8::Local value; - if (!dict.Get(key, &value)) // Shouldn't happen, but guard it anyway. - continue; - // Go recursively. - v8::Local sub_options; - if (mate::ConvertFromV8(isolate, value, &sub_options)) - TranslateOldOptions(isolate, sub_options); - // Translate key. - std::string new_key; - if (TranslateOldKey(key, &new_key)) { - dict.Set(new_key, value); - dict.Delete(key); - } - } -} - // Converts binary data to Buffer. v8::Local ToBuffer(v8::Isolate* isolate, void* val, int size) { auto buffer = node::Buffer::Copy(isolate, static_cast(val), size); @@ -125,23 +74,12 @@ v8::Local ToBuffer(v8::Isolate* isolate, void* val, int size) { Window::Window(v8::Isolate* isolate, const mate::Dictionary& options) { - // Be compatible with old style field names like min-width. - TranslateOldOptions(isolate, options.GetHandle()); - // Use options.webPreferences to create WebContents. mate::Dictionary web_preferences = mate::Dictionary::CreateEmpty(isolate); options.Get(options::kWebPreferences, &web_preferences); - // Be compatible with old options which are now in web_preferences. - v8::Local value; - if (options.Get(options::kNodeIntegration, &value)) - web_preferences.Set(options::kNodeIntegration, value); - if (options.Get(options::kPreloadScript, &value)) - web_preferences.Set(options::kPreloadScript, value); - if (options.Get(options::kZoomFactor, &value)) - web_preferences.Set(options::kZoomFactor, value); - // Copy the backgroundColor to webContents. + v8::Local value; if (options.Get(options::kBackgroundColor, &value)) web_preferences.Set(options::kBackgroundColor, value); @@ -304,13 +242,6 @@ mate::WrappableBase* Window::New(v8::Isolate* isolate, mate::Arguments* args) { options = mate::Dictionary::CreateEmpty(isolate); } - std::string deprecation_message = g_deprecated_options_check.Run( - options.GetHandle()); - if (deprecation_message.length() > 0) { - args->ThrowError(deprecation_message); - return nullptr; - } - return new Window(isolate, options); } @@ -822,10 +753,6 @@ v8::Local Window::From(v8::Isolate* isolate, return v8::Null(isolate); } -void SetDeprecatedOptionsCheck(const DeprecatedOptionsCheckCallback& callback) { - g_deprecated_options_check = callback; -} - } // namespace api } // namespace atom @@ -848,8 +775,6 @@ void Initialize(v8::Local exports, v8::Local unused, mate::Dictionary dict(isolate, exports); dict.Set("BrowserWindow", browser_window); - dict.SetMethod("_setDeprecatedOptionsCheck", - &atom::api::SetDeprecatedOptionsCheck); } } // namespace diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index 9d04617b2098..32d218fa768c 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 0.37.8 + 1.0.0 CFBundleShortVersionString - 0.37.8 + 1.0.0 LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index 9f74c14d4461..6163c1ffce6b 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,37,8,0 - PRODUCTVERSION 0,37,8,0 + FILEVERSION 1,0,0,0 + PRODUCTVERSION 1,0,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "0.37.8" + VALUE "FileVersion", "1.0.0" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "0.37.8" + VALUE "ProductVersion", "1.0.0" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/api/atom_api_native_image.cc b/atom/common/api/atom_api_native_image.cc index 1c90fe7080fb..e440f9c518bd 100644 --- a/atom/common/api/atom_api_native_image.cc +++ b/atom/common/api/atom_api_native_image.cc @@ -318,7 +318,6 @@ void NativeImage::BuildPrototype( .SetMethod("toJpeg", &NativeImage::ToJPEG) .SetMethod("getNativeHandle", &NativeImage::GetNativeHandle) .SetMethod("toDataURL", &NativeImage::ToDataURL) - .SetMethod("toDataUrl", &NativeImage::ToDataURL) // deprecated. .SetMethod("isEmpty", &NativeImage::IsEmpty) .SetMethod("getSize", &NativeImage::GetSize) .SetMethod("setTemplateImage", &NativeImage::SetTemplateImage) diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index 4ce73bc0aeec..561341cfaeab 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -5,9 +5,9 @@ #ifndef ATOM_VERSION_H #define ATOM_VERSION_H -#define ATOM_MAJOR_VERSION 0 -#define ATOM_MINOR_VERSION 37 -#define ATOM_PATCH_VERSION 8 +#define ATOM_MAJOR_VERSION 1 +#define ATOM_MINOR_VERSION 0 +#define ATOM_PATCH_VERSION 0 #define ATOM_VERSION_IS_RELEASE 1 diff --git a/default_app/index.html b/default_app/index.html index 21fbf93cc30e..edfb3e6ddc92 100644 --- a/default_app/index.html +++ b/default_app/index.html @@ -4,16 +4,21 @@