This commit is contained in:
Pascal Borreli 2014-05-07 07:34:53 +01:00
Родитель c12ba5d221
Коммит 831c7f5924
9 изменённых файлов: 21 добавлений и 21 удалений

Просмотреть файл

@ -33,7 +33,7 @@ BrowserWindow::_init = ->
id = BrowserWindow.windows.add this id = BrowserWindow.windows.add this
# Remove the window from weak map immediately when it's destroyed, since we # Remove the window from weak map immediately when it's destroyed, since we
# could be iterating windows before GC happended. # could be iterating windows before GC happened.
@once 'closed', -> @once 'closed', ->
BrowserWindow.windows.remove id if BrowserWindow.windows.has id BrowserWindow.windows.remove id if BrowserWindow.windows.has id

Просмотреть файл

@ -11,7 +11,7 @@
#include "ipc/ipc_message_macros.h" #include "ipc/ipc_message_macros.h"
// The message starter should be declared in ipc/ipc_message_start.h. Since // The message starter should be declared in ipc/ipc_message_start.h. Since
// we don't wan't to patch Chromium, we just pretend to be Content Shell. // we don't want to patch Chromium, we just pretend to be Content Shell.
#define IPC_MESSAGE_START ShellMsgStart #define IPC_MESSAGE_START ShellMsgStart

Просмотреть файл

@ -23,7 +23,7 @@ Under most cases you should just do everything in `ready` event.
## Event: ready ## Event: ready
Emitted when atom-shell has done everything initializaiton. Emitted when atom-shell has done everything initialization.
## Event: window-all-closed ## Event: window-all-closed

Просмотреть файл

@ -68,12 +68,12 @@ An example of enable node integration in iframe with `node-integration` set to
<iframe src="http://jandan.net"></iframe> <iframe src="http://jandan.net"></iframe>
``` ```
And in atom-shell, the security limitaion of iframe is stricter than normal And in atom-shell, the security limitation of iframe is stricter than normal
browser, by default iframe is sandboxed with all permissions except the browser, by default iframe is sandboxed with all permissions except the
`allow-same-origin`, which means iframe could not access parent's js context. `allow-same-origin`, which means iframe could not access parent's js context.
If you want to enable things like `parent.window.process.exit()` in iframe, If you want to enable things like `parent.window.process.exit()` in iframe,
you should explictly set `sandbox` to `none`: you should explicitly set `sandbox` to `none`:
```html ```html
<iframe sandbox="none" src="https://github.com"></iframe> <iframe sandbox="none" src="https://github.com"></iframe>
@ -118,7 +118,7 @@ remove the reference to the window and avoid using it anymore.
### Event: 'unresponsive' ### Event: 'unresponsive'
Emiited when the web page becomes unresponsive. Emitted when the web page becomes unresponsive.
### Event: 'responsive' ### Event: 'responsive'
@ -126,7 +126,7 @@ Emitted when the unresponsive web page becomes responsive again.
### Event: 'blur' ### Event: 'blur'
Emiited when window loses focus. Emitted when window loses focus.
### Class Method: BrowserWindow.getAllWindows() ### Class Method: BrowserWindow.getAllWindows()
@ -155,7 +155,7 @@ Get the `WebContents` of devtools of this window.
Force closing the window, the `unload` and `beforeunload` event won't be emitted Force closing the window, the `unload` and `beforeunload` event won't be emitted
for the web page, and `close` event would also not be emitted for this window, for the web page, and `close` event would also not be emitted for this window,
but it would gurrantee the `closed` event to be emitted. but it would guarantee the `closed` event to be emitted.
You should only use this method when the web page has crashed. You should only use this method when the web page has crashed.

Просмотреть файл

@ -1,7 +1,7 @@
# protocol # protocol
The `protocol` module can register a new protocol or intercept an existing The `protocol` module can register a new protocol or intercept an existing
protocol, so you can custom the response to the requests for vairous protocols. protocol, so you can custom the response to the requests for various protocols.
An example of implementing a protocol that has the same effect with the An example of implementing a protocol that has the same effect with the
`file://` protocol: `file://` protocol:

Просмотреть файл

@ -15,7 +15,7 @@ to understand the source code better.
* **app** - System entry code. * **app** - System entry code.
* **browser** - The frontend including the main window, UI, and all browser * **browser** - The frontend including the main window, UI, and all browser
side things. This talks to the renderer to manage web pages. side things. This talks to the renderer to manage web pages.
* **lib** - Javascript part of browser sidde initialization code. * **lib** - Javascript part of browser side initialization code.
* **ui** - Implementation of UI stuff for different platforms. * **ui** - Implementation of UI stuff for different platforms.
* **cocoa** - Cocoa specific source code. * **cocoa** - Cocoa specific source code.
* **gtk** - GTK+ specific source code. * **gtk** - GTK+ specific source code.

Просмотреть файл

@ -15,7 +15,7 @@ $ apm install .
But you should notice that `apm install module` won't work because it will But you should notice that `apm install module` won't work because it will
install a user package for [Atom Editor](https://github.com/atom/atom) instead. install a user package for [Atom Editor](https://github.com/atom/atom) instead.
## Native Node module compability ## Native Node module compatibility
Since Node v0.11.x there were vital changes in the V8 API. So generally all native Since Node v0.11.x there were vital changes in the V8 API. So generally all native
modules written for Node v0.10.x wouldn't work for Node v0.11.x. Additionally modules written for Node v0.10.x wouldn't work for Node v0.11.x. Additionally

Просмотреть файл

@ -12,7 +12,7 @@ from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \
safe_mkdir, execute safe_mkdir, execute
ATOM_SHELL_VRESION = get_atom_shell_version() ATOM_SHELL_VERSION = get_atom_shell_version()
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist') DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
@ -160,7 +160,7 @@ def copy_license():
def create_version(): def create_version():
version_path = os.path.join(SOURCE_ROOT, 'dist', 'version') version_path = os.path.join(SOURCE_ROOT, 'dist', 'version')
with open(version_path, 'w') as version_file: with open(version_path, 'w') as version_file:
version_file.write(ATOM_SHELL_VRESION) version_file.write(ATOM_SHELL_VERSION)
def download_libchromiumcontent_symbols(url): def download_libchromiumcontent_symbols(url):
@ -188,7 +188,7 @@ def create_symbols():
def create_dist_zip(): def create_dist_zip():
dist_name = 'atom-shell-{0}-{1}.zip'.format(ATOM_SHELL_VRESION, dist_name = 'atom-shell-{0}-{1}.zip'.format(ATOM_SHELL_VERSION,
TARGET_PLATFORM) TARGET_PLATFORM)
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name) zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
@ -199,7 +199,7 @@ def create_dist_zip():
def create_symbols_zip(): def create_symbols_zip():
dist_name = 'atom-shell-{0}-{1}-symbols.zip'.format(ATOM_SHELL_VRESION, dist_name = 'atom-shell-{0}-{1}-symbols.zip'.format(ATOM_SHELL_VERSION,
TARGET_PLATFORM) TARGET_PLATFORM)
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name) zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)

Просмотреть файл

@ -21,13 +21,13 @@ TARGET_PLATFORM = {
}[sys.platform] }[sys.platform]
ATOM_SHELL_REPO = 'atom/atom-shell' ATOM_SHELL_REPO = 'atom/atom-shell'
ATOM_SHELL_VRESION = get_atom_shell_version() ATOM_SHELL_VERSION = get_atom_shell_version()
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'Release') OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'Release')
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist') DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
DIST_NAME = 'atom-shell-{0}-{1}.zip'.format(ATOM_SHELL_VRESION, TARGET_PLATFORM) DIST_NAME = 'atom-shell-{0}-{1}.zip'.format(ATOM_SHELL_VERSION, TARGET_PLATFORM)
SYMBOLS_NAME = 'atom-shell-{0}-{1}-symbols.zip'.format(ATOM_SHELL_VRESION, SYMBOLS_NAME = 'atom-shell-{0}-{1}-symbols.zip'.format(ATOM_SHELL_VERSION,
TARGET_PLATFORM) TARGET_PLATFORM)
@ -39,9 +39,9 @@ def main():
execute([sys.executable, create_dist]) execute([sys.executable, create_dist])
build_version = get_atom_shell_build_version() build_version = get_atom_shell_build_version()
if not ATOM_SHELL_VRESION.startswith(build_version): if not ATOM_SHELL_VERSION.startswith(build_version):
error = 'Tag name ({0}) should match build version ({1})\n'.format( error = 'Tag name ({0}) should match build version ({1})\n'.format(
ATOM_SHELL_VRESION, build_version) ATOM_SHELL_VERSION, build_version)
sys.stderr.write(error) sys.stderr.write(error)
sys.stderr.flush() sys.stderr.flush()
return 1 return 1
@ -62,7 +62,7 @@ def main():
def parse_args(): def parse_args():
parser = argparse.ArgumentParser(description='upload distribution file') parser = argparse.ArgumentParser(description='upload distribution file')
parser.add_argument('-v', '--version', help='Specify the version', parser.add_argument('-v', '--version', help='Specify the version',
default=ATOM_SHELL_VRESION) default=ATOM_SHELL_VERSION)
parser.add_argument('-p', '--publish-release', parser.add_argument('-p', '--publish-release',
help='Publish the release', help='Publish the release',
action='store_true') action='store_true')