Mark atom-shell version as deprecated
This commit is contained in:
parent
d4b204799d
commit
1072519488
6 changed files with 16 additions and 5 deletions
|
@ -117,7 +117,7 @@ void AtomBrowserMainParts::PostEarlyInitialization() {
|
||||||
if (node_debugger_->IsRunning())
|
if (node_debugger_->IsRunning())
|
||||||
env->AssignToContext(v8::Debug::GetDebugContext());
|
env->AssignToContext(v8::Debug::GetDebugContext());
|
||||||
|
|
||||||
// Add atom-shell extended APIs.
|
// Add Electron extended APIs.
|
||||||
atom_bindings_->BindTo(js_env_->isolate(), env->process_object());
|
atom_bindings_->BindTo(js_env_->isolate(), env->process_object());
|
||||||
|
|
||||||
// Load everything.
|
// Load everything.
|
||||||
|
|
|
@ -60,7 +60,7 @@ class Browser : public WindowListObserver {
|
||||||
// Overrides the application version.
|
// Overrides the application version.
|
||||||
void SetVersion(const std::string& version);
|
void SetVersion(const std::string& version);
|
||||||
|
|
||||||
// Returns the application's name, default is just Atom-Shell.
|
// Returns the application's name, default is just Electron.
|
||||||
std::string GetName() const;
|
std::string GetName() const;
|
||||||
|
|
||||||
// Overrides the application name.
|
// Overrides the application name.
|
||||||
|
|
|
@ -117,8 +117,10 @@ void AtomBindings::BindTo(v8::Isolate* isolate,
|
||||||
mate::Dictionary versions;
|
mate::Dictionary versions;
|
||||||
if (dict.Get("versions", &versions)) {
|
if (dict.Get("versions", &versions)) {
|
||||||
versions.Set(ATOM_PROJECT_NAME, ATOM_VERSION_STRING);
|
versions.Set(ATOM_PROJECT_NAME, ATOM_VERSION_STRING);
|
||||||
versions.Set("atom-shell", ATOM_VERSION_STRING); // For compatibility.
|
|
||||||
versions.Set("chrome", CHROME_VERSION_STRING);
|
versions.Set("chrome", CHROME_VERSION_STRING);
|
||||||
|
|
||||||
|
// TODO(kevinsawicki): Remove in 2.0
|
||||||
|
versions.Set("atom-shell", ATOM_VERSION_STRING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ class AtomBindings {
|
||||||
virtual ~AtomBindings();
|
virtual ~AtomBindings();
|
||||||
|
|
||||||
// Add process.atomBinding function, which behaves like process.binding but
|
// Add process.atomBinding function, which behaves like process.binding but
|
||||||
// load native code from atom-shell instead.
|
// load native code from Electron instead.
|
||||||
void BindTo(v8::Isolate* isolate, v8::Local<v8::Object> process);
|
void BindTo(v8::Isolate* isolate, v8::Local<v8::Object> process);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -266,7 +266,7 @@ void AtomRendererClient::DidCreateScriptContext(
|
||||||
// Setup node environment for each window.
|
// Setup node environment for each window.
|
||||||
node::Environment* env = node_bindings_->CreateEnvironment(context);
|
node::Environment* env = node_bindings_->CreateEnvironment(context);
|
||||||
|
|
||||||
// Add atom-shell extended APIs.
|
// Add Electron extended APIs.
|
||||||
atom_bindings_->BindTo(env->isolate(), env->process_object());
|
atom_bindings_->BindTo(env->isolate(), env->process_object());
|
||||||
AddRenderBindings(env->isolate(), env->process_object(),
|
AddRenderBindings(env->isolate(), env->process_object(),
|
||||||
preferences_manager_.get());
|
preferences_manager_.get());
|
||||||
|
|
|
@ -54,6 +54,15 @@ nativeImage.toJpeg()
|
||||||
nativeImage.toJPEG()
|
nativeImage.toJPEG()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `process`
|
||||||
|
|
||||||
|
```js
|
||||||
|
// Deprecated
|
||||||
|
process.versions['atom-shell']
|
||||||
|
// Replace with
|
||||||
|
process.versions.electron
|
||||||
|
```
|
||||||
|
|
||||||
## `Tray`
|
## `Tray`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue