Skip to content

Commit

Permalink
Merge pull request #3 from atom/master
Browse files Browse the repository at this point in the history
Update from original
  • Loading branch information
etiktin committed Sep 16, 2015
2 parents 090c817 + cb13d8b commit 25a2f28
Show file tree
Hide file tree
Showing 175 changed files with 2,578 additions and 1,213 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ possible with your report. If you can, please include:
* Include screenshots and animated GIFs in your pull request whenever possible.
* Follow the CoffeeScript, JavaScript, C++ and Python [coding style defined in docs](/docs/development/coding-style.md).
* Write documentation in [Markdown](https://daringfireball.net/projects/markdown).
See the [Documentation Styleguide](/docs/styleguide.md).
* Use short, present tense commit messages. See [Commit Message Styleguide](#git-commit-messages-styleguide).

## Styleguides
Expand Down
13 changes: 11 additions & 2 deletions README-ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@

### [Electron](https://github.com/atom/electron/) 한국어 참조문서

:zap: *프레임워크 이름이 Atom Shell에서 Electron으로 바뀌었습니다* :zap:
:zap: *프레임워크 이름이 Atom Shell에서 Electron으로 변경되었습니다* :zap:

Electron 프레임워크는 JavaScript, HTML 그리고 CSS를 사용하여 Cross-Platform 데스크톱 어플리케이션을 개발할 수 있도록 해주는 프레임워크입니다. 이 프레임워크는 [io.js](http://iojs.org)
[Chromium](http://www.chromium.org)을 기반으로 만들어 졌으며 [Atom Editor](https://github.com/atom/atom)에 사용되고 있습니다.

Electron에 대한 중요한 알림을 받고 싶다면 Twitter에서 [@ElectronJS](https://twitter.com/electronjs)를 팔로우 하세요.

이 프로젝트는 기여자 규약 1.2를 준수합니다. 이 프로젝트에 참여할 때 코드를 유지해야 합니다. 받아들일 수 없는 행동은 atom@github.com로 보고 하십시오.

## 다운로드

Linux, Windows, Mac용으로 미리 빌드된 Electron 바이너리와 디버그 심볼이 준비되어 있습니다. [releases](https://github.com/atom/electron/releases) 페이지에서 받아 볼 수 있습니다.
Expand All @@ -38,12 +40,19 @@ Electron을 빌드 하는 방법과 프로젝트에 기여하는 방법도 문

## 참조 문서 (번역)

- [브라질 포르투칼어](https://github.com/atom/electron/tree/master/docs-translations/pt-BR)
- [한국어](https://github.com/atom/electron/tree/master/docs-translations/ko)
- [일본어](https://github.com/atom/electron/tree/master/docs-translations/jp)
- [스페인어](https://github.com/atom/electron/tree/master/docs-translations/es)
- [중국어 간체](https://github.com/atom/electron/tree/master/docs-translations/zh-CN)
- [중국어 번체](https://github.com/atom/electron/tree/master/docs-translations/zh-TW)

## 커뮤니티

[Atom 포럼내의 `electron` 카테고리](http://discuss.atom.io/category/electron)와 Freenode `#atom-shell` 채팅 채널에서 활발하게 토론이 이어지고 있습니다.
다음 링크를 통해 커뮤니티에 질문을 올리거나 토론을 나누실 수 있습니다:

- Atom 포럼의 [`electron`](http://discuss.atom.io/category/electron) 카테고리
- Freenode 채팅의 `#atom-shell` 채널
- Slack의 [`Atom`](http://atom-slack.herokuapp.com/) 채널

[awesome-electron](https://github.com/sindresorhus/awesome-electron) 프로젝트엔 커뮤니티가 운영중인 유용한 예제 어플리케이션과 도구, 리소스가 있으니 한번 참고해 보시기 바랍니다.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![devDependency Status](https://david-dm.org/atom/electron/dev-status.svg)](https://david-dm.org/atom/electron#info=devDependencies)
[![Join the Electron Community on Slack](http://atom-slack.herokuapp.com/badge.svg)](http://atom-slack.herokuapp.com/)

:zap: *formerly known as Atom Shell* :zap:
:zap: *Formerly known as Atom Shell* :zap:

The Electron framework lets you write cross-platform desktop applications
using JavaScript, HTML and CSS. It is based on [io.js](http://iojs.org) and
Expand All @@ -15,7 +15,8 @@ Follow [@ElectronJS](https://twitter.com/electronjs) on Twitter for important
announcements.

This project adheres to the [Contributor Covenant 1.2](http://contributor-covenant.org/version/1/2/0).
By participating, you are expected to uphold this code. Please report unacceptable behavior to atom@github.com.
By participating, you are expected to uphold this code. Please report
unacceptable behavior to atom@github.com.

## Downloads

Expand Down Expand Up @@ -45,6 +46,7 @@ contains documents describing how to build and contribute to Electron.

## Documentation Translations

- [Brazilian Portuguese](https://github.com/atom/electron/tree/master/docs-translations/pt-BR)
- [Korean](https://github.com/atom/electron/tree/master/docs-translations/ko)
- [Japanese](https://github.com/atom/electron/tree/master/docs-translations/jp)
- [Spanish](https://github.com/atom/electron/tree/master/docs-translations/es)
Expand All @@ -53,7 +55,12 @@ contains documents describing how to build and contribute to Electron.

## Community

There is an [`electron` category on the Atom forums](http://discuss.atom.io/category/electron)
as well as an `#atom-shell` channel on Freenode.
You can ask questions and interact with the community in the following
locations:
- [`electron`](http://discuss.atom.io/category/electron) category on the Atom
forums
- `#atom-shell` channel on Freenode
- [`Atom`](http://atom-slack.herokuapp.com/) channel on Slack

Check out [awesome-electron](https://github.com/sindresorhus/awesome-electron) for a community maintained list of useful example apps, tools and resources.
Check out [awesome-electron](https://github.com/sindresorhus/awesome-electron)
for a community maintained list of useful example apps, tools and resources.
2 changes: 1 addition & 1 deletion atom.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'product_name%': 'Electron',
'company_name%': 'GitHub, Inc',
'company_abbr%': 'github',
'version%': '0.31.2',
'version%': '0.32.3',
},
'includes': [
'filenames.gypi',
Expand Down
8 changes: 8 additions & 0 deletions atom/app/atom_content_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
#include <string>
#include <vector>

#include "atom/common/atom_version.h"
#include "atom/common/chrome_version.h"
#include "atom/common/options_switches.h"
#include "base/command_line.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/pepper_plugin_info.h"
#include "content/public/common/user_agent.h"
#include "ppapi/shared_impl/ppapi_permissions.h"

namespace atom {
Expand Down Expand Up @@ -72,6 +74,12 @@ std::string AtomContentClient::GetProduct() const {
return "Chrome/" CHROME_VERSION_STRING;
}

std::string AtomContentClient::GetUserAgent() const {
return content::BuildUserAgentFromProduct(
"Chrome/" CHROME_VERSION_STRING " "
ATOM_PRODUCT_NAME "/" ATOM_VERSION_STRING);
}

void AtomContentClient::AddAdditionalSchemes(
std::vector<std::string>* standard_schemes,
std::vector<std::string>* savable_schemes) {
Expand Down
1 change: 1 addition & 0 deletions atom/app/atom_content_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class AtomContentClient : public brightray::ContentClient {
protected:
// content::ContentClient:
std::string GetProduct() const override;
std::string GetUserAgent() const override;
void AddAdditionalSchemes(
std::vector<std::string>* standard_schemes,
std::vector<std::string>* savable_schemes) override;
Expand Down
4 changes: 3 additions & 1 deletion atom/app/atom_main_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
#else
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
#endif // defined(DEBUG)
#endif // defined(OS_WIN)
#else // defined(OS_WIN)
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
#endif // !defined(OS_WIN)
logging::InitLogging(settings);

// Logging with pid and timestamp.
Expand Down
7 changes: 3 additions & 4 deletions atom/browser/api/atom_api_app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "atom/browser/api/atom_api_web_contents.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/node_includes.h"
#include "base/command_line.h"
#include "base/environment.h"
#include "base/files/file_path.h"
Expand All @@ -34,8 +35,6 @@
#include "base/strings/utf_string_conversions.h"
#endif

#include "atom/common/node_includes.h"

using atom::Browser;

namespace mate {
Expand Down Expand Up @@ -168,8 +167,8 @@ void App::OnOpenURL(const std::string& url) {
Emit("open-url", url);
}

void App::OnActivateWithNoOpenWindows() {
Emit("activate-with-no-open-windows");
void App::OnActivate(bool has_visible_windows) {
Emit("activate", has_visible_windows);
}

void App::OnWillFinishLaunching() {
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class App : public mate::EventEmitter,
void OnQuit() override;
void OnOpenFile(bool* prevent_default, const std::string& file_path) override;
void OnOpenURL(const std::string& url) override;
void OnActivateWithNoOpenWindows() override;
void OnActivate(bool has_visible_windows) override;
void OnWillFinishLaunching() override;
void OnFinishLaunching() override;
void OnSelectCertificate(
Expand Down
3 changes: 1 addition & 2 deletions atom/browser/api/atom_api_auto_updater.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
#include "base/time/time.h"
#include "atom/browser/auto_updater.h"
#include "atom/browser/browser.h"
#include "atom/common/node_includes.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"

#include "atom/common/node_includes.h"

namespace atom {

namespace api {
Expand Down
3 changes: 1 addition & 2 deletions atom/browser/api/atom_api_content_tracing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@

#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/node_includes.h"
#include "base/bind.h"
#include "base/files/file_util.h"
#include "content/public/browser/tracing_controller.h"
#include "native_mate/dictionary.h"

#include "atom/common/node_includes.h"

using content::TracingController;

namespace mate {
Expand Down
2 changes: 0 additions & 2 deletions atom/browser/api/atom_api_cookies.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"

#include "atom/common/node_includes.h"

using atom::api::Cookies;
using content::BrowserThread;

Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_cookies.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Cookies : public mate::Wrappable {
// Must be called on IO thread.
net::CookieStore* GetCookieStore();

scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
net::URLRequestContextGetter* request_context_getter_;

DISALLOW_COPY_AND_ASSIGN(Cookies);
};
Expand Down
7 changes: 3 additions & 4 deletions atom/browser/api/atom_api_power_monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
#include "atom/browser/api/atom_api_power_monitor.h"

#include "atom/browser/browser.h"
#include "atom/common/node_includes.h"
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_device_source.h"
#include "native_mate/dictionary.h"

#include "atom/common/node_includes.h"

namespace atom {

namespace api {
Expand Down Expand Up @@ -41,9 +40,9 @@ void PowerMonitor::OnResume() {
// static
v8::Local<v8::Value> PowerMonitor::Create(v8::Isolate* isolate) {
if (!Browser::Get()->is_ready()) {
node::ThrowError(
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate,
"Cannot initialize \"power-monitor\" module before app is ready");
"Cannot initialize \"power-monitor\" module before app is ready")));
return v8::Null(isolate);
}

Expand Down
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_power_save_blocker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

#include <string>

#include "atom/common/node_includes.h"
#include "content/public/browser/power_save_blocker.h"
#include "native_mate/dictionary.h"
#include "atom/common/node_includes.h"

namespace mate {

Expand Down
3 changes: 1 addition & 2 deletions atom/browser/api/atom_api_protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
#include "atom/browser/net/url_request_fetch_job.h"
#include "atom/browser/net/url_request_string_job.h"
#include "atom/common/native_mate_converters/callback.h"
#include "native_mate/dictionary.h"

#include "atom/common/node_includes.h"
#include "native_mate/dictionary.h"

using content::BrowserThread;

Expand Down
6 changes: 3 additions & 3 deletions atom/browser/api/atom_api_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Protocol : public mate::Wrappable {
public:
CustomProtocolHandler(
v8::Isolate* isolate,
scoped_refptr<net::URLRequestContextGetter> request_context,
net::URLRequestContextGetter* request_context,
const Handler& handler)
: isolate_(isolate),
request_context_(request_context),
Expand All @@ -83,7 +83,7 @@ class Protocol : public mate::Wrappable {

private:
v8::Isolate* isolate_;
scoped_refptr<net::URLRequestContextGetter> request_context_;
net::URLRequestContextGetter* request_context_;
Protocol::Handler handler_;

DISALLOW_COPY_AND_ASSIGN(CustomProtocolHandler);
Expand Down Expand Up @@ -172,7 +172,7 @@ class Protocol : public mate::Wrappable {
// Convert error code to string.
std::string ErrorCodeToString(ProtocolError error);

scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
net::URLRequestContextGetter* request_context_getter_;

// Map that stores the original protocols of schemes.
using OriginalProtocolsMap = base::ScopedPtrHashMap<
Expand Down
8 changes: 5 additions & 3 deletions atom/browser/api/atom_api_screen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,16 @@ mate::ObjectTemplateBuilder Screen::GetObjectTemplateBuilder(
// static
v8::Local<v8::Value> Screen::Create(v8::Isolate* isolate) {
if (!Browser::Get()->is_ready()) {
node::ThrowError(isolate,
"Cannot initialize \"screen\" module before app is ready");
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate,
"Cannot initialize \"screen\" module before app is ready")));
return v8::Null(isolate);
}

gfx::Screen* screen = gfx::Screen::GetNativeScreen();
if (!screen) {
node::ThrowError(isolate, "Failed to get screen information");
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate, "Failed to get screen information")));
return v8::Null(isolate);
}

Expand Down

0 comments on commit 25a2f28

Please sign in to comment.