Skip to content

Commit 00b0e65

Browse files
committed
nwjs master
1 parent 12203fa commit 00b0e65

File tree

616 files changed

+8676
-1683
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

616 files changed

+8676
-1683
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,3 +500,5 @@ vs-chromium-project.txt
500500
/win8/metro_driver/metro_driver_version_resources.xml
501501
/x86-generic_out/
502502
/xcodebuild
503+
/content/nw
504+

.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ check_targets = [
215215
# this situation much easier to create. if the build always lists the
216216
# files and passes them to a script, it will always be correct.
217217
exec_script_whitelist = [
218+
"//content/nw/BUILD.gn",
218219
"//android_webview/BUILD.gn",
219220
"//build/config/BUILD.gn",
220221
"//build/config/android/config.gni",

BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ group("both_gn_and_gyp") {
217217

218218
if (!is_ios && !is_android && !is_chromecast) {
219219
deps += [
220+
"//content/nw:nwjs",
220221
"//chrome",
221222
"//chrome/test:browser_tests",
222223
"//chrome/test:interactive_ui_tests",

DEPS

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ vars = {
1515
'https://chromium.googlesource.com',
1616
'freetype_android_revision':
1717
'c38be52bf8de3b1699d74932b849bf150265819e',
18+
'nwjs_git':
19+
'https://github.com/nwjs',
1820
'google_toolbox_for_mac_revision':
1921
'e7b41fad2e7f77abf560c79f984c60d5ec6d419c',
2022
'libfuzzer_revision':
@@ -174,8 +176,13 @@ deps = {
174176
(Var("chromium_git")) + '/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521',
175177
'src/tools/swarming_client':
176178
(Var("chromium_git")) + '/external/swarming.client.git@380e32662312eb107f06fcba6409b0409f8fef72',
177-
'src/v8':
178-
(Var("chromium_git")) + '/v8/v8.git@1ae9314d1ba4a31d1a230a6f17cc26e1ddf80e97'
179+
#'src/v8':
180+
# (Var("chromium_git")) + '/v8/v8.git@1ae9314d1ba4a31d1a230a6f17cc26e1ddf80e97'
181+
# (Var("nwjs_git")) + '/v8.git@origin/nw16',
182+
#'src/content/nw':
183+
# (Var("nwjs_git")) + '/nw.js.git@origin/nw16',
184+
#'src/third_party/node':
185+
# (Var("nwjs_git")) + '/node.git@origin/nw16',
179186
}
180187

181188
deps_os = {
@@ -981,7 +988,18 @@ hooks = [
981988
'.',
982989
'name':
983990
'clang_format_merge_driver'
984-
}
991+
},
992+
{
993+
'action': [
994+
'python',
995+
'src/content/nw/tools/patcher.py',
996+
'--patch-config', 'src/content/nw/patch/patch.cfg'
997+
],
998+
'pattern':
999+
'.',
1000+
'name':
1001+
'nw_patch'
1002+
},
9851003
]
9861004

9871005
include_rules = [

apps/app_lifetime_monitor.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ void AppLifetimeMonitor::OnAppWindowRemoved(AppWindow* app_window) {
8686
}
8787

8888
void AppLifetimeMonitor::OnAppWindowHidden(AppWindow* app_window) {
89+
#if 0
8990
if (!HasOtherVisibleAppWindows(app_window))
9091
NotifyAppDeactivated(app_window->extension_id());
92+
#endif
9193
}
9294

9395
void AppLifetimeMonitor::OnAppWindowShown(AppWindow* app_window,

apps/app_load_service.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
#include "apps/app_load_service.h"
66

7+
#include "content/nw/src/nw_content.h"
8+
79
#include "apps/app_load_service_factory.h"
810
#include "apps/app_restore_service.h"
911
#include "apps/launcher.h"
@@ -70,6 +72,8 @@ bool AppLoadService::LoadAndLaunch(const base::FilePath& extension_path,
7072
return false;
7173
}
7274

75+
nw::SetMainExtensionId(extension_id);
76+
7377
// Schedule the app to be launched once loaded.
7478
PostReloadAction& action = post_reload_actions_[extension_id];
7579
action.action_type = LAUNCH_FOR_LOAD_AND_LAUNCH;

apps/launcher.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ class PlatformAppPathLauncher
103103
extension_id(app->id()),
104104
entry_paths_(entry_paths),
105105
mime_type_collector_(profile),
106-
is_directory_collector_(profile) {}
106+
is_directory_collector_(profile) {
107+
if (app->is_nwjs_app()) //NWJS#5097
108+
entry_paths_.clear();
109+
}
107110

108111
PlatformAppPathLauncher(Profile* profile,
109112
const Extension* app,
@@ -112,7 +115,7 @@ class PlatformAppPathLauncher
112115
extension_id(app->id()),
113116
mime_type_collector_(profile),
114117
is_directory_collector_(profile) {
115-
if (!file_path.empty())
118+
if (!file_path.empty() && !app->is_nwjs_app()) //NWJS#5097
116119
entry_paths_.push_back(file_path);
117120
}
118121

base/BUILD.gn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,8 @@ component("base") {
527527
"message_loop/message_pump_libevent.h",
528528
"message_loop/message_pump_mac.h",
529529
"message_loop/message_pump_mac.mm",
530+
"message_loop/message_pump_uv.cc",
531+
"message_loop/message_pump_uv.h",
530532
"message_loop/message_pump_win.cc",
531533
"message_loop/message_pump_win.h",
532534
"metrics/bucket_ranges.cc",

base/base_switches.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,5 @@ const char kEnableCrashReporterForTesting[] =
111111
"enable-crash-reporter-for-testing";
112112
#endif
113113

114+
const char kNWJS[] = "nwjs";
114115
} // namespace switches

base/base_switches.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ extern const char kDisableUsbKeyboardDetect[];
3939
extern const char kEnableCrashReporterForTesting[];
4040
#endif
4141

42+
extern const char kNWJS[];
4243
} // namespace switches
4344

4445
#endif // BASE_BASE_SWITCHES_H_

0 commit comments

Comments
 (0)