Replace "Url" in API names with "URL"
This commit is contained in:
parent
8f56387bd9
commit
fbb8e61958
57 changed files with 251 additions and 212 deletions
|
@ -168,7 +168,8 @@ mate::ObjectTemplateBuilder NativeImage::GetObjectTemplateBuilder(
|
|||
template_.Reset(isolate, mate::ObjectTemplateBuilder(isolate)
|
||||
.SetMethod("toPng", &NativeImage::ToPNG)
|
||||
.SetMethod("toJpeg", &NativeImage::ToJPEG)
|
||||
.SetMethod("toDataUrl", &NativeImage::ToDataURL)
|
||||
.SetMethod("toDataURL", &NativeImage::ToDataURL)
|
||||
.SetMethod("toDataUrl", &NativeImage::ToDataURL) // deprecated.
|
||||
.SetMethod("isEmpty", &NativeImage::IsEmpty)
|
||||
.SetMethod("getSize", &NativeImage::GetSize)
|
||||
.SetMethod("setTemplateImage", &NativeImage::SetTemplateImage)
|
||||
|
@ -309,7 +310,7 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
|
|||
dict.SetMethod("createEmpty", &atom::api::NativeImage::CreateEmpty);
|
||||
dict.SetMethod("createFromPath", &atom::api::NativeImage::CreateFromPath);
|
||||
dict.SetMethod("createFromBuffer", &atom::api::NativeImage::CreateFromBuffer);
|
||||
dict.SetMethod("createFromDataUrl",
|
||||
dict.SetMethod("createFromDataURL",
|
||||
&atom::api::NativeImage::CreateFromDataURL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
binding = process.atomBinding 'crash_reporter'
|
||||
fs = require 'fs'
|
||||
os = require 'os'
|
||||
path = require 'path'
|
||||
{spawn} = require 'child_process'
|
||||
|
||||
electron = require 'electron'
|
||||
binding = process.atomBinding 'crash_reporter'
|
||||
|
||||
class CrashReporter
|
||||
start: (options={}) ->
|
||||
{@productName, companyName, submitUrl, autoSubmit, ignoreSystemCrashHandler, extra} = options
|
||||
{@productName, companyName, submitURL, autoSubmit, ignoreSystemCrashHandler, extra} = options
|
||||
|
||||
# Deprecated.
|
||||
{deprecate} = electron
|
||||
if options.submitUrl
|
||||
submitURL ?= options.submitUrl
|
||||
deprecate.warn 'submitUrl', 'submitURL'
|
||||
|
||||
electron = require 'electron'
|
||||
{app} =
|
||||
if process.type is 'browser'
|
||||
electron
|
||||
|
@ -17,7 +24,7 @@ class CrashReporter
|
|||
|
||||
@productName ?= app.getName()
|
||||
companyName ?= 'GitHub, Inc'
|
||||
submitUrl ?= 'http://54.249.141.255:1127/post'
|
||||
submitURL ?= 'http://54.249.141.255:1127/post'
|
||||
autoSubmit ?= true
|
||||
ignoreSystemCrashHandler ?= false
|
||||
extra ?= {}
|
||||
|
@ -26,11 +33,11 @@ class CrashReporter
|
|||
extra._companyName ?= companyName
|
||||
extra._version ?= app.getVersion()
|
||||
|
||||
start = => binding.start @productName, companyName, submitUrl, autoSubmit, ignoreSystemCrashHandler, extra
|
||||
start = => binding.start @productName, companyName, submitURL, autoSubmit, ignoreSystemCrashHandler, extra
|
||||
|
||||
if process.platform is 'win32'
|
||||
args = [
|
||||
"--reporter-url=#{submitUrl}"
|
||||
"--reporter-url=#{submitURL}"
|
||||
"--application-name=#{@productName}"
|
||||
"--v=1"
|
||||
]
|
||||
|
|
|
@ -1 +1,7 @@
|
|||
module.exports = process.atomBinding 'native_image'
|
||||
{deprecate} = require 'electron'
|
||||
nativeImage = process.atomBinding 'native_image'
|
||||
|
||||
# Deprecated.
|
||||
deprecate.rename nativeImage, 'createFromDataUrl', 'createFromDataURL'
|
||||
|
||||
module.exports = nativeImage
|
||||
|
|
|
@ -77,7 +77,7 @@ const char kZoomFactor[] = "zoomFactor";
|
|||
const char kPreloadScript[] = "preload";
|
||||
|
||||
// Like --preload, but the passed argument is an URL.
|
||||
const char kPreloadUrl[] = "preloadUrl";
|
||||
const char kPreloadURL[] = "preloadURL";
|
||||
|
||||
// Enable the node integration.
|
||||
const char kNodeIntegration[] = "nodeIntegration";
|
||||
|
@ -133,7 +133,7 @@ const char kAppUserModelId[] = "app-user-model-id";
|
|||
// The command line switch versions of the options.
|
||||
const char kZoomFactor[] = "zoom-factor";
|
||||
const char kPreloadScript[] = "preload";
|
||||
const char kPreloadUrl[] = "preload-url";
|
||||
const char kPreloadURL[] = "preload-url";
|
||||
const char kNodeIntegration[] = "node-integration";
|
||||
const char kGuestInstanceID[] = "guest-instance-id";
|
||||
const char kExperimentalFeatures[] = "experimental-features";
|
||||
|
|
|
@ -44,7 +44,7 @@ extern const char kWebPreferences[];
|
|||
extern const char kDirectWrite[];
|
||||
extern const char kZoomFactor[];
|
||||
extern const char kPreloadScript[];
|
||||
extern const char kPreloadUrl[];
|
||||
extern const char kPreloadURL[];
|
||||
extern const char kNodeIntegration[];
|
||||
extern const char kGuestInstanceID[];
|
||||
extern const char kExperimentalFeatures[];
|
||||
|
@ -73,7 +73,7 @@ extern const char kAppUserModelId[];
|
|||
|
||||
extern const char kZoomFactor[];
|
||||
extern const char kPreloadScript[];
|
||||
extern const char kPreloadUrl[];
|
||||
extern const char kPreloadURL[];
|
||||
extern const char kNodeIntegration[];
|
||||
extern const char kGuestInstanceID[];
|
||||
extern const char kExperimentalFeatures[];
|
||||
|
|
|
@ -307,8 +307,8 @@ bool OpenExternal(const GURL& url) {
|
|||
// "Some versions of windows (Win2k before SP3, Win XP before SP1) crash in
|
||||
// ShellExecute on long URLs (bug 161357 on bugzilla.mozilla.org). IE 5 and 6
|
||||
// support URLS of 2083 chars in length, 2K is safe."
|
||||
const size_t kMaxUrlLength = 2048;
|
||||
if (escaped_url.length() > kMaxUrlLength) {
|
||||
const size_t kMaxURLLength = 2048;
|
||||
if (escaped_url.length() > kMaxURLLength) {
|
||||
NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue