Merge remote-tracking branch 'refs/remotes/atom/master'

This commit is contained in:
Plusb Preco 2015-11-20 04:46:07 +09:00
commit 80dfa4bf09
14 changed files with 43 additions and 25 deletions

View file

@ -161,6 +161,7 @@ void Tray::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
.SetMethod("destroy", &Tray::Destroy, true)
.SetMethod("isDestroyed", &Tray::IsDestroyed, true)
.SetMethod("setImage", &Tray::SetImage)
.SetMethod("setPressedImage", &Tray::SetPressedImage)
.SetMethod("setToolTip", &Tray::SetToolTip)

View file

@ -604,10 +604,6 @@ void WebContents::Destroy() {
}
}
bool WebContents::IsAlive() const {
return web_contents() != NULL;
}
int WebContents::GetID() const {
return web_contents()->GetRenderProcessHost()->GetID();
}
@ -996,7 +992,7 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder(
if (template_.IsEmpty())
template_.Reset(isolate, mate::ObjectTemplateBuilder(isolate)
.SetMethod("destroy", &WebContents::Destroy, true)
.SetMethod("isAlive", &WebContents::IsAlive, true)
.SetMethod("isDestroyed", &WebContents::IsDestroyed, true)
.SetMethod("getId", &WebContents::GetID)
.SetMethod("equal", &WebContents::Equal)
.SetMethod("_loadURL", &WebContents::LoadURL)
@ -1066,7 +1062,7 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder(
}
bool WebContents::IsDestroyed() const {
return !IsAlive();
return !web_contents();
}
AtomBrowserContext* WebContents::GetBrowserContext() const {

View file

@ -57,7 +57,6 @@ class WebContents : public mate::TrackableObject<WebContents>,
// mate::TrackableObject:
void Destroy() override;
bool IsAlive() const;
int GetID() const;
bool Equal(const WebContents* web_contents) const;
void LoadURL(const GURL& url, const mate::Dictionary& options);

View file

@ -284,10 +284,6 @@ void Window::Close() {
window_->Close();
}
bool Window::IsClosed() {
return window_->IsClosed();
}
void Window::Focus() {
window_->Focus(true);
}
@ -622,8 +618,8 @@ void Window::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> prototype) {
mate::ObjectTemplateBuilder(isolate, prototype)
.SetMethod("destroy", &Window::Destroy, true)
.SetMethod("isDestroyed", &Window::IsDestroyed, true)
.SetMethod("close", &Window::Close)
.SetMethod("isClosed", &Window::IsClosed)
.SetMethod("focus", &Window::Focus)
.SetMethod("isFocused", &Window::IsFocused)
.SetMethod("show", &Window::Show)

View file

@ -89,7 +89,6 @@ class Window : public mate::TrackableObject<Window>,
// APIs for NativeWindow.
void Close();
bool IsClosed();
void Focus();
bool IsFocused();
void Show();

View file

@ -0,0 +1,3 @@
# チュートリアル
* [クイックスタート](tutorial/quick-start.md)

View file

@ -86,8 +86,12 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
is `true`.
* `preload` String - Specifies a script that will be loaded before other
scripts run in the page. This script will always have access to node APIs
no matter whether node integration is turned on for the page, and the path
of `preload` script has to be absolute path.
no matter whether node integration is turned on or off. The value should
be the absolute file path to the script.
When node integration is turned off, the preload script can reintroduce
Node global symbols back to the global scope. See example
[here](process.md#event-loaded).
* `partition` String - Sets the session used by the page. If `partition`
starts with `persist:`, the page will use a persistent session available to
all pages in the app with the same `partition`. if there is no `persist:`

View file

@ -37,11 +37,10 @@ send arbitrary arguments. The main process handles it by listening for the
* `arg` (optional)
Send an event to the main process synchronously via a `channel`, you can also
send arbitrary arguments. The main process handles it by listening for the
`channel` event with `ipcMain`.
send arbitrary arguments.
The main process handles it by listening for the `channel` event with `ipc` and
replies by setting the `event.returnValue`.
The main process handles it by listening for the `channel` event with
`ipcMain` and replies by setting `event.returnValue`.
__Note:__ Sending a synchronous message will block the whole renderer process,
unless you know what you are doing you should never use it.

View file

@ -262,7 +262,7 @@ Injects CSS into the guest page.
* `code` String
* `userGesture` Boolean - Default `false`.
Evaluates `code` in page. If `userGesture` is set, it will the create user
Evaluates `code` in page. If `userGesture` is set, it will create the user
gesture context in the page. HTML APIs like `requestFullScreen`, which require
user action, can take advantage of this option for automation.

View file

@ -7,7 +7,7 @@ limitations of the MAS build.
## How to Submit Your App
The following steps introduce a simple way to submit your app to Mac App Store.
However, these steps do not ensure sure your app will be approved by Apple; you
However, these steps do not ensure your app will be approved by Apple; you
still need to read Apple's [Submitting Your App][submitting-your-app] guide on
how to meet the Mac App Store requirements.

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python
import glob
import os
import re
import shutil
@ -168,6 +169,11 @@ def create_symbols():
dump_symbols = os.path.join(SOURCE_ROOT, 'script', 'dump-symbols.py')
execute([sys.executable, dump_symbols, destination])
if PLATFORM == 'darwin':
dsyms = glob.glob(os.path.join(OUT_DIR, '*.dSYM'))
for dsym in dsyms:
shutil.copytree(dsym, os.path.join(DIST_DIR, os.path.basename(dsym)))
def create_dist_zip():
dist_name = '{0}-{1}-{2}-{3}.zip'.format(PROJECT_NAME, ATOM_SHELL_VERSION,
@ -203,12 +209,21 @@ def create_symbols_zip():
ATOM_SHELL_VERSION,
get_platform_key(),
get_target_arch())
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
zip_file = os.path.join(DIST_DIR, dist_name)
licenses = ['LICENSE', 'LICENSES.chromium.html', 'version']
with scoped_cwd(DIST_DIR):
files = ['LICENSE', 'LICENSES.chromium.html', 'version']
dirs = ['{0}.breakpad.syms'.format(PROJECT_NAME)]
make_zip(zip_file, files, dirs)
make_zip(zip_file, licenses, dirs)
if PLATFORM == 'darwin':
dsym_name = '{0}-{1}-{2}-{3}-dsym.zip'.format(PROJECT_NAME,
ATOM_SHELL_VERSION,
get_platform_key(),
get_target_arch())
with scoped_cwd(DIST_DIR):
dsyms = glob.glob('*.dSYM')
make_zip(os.path.join(DIST_DIR, dsym_name), licenses, dsyms)
if __name__ == '__main__':

View file

@ -8,7 +8,7 @@ import sys
BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \
'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '464aff2398f619b1d4d91b9187de69803919dca2'
LIBCHROMIUMCONTENT_COMMIT = '17a4337f7948a45b5ea4b8f391df152ba8db5979'
PLATFORM = {
'cygwin': 'win32',

View file

@ -31,6 +31,10 @@ SYMBOLS_NAME = '{0}-{1}-{2}-{3}-symbols.zip'.format(PROJECT_NAME,
ATOM_SHELL_VERSION,
get_platform_key(),
get_target_arch())
DSYM_NAME = '{0}-{1}-{2}-{3}-dsym.zip'.format(PROJECT_NAME,
ATOM_SHELL_VERSION,
get_platform_key(),
get_target_arch())
MKSNAPSHOT_NAME = 'mksnapshot-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
get_platform_key(),
get_target_arch())
@ -82,6 +86,8 @@ def main():
# Upload atom-shell with GitHub Releases API.
upload_atom_shell(github, release, os.path.join(DIST_DIR, DIST_NAME))
upload_atom_shell(github, release, os.path.join(DIST_DIR, SYMBOLS_NAME))
if PLATFORM == 'darwin':
upload_atom_shell(github, release, os.path.join(DIST_DIR, DSYM_NAME))
# Upload chromedriver and mksnapshot for minor version update.
if parse_version(args.version)[2] == '0':