Replace "Url" in API names with "URL"
authorCheng Zhao <zcbenz@gmail.com>
Fri, 13 Nov 2015 08:03:40 +0000 (16:03 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 13 Nov 2015 08:03:40 +0000 (16:03 +0800)
57 files changed:
atom/browser/api/atom_api_auto_updater.cc
atom/browser/api/atom_api_cookies.cc
atom/browser/api/atom_api_download_item.cc
atom/browser/api/atom_api_download_item.h
atom/browser/api/atom_api_protocol.cc
atom/browser/api/atom_api_web_contents.cc
atom/browser/api/lib/app.coffee
atom/browser/api/lib/auto-updater.coffee
atom/browser/api/lib/auto-updater/auto-updater-win.coffee
atom/browser/api/lib/auto-updater/squirrel-update-win.coffee
atom/browser/api/lib/browser-window.coffee
atom/browser/api/lib/navigation-controller.coffee
atom/browser/api/lib/web-contents.coffee
atom/browser/atom_access_token_store.cc
atom/browser/default_app/default_app.js
atom/browser/lib/guest-view-manager.coffee
atom/browser/lib/guest-window-manager.coffee
atom/browser/net/url_request_async_asar_job.cc
atom/browser/net/url_request_async_asar_job.h
atom/browser/web_contents_preferences.cc
atom/common/api/atom_api_native_image.cc
atom/common/api/lib/crash-reporter.coffee
atom/common/api/lib/native-image.coffee
atom/common/options_switches.cc
atom/common/options_switches.h
atom/common/platform_util_win.cc
atom/renderer/api/atom_api_web_frame.cc
atom/renderer/api/atom_api_web_frame.h
atom/renderer/api/lib/web-frame.coffee
atom/renderer/lib/override.coffee
atom/renderer/lib/web-view/guest-view-internal.coffee
atom/renderer/lib/web-view/web-view-attributes.coffee
atom/renderer/lib/web-view/web-view.coffee
docs/api/auto-updater.md
docs/api/browser-window.md
docs/api/crash-reporter.md
docs/api/download-item.md
docs/api/native-image.md
docs/api/remote.md
docs/api/session.md
docs/api/synopsis.md
docs/api/web-contents.md
docs/api/web-frame.md
docs/api/web-view-tag.md
docs/tutorial/application-packaging.md
docs/tutorial/online-offline-events.md
docs/tutorial/quick-start.md
docs/tutorial/using-pepper-flash-plugin.md
spec/api-browser-window-spec.coffee
spec/api-clipboard-spec.coffee
spec/api-crash-reporter-spec.coffee
spec/api-ipc-spec.coffee
spec/api-session-spec.coffee
spec/asar-spec.coffee
spec/chromium-spec.coffee
spec/fixtures/api/crash.html
spec/static/main.js

index 1c80f73..1a02a54 100644 (file)
@@ -81,7 +81,7 @@ void AutoUpdater::OnWindowAllClosed() {
 mate::ObjectTemplateBuilder AutoUpdater::GetObjectTemplateBuilder(
     v8::Isolate* isolate) {
   return mate::ObjectTemplateBuilder(isolate)
-      .SetMethod("setFeedUrl", &auto_updater::AutoUpdater::SetFeedURL)
+      .SetMethod("setFeedURL", &auto_updater::AutoUpdater::SetFeedURL)
       .SetMethod("checkForUpdates", &auto_updater::AutoUpdater::CheckForUpdates)
       .SetMethod("quitAndInstall", &AutoUpdater::QuitAndInstall);
 }
index 4f989ef..a3b2c37 100644 (file)
@@ -204,7 +204,7 @@ void Cookies::GetCookiesOnIOThread(scoped_ptr<base::DictionaryValue> filter,
               Passed(&filter), callback))) {
     BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
         base::Bind(&RunGetCookiesCallbackOnUIThread, isolate(),
-                   "Url is not valid", net::CookieList(), callback));
+                   "URL is not valid", net::CookieList(), callback));
   }
 }
 
@@ -229,7 +229,7 @@ void Cookies::Remove(const mate::Dictionary& details,
     error_message = "Details(url, name) of removing cookie are required.";
   }
   if (error_message.empty() && !url.is_valid()) {
-    error_message = "Url is not valid.";
+    error_message = "URL is not valid.";
   }
   if (!error_message.empty()) {
      RunRemoveCookiesCallbackOnUIThread(isolate(), error_message, callback);
@@ -261,7 +261,7 @@ void Cookies::Set(const base::DictionaryValue& options,
 
   GURL gurl(url);
   if (error_message.empty() && !gurl.is_valid()) {
-    error_message = "Url is not valid.";
+    error_message = "URL is not valid.";
   }
 
   if (!error_message.empty()) {
index 691cfbf..7dd2713 100644 (file)
@@ -103,7 +103,7 @@ int64 DownloadItem::GetTotalBytes() {
   return download_item_->GetTotalBytes();
 }
 
-const GURL& DownloadItem::GetUrl() {
+const GURL& DownloadItem::GetURL() {
   return download_item_->GetURL();
 }
 
@@ -116,7 +116,7 @@ bool DownloadItem::HasUserGesture() {
 }
 
 std::string DownloadItem::GetFilename() {
-  return base::UTF16ToUTF8(net::GenerateFileName(GetUrl(),
+  return base::UTF16ToUTF8(net::GenerateFileName(GetURL(),
                            GetContentDisposition(),
                            std::string(),
                            download_item_->GetSuggestedFilename(),
@@ -152,7 +152,7 @@ mate::ObjectTemplateBuilder DownloadItem::GetObjectTemplateBuilder(
       .SetMethod("cancel", &DownloadItem::Cancel)
       .SetMethod("getReceivedBytes", &DownloadItem::GetReceivedBytes)
       .SetMethod("getTotalBytes", &DownloadItem::GetTotalBytes)
-      .SetMethod("getUrl", &DownloadItem::GetUrl)
+      .SetMethod("getURL", &DownloadItem::GetURL)
       .SetMethod("getMimeType", &DownloadItem::GetMimeType)
       .SetMethod("hasUserGesture", &DownloadItem::HasUserGesture)
       .SetMethod("getFilename", &DownloadItem::GetFilename)
index 14074a4..955801c 100644 (file)
@@ -49,7 +49,7 @@ class DownloadItem : public mate::EventEmitter,
   bool HasUserGesture();
   std::string GetFilename();
   std::string GetContentDisposition();
-  const GURL& GetUrl();
+  const GURL& GetURL();
   void SetSavePath(const base::FilePath& path);
 
  private:
index e76f26f..b1ad798 100644 (file)
@@ -37,7 +37,7 @@ mate::ObjectTemplateBuilder Protocol::GetObjectTemplateBuilder(
       .SetMethod("registerBufferProtocol",
                  &Protocol::RegisterProtocol<URLRequestBufferJob>)
       .SetMethod("registerFileProtocol",
-                 &Protocol::RegisterProtocol<UrlRequestAsyncAsarJob>)
+                 &Protocol::RegisterProtocol<URLRequestAsyncAsarJob>)
       .SetMethod("registerHttpProtocol",
                  &Protocol::RegisterProtocol<URLRequestFetchJob>)
       .SetMethod("unregisterProtocol", &Protocol::UnregisterProtocol)
@@ -47,7 +47,7 @@ mate::ObjectTemplateBuilder Protocol::GetObjectTemplateBuilder(
       .SetMethod("interceptBufferProtocol",
                  &Protocol::InterceptProtocol<URLRequestBufferJob>)
       .SetMethod("interceptFileProtocol",
-                 &Protocol::InterceptProtocol<UrlRequestAsyncAsarJob>)
+                 &Protocol::InterceptProtocol<URLRequestAsyncAsarJob>)
       .SetMethod("interceptHttpProtocol",
                  &Protocol::InterceptProtocol<URLRequestFetchJob>)
       .SetMethod("uninterceptProtocol", &Protocol::UninterceptProtocol);
index d67794a..601a4ba 100644 (file)
@@ -1003,8 +1003,8 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder(
         .SetMethod("isAlive", &WebContents::IsAlive, true)
         .SetMethod("getId", &WebContents::GetID)
         .SetMethod("equal", &WebContents::Equal)
-        .SetMethod("_loadUrl", &WebContents::LoadURL)
-        .SetMethod("_getUrl", &WebContents::GetURL)
+        .SetMethod("_loadURL", &WebContents::LoadURL)
+        .SetMethod("_getURL", &WebContents::GetURL)
         .SetMethod("getTitle", &WebContents::GetTitle)
         .SetMethod("isLoading", &WebContents::IsLoading)
         .SetMethod("isWaitingForResponse", &WebContents::IsWaitingForResponse)
index 3494a6e..f8d3ced 100644 (file)
@@ -63,10 +63,11 @@ wrapDownloadItem = (downloadItem) ->
   # downloadItem is an EventEmitter.
   downloadItem.__proto__ = EventEmitter.prototype
   # Deprecated.
-  deprecate.property downloadItem, 'url', 'getUrl'
+  deprecate.property downloadItem, 'url', 'getURL'
   deprecate.property downloadItem, 'filename', 'getFilename'
   deprecate.property downloadItem, 'mimeType', 'getMimeType'
   deprecate.property downloadItem, 'hasUserGesture', 'hasUserGesture'
+  deprecate.rename downloadItem, 'getUrl', 'getURL'
 downloadItemBindings._setWrapDownloadItem wrapDownloadItem
 
 # Only one App object pemitted.
index d5e69e2..28df59f 100644 (file)
@@ -1,5 +1,12 @@
-module.exports =
+{deprecate} = require 'electron'
+
+autoUpdater =
   if process.platform is 'win32'
     require './auto-updater/auto-updater-win'
   else
     require './auto-updater/auto-updater-native'
+
+# Deprecated.
+deprecate.rename autoUpdater, 'setFeedUrl', 'setFeedURL'
+
+module.exports = autoUpdater
index 12ebeda..e7cb194 100644 (file)
@@ -9,28 +9,28 @@ class AutoUpdater extends EventEmitter
     squirrelUpdate.processStart()
     app.quit()
 
-  setFeedUrl: (updateUrl) ->
-    @updateUrl = updateUrl
+  setFeedURL: (updateURL) ->
+    @updateURL = updateURL
 
   checkForUpdates: ->
-    return @emitError 'Update URL is not set' unless @updateUrl
+    return @emitError 'Update URL is not set' unless @updateURL
     return @emitError 'Can not find Squirrel' unless squirrelUpdate.supported()
 
     @emit 'checking-for-update'
 
-    squirrelUpdate.download @updateUrl, (error, update) =>
+    squirrelUpdate.download @updateURL, (error, update) =>
       return @emitError error if error?
       return @emit 'update-not-available' unless update?
 
       @emit 'update-available'
 
-      squirrelUpdate.update @updateUrl, (error) =>
+      squirrelUpdate.update @updateURL, (error) =>
         return @emitError error if error?
 
         {releaseNotes, version} = update
         # Following information is not available on Windows, so fake them.
         date = new Date
-        url = @updateUrl
+        url = @updateURL
 
         @emit 'update-downloaded', {}, releaseNotes, version, date, url, => @quitAndInstall()
 
index ed30212..ee914c4 100644 (file)
@@ -41,8 +41,8 @@ exports.processStart = (callback) ->
   spawnUpdate ['--processStart', exeName], true, ->
 
 # Download the releases specified by the URL and write new results to stdout.
-exports.download = (updateUrl, callback) ->
-  spawnUpdate ['--download', updateUrl], false, (error, stdout) ->
+exports.download = (updateURL, callback) ->
+  spawnUpdate ['--download', updateURL], false, (error, stdout) ->
     return callback(error) if error?
 
     try
@@ -55,8 +55,8 @@ exports.download = (updateUrl, callback) ->
     callback null, update
 
 # Update the application to the latest remote version specified by URL.
-exports.update = (updateUrl, callback) ->
-  spawnUpdate ['--update', updateUrl], false, callback
+exports.update = (updateURL, callback) ->
+  spawnUpdate ['--update', updateURL], false, callback
 
 # Is the Update.exe installed with the current application?
 exports.supported = ->
index 3cefa1b..9947bc1 100644 (file)
@@ -69,7 +69,8 @@ BrowserWindow.fromDevToolsWebContents = (webContents) ->
   return window for window in windows when window.devToolsWebContents?.equal webContents
 
 # Helpers.
-BrowserWindow::loadUrl = -> @webContents.loadUrl.apply @webContents, arguments
+BrowserWindow::loadURL = -> @webContents.loadURL.apply @webContents, arguments
+BrowserWindow::getURL = -> @webContents.getURL()
 BrowserWindow::reload = -> @webContents.reload.apply @webContents, arguments
 BrowserWindow::send = -> @webContents.send.apply @webContents, arguments
 BrowserWindow::openDevTools = -> @webContents.openDevTools.apply @webContents, arguments
@@ -80,14 +81,12 @@ BrowserWindow::inspectElement = -> @webContents.inspectElement.apply @webContent
 BrowserWindow::inspectServiceWorker = -> @webContents.inspectServiceWorker()
 
 # Deprecated.
-deprecate.rename BrowserWindow, 'restart', 'reload'
 deprecate.member BrowserWindow, 'undo', 'webContents'
 deprecate.member BrowserWindow, 'redo', 'webContents'
 deprecate.member BrowserWindow, 'cut', 'webContents'
 deprecate.member BrowserWindow, 'copy', 'webContents'
 deprecate.member BrowserWindow, 'paste', 'webContents'
 deprecate.member BrowserWindow, 'selectAll', 'webContents'
-deprecate.member BrowserWindow, 'getUrl', 'webContents'
 deprecate.member BrowserWindow, 'reloadIgnoringCache', 'webContents'
 deprecate.member BrowserWindow, 'getPageTitle', 'webContents'
 deprecate.member BrowserWindow, 'isLoading', 'webContents'
@@ -97,5 +96,8 @@ deprecate.member BrowserWindow, 'isCrashed', 'webContents'
 deprecate.member BrowserWindow, 'executeJavaScriptInDevTools', 'webContents'
 deprecate.member BrowserWindow, 'print', 'webContents'
 deprecate.member BrowserWindow, 'printToPDF', 'webContents'
+deprecate.rename BrowserWindow, 'restart', 'reload'
+deprecate.rename BrowserWindow, 'loadUrl', 'loadURL'
+deprecate.rename BrowserWindow, 'getUrl', 'getURL'
 
 module.exports = BrowserWindow
index 88b1ed3..7d276e5 100644 (file)
@@ -9,7 +9,7 @@ ipcMain.on 'ATOM_SHELL_SYNC_NAVIGATION_CONTROLLER', (event, method, args...) ->
 
 # JavaScript implementation of Chromium's NavigationController.
 # Instead of relying on Chromium for history control, we compeletely do history
-# control on user land, and only rely on WebContents.loadUrl for navigation.
+# control on user land, and only rely on WebContents.loadURL for navigation.
 # This helps us avoid Chromium's various optimizations so we can ensure renderer
 # process is restarted everytime.
 class NavigationController
@@ -17,9 +17,9 @@ class NavigationController
     @clearHistory()
 
     # webContents may have already navigated to a page.
-    if @webContents._getUrl()
+    if @webContents._getURL()
       @currentIndex++
-      @history.push @webContents._getUrl()
+      @history.push @webContents._getURL()
 
     @webContents.on 'navigation-entry-commited', (event, url, inPage, replaceEntry) =>
       if @inPageIndex > -1 and not inPage
@@ -42,12 +42,12 @@ class NavigationController
           @currentIndex++
           @history.push url
 
-  loadUrl: (url, options={}) ->
+  loadURL: (url, options={}) ->
     @pendingIndex = -1
-    @webContents._loadUrl url, options
+    @webContents._loadURL url, options
     @webContents.emit 'load-url', url, options
 
-  getUrl: ->
+  getURL: ->
     if @currentIndex is -1
       ''
     else
@@ -59,7 +59,7 @@ class NavigationController
 
   reload: ->
     @pendingIndex = @currentIndex
-    @webContents._loadUrl @getUrl(), {}
+    @webContents._loadURL @getURL(), {}
 
   reloadIgnoringCache: ->
     @webContents._reloadIgnoringCache()  # Rely on WebContents to clear cache.
@@ -89,7 +89,7 @@ class NavigationController
     if @inPageIndex > -1 and @pendingIndex >= @inPageIndex
       @webContents._goBack()
     else
-      @webContents._loadUrl @history[@pendingIndex], {}
+      @webContents._loadURL @history[@pendingIndex], {}
 
   goForward: ->
     return unless @canGoForward()
@@ -97,12 +97,12 @@ class NavigationController
     if @inPageIndex > -1 and @pendingIndex >= @inPageIndex
       @webContents._goForward()
     else
-      @webContents._loadUrl @history[@pendingIndex], {}
+      @webContents._loadURL @history[@pendingIndex], {}
 
   goToIndex: (index) ->
     return unless @canGoToIndex index
     @pendingIndex = index
-    @webContents._loadUrl @history[@pendingIndex], {}
+    @webContents._loadURL @history[@pendingIndex], {}
 
   goToOffset: (offset) ->
     return unless @canGoToOffset offset
index b3b1e7e..1a224c7 100644 (file)
@@ -1,5 +1,5 @@
 {EventEmitter} = require 'events'
-{ipcMain, NavigationController, Menu} = require 'electron'
+{deprecate, ipcMain, NavigationController, Menu} = require 'electron'
 
 binding = process.atomBinding 'web_contents'
 
@@ -45,7 +45,7 @@ wrapWebContents = (webContents) ->
   # Make sure webContents.executeJavaScript would run the code only when the
   # web contents has been loaded.
   webContents.executeJavaScript = (code, hasUserGesture=false) ->
-    if @getUrl() and not @isLoading()
+    if @getURL() and not @isLoading()
       @_executeJavaScript code, hasUserGesture
     else
       webContents.once 'did-finish-load', @_executeJavaScript.bind(this, code, hasUserGesture)
@@ -70,6 +70,10 @@ wrapWebContents = (webContents) ->
     menu = Menu.buildFromTemplate params.menu
     menu.popup params.x, params.y
 
+  # Deprecated.
+  deprecate.rename webContents, 'loadUrl', 'loadURL'
+  deprecate.rename webContents, 'getUrl', 'getURL'
+
   webContents.printToPDF = (options, callback) ->
     printingSetting =
       pageRage: []
index 3d254f0..adf2f50 100644 (file)
@@ -18,7 +18,7 @@ namespace {
 // Notice that we just combined the api key with the url together here, because
 // if we use the standard {url: key} format Chromium would override our key with
 // the predefined one in common.gypi of libchromiumcontent, which is empty.
-const char* kGeolocationProviderUrl =
+const char* kGeolocationProviderURL =
     "https://www.googleapis.com/geolocation/v1/geolocate?key="
     GOOGLEAPIS_API_KEY;
 
@@ -35,11 +35,11 @@ void AtomAccessTokenStore::LoadAccessTokens(
     const LoadAccessTokensCallbackType& callback) {
   AccessTokenSet access_token_set;
 
-  // Equivelent to access_token_set[kGeolocationProviderUrl].
+  // Equivelent to access_token_set[kGeolocationProviderURL].
   // Somehow base::string16 is causing compilation errors when used in a pair
   // of std::map on Linux, this can work around it.
   std::pair<GURL, base::string16> token_pair;
-  token_pair.first = GURL(kGeolocationProviderUrl);
+  token_pair.first = GURL(kGeolocationProviderURL);
   access_token_set.insert(token_pair);
 
   auto browser_context = AtomBrowserMainParts::Get()->browser_context();
index 6a94db4..2ec765d 100644 (file)
@@ -16,6 +16,6 @@ app.on('ready', function() {
     autoHideMenuBar: true,
     useContentSize: true,
   });
-  mainWindow.loadUrl('file://' + __dirname + '/index.html');
+  mainWindow.loadURL('file://' + __dirname + '/index.html');
   mainWindow.focus();
 });
index 4a33b28..e6be05a 100644 (file)
@@ -79,7 +79,7 @@ createGuest = (embedder, params) ->
       opts = {}
       opts.httpReferrer = params.httpreferrer if params.httpreferrer
       opts.userAgent = params.useragent if params.useragent
-      @loadUrl params.src, opts
+      @loadURL params.src, opts
 
     if params.allowtransparency?
       @setAllowTransparency params.allowtransparency
@@ -122,7 +122,7 @@ attachGuest = (embedder, elementInstanceId, guestInstanceId, params) ->
     nodeIntegration: params.nodeintegration ? false
     plugins: params.plugins
     webSecurity: !params.disablewebsecurity
-  webPreferences.preloadUrl = params.preload if params.preload
+  webPreferences.preloadURL = params.preload if params.preload
   webViewManager.addGuest guestInstanceId, elementInstanceId, embedder, guest, webPreferences
 
   guest.attachParams = params
index c602d37..c311e01 100644 (file)
@@ -27,11 +27,11 @@ mergeBrowserWindowOptions = (embedder, options) ->
 createGuest = (embedder, url, frameName, options) ->
   guest = frameToGuest[frameName]
   if frameName and guest?
-    guest.loadUrl url
+    guest.loadURL url
     return guest.id
 
   guest = new BrowserWindow(options)
-  guest.loadUrl url
+  guest.loadURL url
 
   # Remember the embedder, will be used by window.opener methods.
   v8Util.setHiddenValue guest.webContents, 'embedder', embedder
@@ -74,12 +74,12 @@ ipcMain.on 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_METHOD', (event, guestId, met
 
 ipcMain.on 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_POSTMESSAGE', (event, guestId, message, targetOrigin) ->
   guestContents = BrowserWindow.fromId(guestId)?.webContents
-  if guestContents?.getUrl().indexOf(targetOrigin) is 0 or targetOrigin is '*'
+  if guestContents?.getURL().indexOf(targetOrigin) is 0 or targetOrigin is '*'
     guestContents.send 'ATOM_SHELL_GUEST_WINDOW_POSTMESSAGE', guestId, message, targetOrigin
 
 ipcMain.on 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPENER_POSTMESSAGE', (event, guestId, message, targetOrigin, sourceOrigin) ->
   embedder = v8Util.getHiddenValue event.sender, 'embedder'
-  if embedder?.getUrl().indexOf(targetOrigin) is 0 or targetOrigin is '*'
+  if embedder?.getURL().indexOf(targetOrigin) is 0 or targetOrigin is '*'
     embedder.send 'ATOM_SHELL_GUEST_WINDOW_POSTMESSAGE', guestId, message, sourceOrigin
 
 ipcMain.on 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WEB_CONTENTS_METHOD', (event, guestId, method, args...) ->
index ba0189e..303bfc0 100644 (file)
@@ -6,13 +6,13 @@
 
 namespace atom {
 
-UrlRequestAsyncAsarJob::UrlRequestAsyncAsarJob(
+URLRequestAsyncAsarJob::URLRequestAsyncAsarJob(
     net::URLRequest* request,
     net::NetworkDelegate* network_delegate)
     : JsAsker<asar::URLRequestAsarJob>(request, network_delegate) {
 }
 
-void UrlRequestAsyncAsarJob::StartAsync(scoped_ptr<base::Value> options) {
+void URLRequestAsyncAsarJob::StartAsync(scoped_ptr<base::Value> options) {
   base::FilePath::StringType file_path;
   if (options->IsType(base::Value::TYPE_DICTIONARY)) {
     static_cast<base::DictionaryValue*>(options.get())->GetString(
index 748b96d..df1aed3 100644 (file)
 namespace atom {
 
 // Like URLRequestAsarJob, but asks the JavaScript handler for file path.
-class UrlRequestAsyncAsarJob : public JsAsker<asar::URLRequestAsarJob> {
+class URLRequestAsyncAsarJob : public JsAsker<asar::URLRequestAsarJob> {
  public:
-  UrlRequestAsyncAsarJob(net::URLRequest*, net::NetworkDelegate*);
+  URLRequestAsyncAsarJob(net::URLRequest*, net::NetworkDelegate*);
 
   // JsAsker:
   void StartAsync(scoped_ptr<base::Value> options) override;
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(UrlRequestAsyncAsarJob);
+  DISALLOW_COPY_AND_ASSIGN(URLRequestAsyncAsarJob);
 };
 
 }  // namespace atom
index 188de4d..8314536 100644 (file)
@@ -113,7 +113,7 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
       command_line->AppendSwitchNative(switches::kPreloadScript, preload);
     else
       LOG(ERROR) << "preload script must have absolute path.";
-  } else if (web_preferences.GetString(options::kPreloadUrl, &preload)) {
+  } else if (web_preferences.GetString(options::kPreloadURL, &preload)) {
     // Translate to file path if there is "preload-url" option.
     base::FilePath preload_path;
     if (net::FileURLToFilePath(GURL(preload), &preload_path))
index df6c14d..e0f0940 100644 (file)
@@ -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);
 }
 
index 873fc18..0713da9 100644 (file)
@@ -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"
       ]
index c3cbb60..2bdfd49 100644 (file)
@@ -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
index 1d375ba..1124cfb 100644 (file)
@@ -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";
index 7f262fb..cd52c97 100644 (file)
@@ -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[];
index 87f45e5..cca3929 100644 (file)
@@ -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;
   }
index 6961304..e9b2b03 100644 (file)
@@ -98,7 +98,7 @@ void WebFrame::RegisterURLSchemeAsSecure(const std::string& scheme) {
       blink::WebString::fromUTF8(scheme));
 }
 
-void WebFrame::RegisterURLSchemeAsBypassingCsp(const std::string& scheme) {
+void WebFrame::RegisterURLSchemeAsBypassingCSP(const std::string& scheme) {
   // Register scheme to bypass pages's Content Security Policy.
   blink::WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(
       blink::WebString::fromUTF8(scheme));
@@ -129,11 +129,11 @@ mate::ObjectTemplateBuilder WebFrame::GetObjectTemplateBuilder(
                  &WebFrame::RegisterElementResizeCallback)
       .SetMethod("attachGuest", &WebFrame::AttachGuest)
       .SetMethod("setSpellCheckProvider", &WebFrame::SetSpellCheckProvider)
-      .SetMethod("registerUrlSchemeAsSecure",
+      .SetMethod("registerURLSchemeAsSecure",
                  &WebFrame::RegisterURLSchemeAsSecure)
-      .SetMethod("registerUrlSchemeAsBypassingCsp",
-                 &WebFrame::RegisterURLSchemeAsBypassingCsp)
-      .SetMethod("registerUrlSchemeAsPrivileged",
+      .SetMethod("registerURLSchemeAsBypassingCSP",
+                 &WebFrame::RegisterURLSchemeAsBypassingCSP)
+      .SetMethod("registerURLSchemeAsPrivileged",
                  &WebFrame::RegisterURLSchemeAsPrivileged);
 }
 
index a3dec6c..95a5a82 100644 (file)
@@ -57,7 +57,7 @@ class WebFrame : public mate::Wrappable {
                              v8::Local<v8::Object> provider);
 
   void RegisterURLSchemeAsSecure(const std::string& scheme);
-  void RegisterURLSchemeAsBypassingCsp(const std::string& scheme);
+  void RegisterURLSchemeAsBypassingCSP(const std::string& scheme);
   void RegisterURLSchemeAsPrivileged(const std::string& scheme);
 
   // mate::Wrappable:
index 6525730..53564c6 100644 (file)
@@ -1 +1,9 @@
-module.exports = process.atomBinding('web_frame').webFrame
+{deprecate} = require 'electron'
+{webFrame} = process.atomBinding 'web_frame'
+
+# Deprecated.
+deprecate.rename webFrame, 'registerUrlSchemeAsSecure', 'registerURLSchemeAsSecure'
+deprecate.rename webFrame, 'registerUrlSchemeAsBypassingCSP', 'registerURLSchemeAsBypassingCSP'
+deprecate.rename webFrame, 'registerUrlSchemeAsPrivileged', 'registerURLSchemeAsPrivileged'
+
+module.exports = webFrame
index d12952a..a3a2f9a 100644 (file)
@@ -2,7 +2,7 @@
 
 # Helper function to resolve relative url.
 a = window.top.document.createElement 'a'
-resolveUrl = (url) ->
+resolveURL = (url) ->
   a.href = url
   a.href
 
@@ -55,7 +55,7 @@ window.open = (url, frameName='', features='') ->
   options.height ?= 600
 
   # Resolve relative urls.
-  url = resolveUrl url
+  url = resolveURL url
 
   (options[name] = parseInt(options[name], 10) if options[name]?) for name in ints
 
index a01a994..61a93d8 100644 (file)
@@ -5,14 +5,14 @@ requestId = 0
 WEB_VIEW_EVENTS =
   'load-commit': ['url', 'isMainFrame']
   'did-finish-load': []
-  'did-fail-load': ['errorCode', 'errorDescription', 'validatedUrl']
+  'did-fail-load': ['errorCode', 'errorDescription', 'validatedURL']
   'did-frame-finish-load': ['isMainFrame']
   'did-start-loading': []
   'did-stop-loading': []
-  'did-get-response-details': ['status', 'newUrl', 'originalUrl',
+  'did-get-response-details': ['status', 'newURL', 'originalURL',
                                'httpResponseCode', 'requestMethod', 'referrer',
                                'headers']
-  'did-get-redirect-request': ['oldUrl', 'newUrl', 'isMainFrame']
+  'did-get-redirect-request': ['oldURL', 'newURL', 'isMainFrame']
   'dom-ready': []
   'console-message': ['level', 'message', 'line', 'sourceId']
   'new-window': ['url', 'frameName', 'disposition', 'options']
index 48e57ea..7760b40 100644 (file)
@@ -6,7 +6,7 @@ webViewConstants = require './web-view-constants'
 
 # Helper function to resolve url set in attribute.
 a = document.createElement 'a'
-resolveUrl = (url) ->
+resolveURL = (url) ->
   a.href = url
   a.href
 
@@ -116,7 +116,7 @@ class SrcAttribute extends WebViewAttribute
 
   getValue: ->
     if @webViewImpl.webviewNode.hasAttribute @name
-      resolveUrl @webViewImpl.webviewNode.getAttribute(@name)
+      resolveURL @webViewImpl.webviewNode.getAttribute(@name)
     else
       ''
 
@@ -178,7 +178,7 @@ class SrcAttribute extends WebViewAttribute
     if useragent then opts.userAgent = useragent
 
     guestContents = remote.getGuestWebContents(@webViewImpl.guestInstanceId)
-    guestContents.loadUrl @getValue(), opts
+    guestContents.loadURL @getValue(), opts
 
 # Attribute specifies HTTP referrer.
 class HttpReferrerAttribute extends WebViewAttribute
@@ -197,7 +197,7 @@ class PreloadAttribute extends WebViewAttribute
 
   getValue: ->
     return '' unless @webViewImpl.webviewNode.hasAttribute @name
-    preload = resolveUrl @webViewImpl.webviewNode.getAttribute(@name)
+    preload = resolveURL @webViewImpl.webviewNode.getAttribute(@name)
     protocol = preload.substr 0, 5
     unless protocol is 'file:'
       console.error webViewConstants.ERROR_MSG_INVALID_PRELOAD_ATTRIBUTE
index 204889d..5e3f7d6 100644 (file)
@@ -1,4 +1,4 @@
-{webFrame, remote} = require 'electron'
+{deprecate, webFrame, remote} = require 'electron'
 v8Util = process.atomBinding 'v8_util'
 
 guestViewInternal = require './guest-view-internal'
@@ -252,49 +252,49 @@ registerWebViewElement = ->
 
   # Public-facing API methods.
   methods = [
-    "getUrl"
-    "getTitle"
-    "isLoading"
-    "isWaitingForResponse"
-    "stop"
-    "reload"
-    "reloadIgnoringCache"
-    "canGoBack"
-    "canGoForward"
-    "canGoToOffset"
-    "clearHistory"
-    "goBack"
-    "goForward"
-    "goToIndex"
-    "goToOffset"
-    "isCrashed"
-    "setUserAgent"
-    "getUserAgent"
-    "executeJavaScript"
-    "insertCSS"
-    "openDevTools"
-    "closeDevTools"
-    "isDevToolsOpened"
-    "inspectElement"
-    "setAudioMuted"
-    "isAudioMuted"
-    "undo"
-    "redo"
-    "cut"
-    "copy"
-    "paste"
-    "pasteAndMatchStyle"
-    "delete"
-    "selectAll"
-    "unselect"
-    "replace"
-    "replaceMisspelling"
-    "send"
-    "getId"
-    "inspectServiceWorker"
-    "print"
-    "printToPDF"
-    "sendInputEvent"
+    'getURL'
+    'getTitle'
+    'isLoading'
+    'isWaitingForResponse'
+    'stop'
+    'reload'
+    'reloadIgnoringCache'
+    'canGoBack'
+    'canGoForward'
+    'canGoToOffset'
+    'clearHistory'
+    'goBack'
+    'goForward'
+    'goToIndex'
+    'goToOffset'
+    'isCrashed'
+    'setUserAgent'
+    'getUserAgent'
+    'executeJavaScript'
+    'insertCSS'
+    'openDevTools'
+    'closeDevTools'
+    'isDevToolsOpened'
+    'inspectElement'
+    'setAudioMuted'
+    'isAudioMuted'
+    'undo'
+    'redo'
+    'cut'
+    'copy'
+    'paste'
+    'pasteAndMatchStyle'
+    'delete'
+    'selectAll'
+    'unselect'
+    'replace'
+    'replaceMisspelling'
+    'send'
+    'getId'
+    'inspectServiceWorker'
+    'print'
+    'printToPDF'
+    'sendInputEvent'
   ]
 
   # Forward proto.foo* method calls to WebViewImpl.foo*.
@@ -304,6 +304,9 @@ registerWebViewElement = ->
       internal.webContents[m] args...
   proto[m] = createHandler m for m in methods
 
+  # Deprecated.
+  deprecate.rename proto, 'getUrl', 'getURL'
+
   window.WebView = webFrame.registerEmbedderCustomElement 'webview',
     prototype: proto
 
index eb0ea37..fa4f92c 100644 (file)
@@ -67,7 +67,7 @@ Returns:
 * `releaseNotes` String
 * `releaseName` String
 * `releaseDate` Date
-* `updateUrl` String
+* `updateURL` String
 
 Emitted when an update has been downloaded.
 
@@ -77,7 +77,7 @@ On Windows only `releaseName` is available.
 
 The `autoUpdater` object has the following methods:
 
-### `autoUpdater.setFeedUrl(url)`
+### `autoUpdater.setFeedURL(url)`
 
 * `url` String
 
@@ -86,7 +86,7 @@ once it is set.
 
 ### `autoUpdater.checkForUpdates()`
 
-Asks the server whether there is an update. You must call `setFeedUrl` before
+Asks the server whether there is an update. You must call `setFeedURL` before
 using this API.
 
 ### `autoUpdater.quitAndInstall()`
index 670c814..3b293e9 100644 (file)
@@ -11,7 +11,7 @@ win.on('closed', function() {
   win = null;
 });
 
-win.loadUrl('https://github.com');
+win.loadURL('https://github.com');
 win.show();
 ```
 
@@ -613,9 +613,9 @@ Same as `webContents.print([options])`
 
 Same as `webContents.printToPDF(options, callback)`
 
-### `win.loadUrl(url[, options])`
+### `win.loadURL(url[, options])`
 
-Same as `webContents.loadUrl(url[, options])`.
+Same as `webContents.loadURL(url[, options])`.
 
 ### `win.reload()`
 
index 8127c9b..6c66a85 100644 (file)
@@ -11,7 +11,7 @@ const crashReporter = require('electron').crashReporter;
 crashReporter.start({
   productName: 'YourName',
   companyName: 'YourCompany',
-  submitUrl: 'https://your-domain.com/url-to-submit',
+  submitURL: 'https://your-domain.com/url-to-submit',
   autoSubmit: true
 });
 ```
@@ -26,7 +26,7 @@ The `crash-reporter` module has the following methods:
 
 * `productName` String, default: Electron.
 * `companyName` String, default: GitHub, Inc.
-* `submitUrl` String, default: http://54.249.141.255:1127/post.
+* `submitURL` String, default: http://54.249.141.255:1127/post.
   * URL that crash reports will be sent to as POST.
 * `autoSubmit` Boolean, default: `true`.
   * Send the crash report without user interaction.
@@ -57,7 +57,7 @@ ID.
 
 ## crash-reporter Payload
 
-The crash reporter will send the following data to the `submitUrl` as `POST`:
+The crash reporter will send the following data to the `submitURL` as `POST`:
 
 * `ver` String - The version of Electron.
 * `platform` String - e.g. 'win32'.
index 53cd56c..756353b 100644 (file)
@@ -66,7 +66,7 @@ Resumes the download that has been paused.
 
 Cancels the download operation.
 
-### `downloadItem.getUrl()`
+### `downloadItem.getURL()`
 
 Returns a `String` represents the origin url where the item is downloaded from.
 
index 74dc7a6..c087889 100644 (file)
@@ -103,11 +103,11 @@ Creates a new `nativeImage` instance from a file located at `path`.
 Creates a new `nativeImage` instance from `buffer`. The default `scaleFactor` is
 1.0.
 
-### `nativeImage.createFromDataUrl(dataUrl)`
+### `nativeImage.createFromDataURL(dataURL)`
 
-* `dataUrl` String
+* `dataURL` String
 
-Creates a new `nativeImage` instance from `dataUrl`.
+Creates a new `nativeImage` instance from `dataURL`.
 
 ## Instance Methods
 
@@ -129,7 +129,7 @@ Returns a [Buffer][buffer] that contains the image's `PNG` encoded data.
 
 Returns a [Buffer][buffer] that contains the image's `JPEG` encoded data.
 
-### `image.toDataUrl()`
+### `image.toDataURL()`
 
 Returns the data URL of the image.
 
index 6eaa206..d6aca3e 100644 (file)
@@ -16,7 +16,7 @@ const remote = require('electron').remote;
 const BrowserWindow = remote.require('electron').BrowserWindow;
 
 var win = new BrowserWindow({ width: 800, height: 600 });
-win.loadUrl('https://github.com');
+win.loadURL('https://github.com');
 ```
 
 **Note:** for the reverse (access the renderer process from the main process),
index 0fa7258..c3a3c91 100644 (file)
@@ -8,7 +8,7 @@ instance of `BrowserWindow`. For example:
 const BrowserWindow = require('electron').BrowserWindow;
 
 var win = new BrowserWindow({ width: 800, height: 600 });
-win.loadUrl("http://github.com");
+win.loadURL("http://github.com");
 
 var session = win.webContents.session
 ```
@@ -28,7 +28,7 @@ Calling `event.preventDefault()` will cancel the download.
 ```javascript
 session.on('will-download', function(event, item, webContents) {
   event.preventDefault();
-  require('request')(item.getUrl(), function(data) {
+  require('request')(item.getURL(), function(data) {
     require('fs').writeFileSync('/somewhere', data);
   });
 });
@@ -47,7 +47,7 @@ const BrowserWindow = require('electron').BrowserWindow;
 
 var win = new BrowserWindow({ width: 800, height: 600 });
 
-win.loadUrl('https://github.com');
+win.loadURL('https://github.com');
 
 win.webContents.on('did-finish-load', function() {
   // Query all cookies.
index f6c161b..4cacf52 100644 (file)
@@ -25,7 +25,7 @@ var window = null;
 
 app.on('ready', function() {
   window = new BrowserWindow({width: 800, height: 600});
-  window.loadUrl('https://github.com');
+  window.loadURL('https://github.com');
 });
 ```
 
index aff5752..917e067 100644 (file)
@@ -11,7 +11,7 @@ the [`BrowserWindow`](browser-window.md) object. An example of accessing the
 const BrowserWindow = require('electron').BrowserWindow;
 
 var win = new BrowserWindow({width: 800, height: 1500});
-win.loadUrl("http://github.com");
+win.loadURL("http://github.com");
 
 var webContents = win.webContents;
 ```
@@ -32,7 +32,7 @@ Returns:
 * `event` Event
 * `errorCode` Integer
 * `errorDescription` String
-* `validatedUrl` String
+* `validatedURL` String
 
 This event is like `did-finish-load` but emitted when the load failed or was
 cancelled, e.g. `window.stop()` is invoked.
@@ -61,8 +61,8 @@ Returns:
 
 * `event` Event
 * `status` Boolean
-* `newUrl` String
-* `originalUrl` String
+* `newURL` String
+* `originalURL` String
 * `httpResponseCode` Integer
 * `requestMethod` String
 * `referrer` String
@@ -76,8 +76,8 @@ Emitted when details regarding a requested resource are available.
 Returns:
 
 * `event` Event
-* `oldUrl` String
-* `newUrl` String
+* `oldURL` String
+* `newURL` String
 * `isMainFrame` Boolean
 * `httpResponseCode` Integer
 * `requestMethod` String
@@ -99,7 +99,7 @@ Emitted when the document in the given frame is loaded.
 Returns:
 
 * `event` Event
-* `favicons` Array - Array of Urls
+* `favicons` Array - Array of URLs
 
 Emitted when page receives favicon urls.
 
@@ -133,7 +133,7 @@ Emitted when a user or the page wants to start navigation. It can happen when th
 `window.location` object is changed or a user clicks a link in the page.
 
 This event will not emit when the navigation is started programmatically with
-APIs like `webContents.loadUrl` and `webContents.back`.
+APIs like `webContents.loadURL` and `webContents.back`.
 
 Calling `event.preventDefault()` will prevent the navigation.
 
@@ -198,7 +198,7 @@ Returns the `session` object used by this webContents.
 
 See [session documentation](session.md) for this object's methods.
 
-### `webContents.loadUrl(url[, options])`
+### `webContents.loadURL(url[, options])`
 
 * `url` URL
 * `options` Object (optional), properties:
@@ -209,15 +209,15 @@ See [session documentation](session.md) for this object's methods.
 Loads the `url` in the window, the `url` must contain the protocol prefix,
 e.g. the `http://` or `file://`.
 
-### `webContents.getUrl()`
+### `webContents.getURL()`
 
 Returns URL of the current web page.
 
 ```javascript
 var win = new BrowserWindow({width: 800, height: 600});
-win.loadUrl("http://github.com");
+win.loadURL("http://github.com");
 
-var currentUrl = win.webContents.getUrl();
+var currentURL = win.webContents.getURL();
 ```
 
 ### `webContents.getTitle()`
@@ -447,7 +447,7 @@ const BrowserWindow = require('electron').BrowserWindow;
 const fs = require('fs');
 
 var win = new BrowserWindow({width: 800, height: 600});
-win.loadUrl("http://github.com");
+win.loadURL("http://github.com");
 
 win.webContents.on("did-finish-load", function() {
   // Use default printing options
@@ -524,7 +524,7 @@ An example of sending messages from the main process to the renderer process:
 var window = null;
 app.on('ready', function() {
   window = new BrowserWindow({width: 800, height: 600});
-  window.loadUrl('file://' + __dirname + '/index.html');
+  window.loadURL('file://' + __dirname + '/index.html');
   window.webContents.on('did-finish-load', function() {
     window.webContents.send('ping', 'whoooooooh!');
   });
@@ -660,7 +660,7 @@ when the DevTools has been closed.
 Returns true if the process of saving page has been initiated successfully.
 
 ```javascript
-win.loadUrl('https://github.com');
+win.loadURL('https://github.com');
 
 win.webContents.on('did-finish-load', function() {
   win.webContents.savePage('/tmp/test.html', 'HTMLComplete', function(error) {
index c9cfb48..38c5e30 100644 (file)
@@ -66,7 +66,7 @@ webFrame.setSpellCheckProvider("en-US", true, {
 });
 ```
 
-### `webFrame.registerUrlSchemeAsSecure(scheme)`
+### `webFrame.registerURLSchemeAsSecure(scheme)`
 
 * `scheme` String
 
@@ -76,14 +76,14 @@ 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)`
+### `webFrame.registerURLSchemeAsBypassingCSP(scheme)`
 
 * `scheme` String
 
 Resources will be loaded from this `scheme` regardless of the current page's
 Content Security Policy.
 
-### `webFrame.registerUrlSchemeAsPrivileged(scheme)`
+### `webFrame.registerURLSchemeAsPrivileged(scheme)`
 
 * `scheme` String
 
index a12ec44..25b0e39 100644 (file)
@@ -170,7 +170,7 @@ webview.addEventListener("dom-ready", function() {
 });
 ```
 
-### `<webview>.getUrl()`
+### `<webview>.getURL()`
 
 Returns URL of guest page.
 
@@ -402,7 +402,7 @@ Returns:
 
 * `errorCode` Integer
 * `errorDescription` String
-* `validatedUrl` String
+* `validatedURL` String
 
 This event is like `did-finish-load`, but fired when the load failed or was
 cancelled, e.g. `window.stop()` is invoked.
@@ -428,8 +428,8 @@ Corresponds to the points in time when the spinner of the tab stops spinning.
 Returns:
 
 * `status` Boolean
-* `newUrl` String
-* `originalUrl` String
+* `newURL` String
+* `originalURL` String
 * `httpResponseCode` Integer
 * `requestMethod` String
 * `referrer` String
@@ -442,8 +442,8 @@ Fired when details regarding a requested resource is available.
 
 Returns:
 
-* `oldUrl` String
-* `newUrl` String
+* `oldURL` String
+* `newURL` String
 * `isMainFrame` Boolean
 
 Fired when a redirect was received while requesting a resource.
@@ -466,7 +466,7 @@ url.
 
 Returns:
 
-* `favicons` Array - Array of Urls.
+* `favicons` Array - Array of URLs.
 
 Fired when page receives favicon urls.
 
index 7c1ea77..45973e4 100644 (file)
@@ -73,7 +73,7 @@ You can also display a web page in an `asar` archive with `BrowserWindow`:
 ```javascript
 const BrowserWindow = require('electron').BrowserWindow;
 var win = new BrowserWindow({width: 800, height: 600});
-win.loadUrl('file:///path/to/example.asar/static/index.html');
+win.loadURL('file:///path/to/example.asar/static/index.html');
 ```
 
 ### Web API
index 6e03128..d143118 100644 (file)
@@ -13,7 +13,7 @@ const BrowserWindow = electron.BrowserWindow;
 var onlineStatusWindow;
 app.on('ready', function() {
   onlineStatusWindow = new BrowserWindow({ width: 0, height: 0, show: false });
-  onlineStatusWindow.loadUrl('file://' + __dirname + '/online-status.html');
+  onlineStatusWindow.loadURL('file://' + __dirname + '/online-status.html');
 });
 ```
 
@@ -54,7 +54,7 @@ const BrowserWindow = electron.BrowserWindow;
 var onlineStatusWindow;
 app.on('ready', function() {
   onlineStatusWindow = new BrowserWindow({ width: 0, height: 0, show: false });
-  onlineStatusWindow.loadUrl('file://' + __dirname + '/online-status.html');
+  onlineStatusWindow.loadURL('file://' + __dirname + '/online-status.html');
 });
 
 ipcMain.on('online-status-changed', function(event, status) {
index 7c55340..4c61413 100644 (file)
@@ -105,7 +105,7 @@ app.on('ready', function() {
   mainWindow = new BrowserWindow({width: 800, height: 600});
 
   // and load the index.html of the app.
-  mainWindow.loadUrl('file://' + __dirname + '/index.html');
+  mainWindow.loadURL('file://' + __dirname + '/index.html');
 
   // Open the DevTools.
   mainWindow.webContents.openDevTools();
index 4cbbb51..a9918b2 100644 (file)
@@ -36,7 +36,7 @@ app.on('ready', function() {
       'plugins': true
     }
   });
-  mainWindow.loadUrl('file://' + __dirname + '/index.html');
+  mainWindow.loadURL('file://' + __dirname + '/index.html');
   // Something else
 });
 ```
index 055cd8e..00437ae 100644 (file)
@@ -31,14 +31,14 @@ describe 'browser-window module', ->
         fs.unlinkSync(test)
         assert.equal String(content), 'unload'
         done()
-      w.loadUrl 'file://' + path.join(fixtures, 'api', 'unload.html')
+      w.loadURL 'file://' + path.join(fixtures, 'api', 'unload.html')
 
     it 'should emit beforeunload handler', (done) ->
       w.on 'onbeforeunload', ->
         done()
       w.webContents.on 'did-finish-load', ->
         w.close()
-      w.loadUrl 'file://' + path.join(fixtures, 'api', 'beforeunload-false.html')
+      w.loadURL 'file://' + path.join(fixtures, 'api', 'beforeunload-false.html')
 
   describe 'window.close()', ->
     it 'should emit unload handler', (done) ->
@@ -48,23 +48,23 @@ describe 'browser-window module', ->
         fs.unlinkSync(test)
         assert.equal String(content), 'close'
         done()
-      w.loadUrl 'file://' + path.join(fixtures, 'api', 'close.html')
+      w.loadURL 'file://' + path.join(fixtures, 'api', 'close.html')
 
     it 'should emit beforeunload handler', (done) ->
       w.on 'onbeforeunload', ->
         done()
-      w.loadUrl 'file://' + path.join(fixtures, 'api', 'close-beforeunload-false.html')
+      w.loadURL 'file://' + path.join(fixtures, 'api', 'close-beforeunload-false.html')
 
-  describe 'BrowserWindow.loadUrl(url)', ->
+  describe 'BrowserWindow.loadURL(url)', ->
     it 'should emit did-start-loading event', (done) ->
       w.webContents.on 'did-start-loading', ->
         done()
-      w.loadUrl 'about:blank'
+      w.loadURL 'about:blank'
 
     it 'should emit did-fail-load event', (done) ->
       w.webContents.on 'did-fail-load', ->
         done()
-      w.loadUrl 'file://a.txt'
+      w.loadURL 'file://a.txt'
 
   describe 'BrowserWindow.show()', ->
     it 'should focus on window', ->
@@ -214,7 +214,7 @@ describe 'browser-window module', ->
           show: false
           webPreferences:
             preload: preload
-        w.loadUrl 'file://' + path.join(fixtures, 'api', 'preload.html')
+        w.loadURL 'file://' + path.join(fixtures, 'api', 'preload.html')
 
     describe '"node-integration" option', ->
       it 'disables node integration when specified to false', (done) ->
@@ -228,28 +228,28 @@ describe 'browser-window module', ->
           webPreferences:
             preload: preload
             nodeIntegration: false
-        w.loadUrl 'file://' + path.join(fixtures, 'api', 'blank.html')
+        w.loadURL 'file://' + path.join(fixtures, 'api', 'blank.html')
 
   describe 'beforeunload handler', ->
     it 'returning true would not prevent close', (done) ->
       w.on 'closed', ->
         done()
-      w.loadUrl 'file://' + path.join(fixtures, 'api', 'close-beforeunload-true.html')
+      w.loadURL 'file://' + path.join(fixtures, 'api', 'close-beforeunload-true.html')
 
     it 'returning non-empty string would not prevent close', (done) ->
       w.on 'closed', ->
         done()
-      w.loadUrl 'file://' + path.join(fixtures, 'api', 'close-beforeunload-string.html')
+      w.loadURL 'file://' + path.join(fixtures, 'api', 'close-beforeunload-string.html')
 
     it 'returning false would prevent close', (done) ->
       w.on 'onbeforeunload', ->
         done()
-      w.loadUrl 'file://' + path.join(fixtures, 'api', 'close-beforeunload-false.html')
+      w.loadURL 'file://' + path.join(fixtures, 'api', 'close-beforeunload-false.html')
 
     it 'returning empty string would prevent close', (done) ->
       w.on 'onbeforeunload', ->
         done()
-      w.loadUrl 'file://' + path.join(fixtures, 'api', 'close-beforeunload-empty-string.html')
+      w.loadURL 'file://' + path.join(fixtures, 'api', 'close-beforeunload-empty-string.html')
 
   describe 'new-window event', ->
     return if isCI and process.platform is 'darwin'
@@ -259,7 +259,7 @@ describe 'browser-window module', ->
         assert.equal url, 'http://host/'
         assert.equal frameName, 'host'
         done()
-      w.loadUrl "file://#{fixtures}/pages/window-open.html"
+      w.loadURL "file://#{fixtures}/pages/window-open.html"
 
     it 'emits when link with target is called', (done) ->
       w.webContents.once 'new-window', (e, url, frameName) ->
@@ -267,7 +267,7 @@ describe 'browser-window module', ->
         assert.equal url, 'http://host/'
         assert.equal frameName, 'target'
         done()
-      w.loadUrl "file://#{fixtures}/pages/target-name.html"
+      w.loadURL "file://#{fixtures}/pages/target-name.html"
 
   describe 'maximize event', ->
     return if isCI
@@ -296,7 +296,7 @@ describe 'browser-window module', ->
 
   xdescribe 'beginFrameSubscription method', ->
     it 'subscribes frame updates', (done) ->
-      w.loadUrl "file://#{fixtures}/api/blank.html"
+      w.loadURL "file://#{fixtures}/api/blank.html"
       w.webContents.beginFrameSubscription (data) ->
         assert.notEqual data.length, 0
         w.webContents.endFrameSubscription()
@@ -321,4 +321,4 @@ describe 'browser-window module', ->
           fs.rmdirSync savePageDir
           done()
 
-      w.loadUrl "file://#{fixtures}/pages/save_page/index.html"
+      w.loadURL "file://#{fixtures}/pages/save_page/index.html"
index b02eb85..19da3fc 100644 (file)
@@ -11,7 +11,7 @@ describe 'clipboard module', ->
       p = path.join fixtures, 'assets', 'logo.png'
       i = nativeImage.createFromPath p
       clipboard.writeImage p
-      assert.equal clipboard.readImage().toDataUrl(), i.toDataUrl()
+      assert.equal clipboard.readImage().toDataURL(), i.toDataURL()
 
   describe 'clipboard.readText()', ->
     it 'returns unicode string correctly', ->
@@ -49,4 +49,4 @@ describe 'clipboard module', ->
       clipboard.write {text: "test", html: '<b>Hi</b>', image: p}
       assert.equal clipboard.readText(), text
       assert.equal clipboard.readHtml(), markup
-      assert.equal clipboard.readImage().toDataUrl(), i.toDataUrl()
+      assert.equal clipboard.readImage().toDataURL(), i.toDataURL()
index 281a1a7..676dbf9 100644 (file)
@@ -55,5 +55,5 @@ describe 'crash-reporter module', ->
         pathname: path.join fixtures, 'api', 'crash.html'
         search: "?port=#{port}"
       if process.platform is 'darwin'
-        crashReporter.start {'submitUrl': 'http://127.0.0.1:' + port}
-      w.loadUrl url
+        crashReporter.start {'submitURL': 'http://127.0.0.1:' + port}
+      w.loadURL url
index 1e6ee8f..a8d2a65 100644 (file)
@@ -86,7 +86,7 @@ describe 'ipc module', ->
         event.returnValue = null
         w.destroy()
         done()
-      w.loadUrl 'file://' + path.join(fixtures, 'api', 'send-sync-message.html')
+      w.loadURL 'file://' + path.join(fixtures, 'api', 'send-sync-message.html')
 
   describe 'remote listeners', ->
     it 'can be added and removed correctly', ->
index f544dff..bf91bdd 100644 (file)
@@ -23,7 +23,7 @@ describe 'session module', ->
 
     server.listen 0, '127.0.0.1', ->
       {port} = server.address()
-      w.loadUrl "#{url}:#{port}"
+      w.loadURL "#{url}:#{port}"
       w.webContents.on 'did-finish-load', ->
         w.webContents.session.cookies.get {url: url}, (error, list) ->
           return done(error) if error
@@ -64,7 +64,7 @@ describe 'session module', ->
         ipcMain.removeAllListeners 'count'
         assert not count
         done()
-      w.loadUrl 'file://' + path.join(fixtures, 'api', 'localstorage.html')
+      w.loadURL 'file://' + path.join(fixtures, 'api', 'localstorage.html')
       w.webContents.on 'did-finish-load', ->
         options =
           origin: "file://",
@@ -91,7 +91,7 @@ describe 'session module', ->
       downloadServer.listen 0, '127.0.0.1', ->
         {port} = downloadServer.address()
         ipcRenderer.sendSync 'set-download-option', false
-        w.loadUrl "#{url}:#{port}"
+        w.loadURL "#{url}:#{port}"
         ipcRenderer.once 'download-done', (event, state, url, mimeType, receivedBytes, totalBytes, disposition, filename) ->
           assert.equal state, 'completed'
           assert.equal filename, 'mock.pdf'
@@ -108,7 +108,7 @@ describe 'session module', ->
       downloadServer.listen 0, '127.0.0.1', ->
         {port} = downloadServer.address()
         ipcRenderer.sendSync 'set-download-option', true
-        w.loadUrl "#{url}:#{port}/"
+        w.loadURL "#{url}:#{port}/"
         ipcRenderer.once 'download-done', (event, state, url, mimeType, receivedBytes, totalBytes, disposition, filename) ->
           assert.equal state, 'cancelled'
           assert.equal filename, 'mock.pdf'
index f84fb05..ad480a5 100644 (file)
@@ -453,7 +453,7 @@ describe 'asar package', ->
       ipcMain.once 'dirname', (event, dirname) ->
         assert.equal dirname, path.dirname(p)
         done()
-      w.loadUrl u
+      w.loadURL u
 
     it 'loads script tag in html', (done) ->
       after ->
@@ -463,7 +463,7 @@ describe 'asar package', ->
       w = new BrowserWindow(show: false, width: 400, height: 400)
       p = path.resolve fixtures, 'asar', 'script.asar', 'index.html'
       u = url.format protocol: 'file', slashed: true, pathname: p
-      w.loadUrl u
+      w.loadURL u
       ipcMain.once 'ping', (event, message) ->
         assert.equal message, 'pong'
         done()
index ebd7b36..435f7bb 100644 (file)
@@ -43,7 +43,7 @@ describe 'chromium feature', ->
       w.webContents.on 'ipc-message', (event, args) ->
         assert.deepEqual args, ['hidden', true]
         done()
-      w.loadUrl url
+      w.loadURL url
 
   describe 'navigator.webkitGetUserMedia', ->
     it 'calls its callbacks', (done) ->
@@ -96,7 +96,7 @@ describe 'chromium feature', ->
       w.webContents.on 'ipc-message', (event, args) ->
         assert.deepEqual args, ['opener', null]
         done()
-      w.loadUrl url
+      w.loadURL url
 
     it 'is not null for window opened by window.open', (done) ->
       listener = (event) ->
index 3049484..c1fb621 100644 (file)
@@ -6,7 +6,7 @@ var crashReporter = require('electron').crashReporter;
 crashReporter.start({
   productName: 'Zombies',
   companyName: 'Umbrella Corporation',
-  submitUrl: 'http://127.0.0.1:' + port,
+  submitURL: 'http://127.0.0.1:' + port,
   autoSubmit: true,
   ignoreSystemCrashHandler: true,
   extra: {
index e071474..be3690c 100644 (file)
@@ -67,7 +67,7 @@ app.on('ready', function() {
       javascript: true  // Test whether web-preferences crashes.
     },
   });
-  window.loadUrl('file://' + __dirname + '/index.html');
+  window.loadURL('file://' + __dirname + '/index.html');
   window.on('unresponsive', function() {
     var chosen = dialog.showMessageBox(window, {
       type: 'warning',
@@ -88,7 +88,7 @@ app.on('ready', function() {
           item.on('done', function(e, state) {
             window.webContents.send('download-done',
                                     state,
-                                    item.getUrl(),
+                                    item.getURL(),
                                     item.getMimeType(),
                                     item.getReceivedBytes(),
                                     item.getTotalBytes(),