Skip to content

Commit 699e965

Browse files
committed
nwjs master
1 parent b169b9a commit 699e965

File tree

645 files changed

+8997
-1816
lines changed

Some content is hidden

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

645 files changed

+8997
-1816
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,3 +504,5 @@ vs-chromium-project.txt
504504
/win8/metro_driver/metro_driver_version_resources.xml
505505
/x86-generic_out/
506506
/xcodebuild
507+
/content/nw
508+

.gn

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

BUILD.gn

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

220220
if (!is_ios && !is_android && !is_chromecast) {
221221
deps += [
222+
"//content/nw:nwjs",
222223
"//chrome",
223224
"//chrome/test:browser_tests",
224225
"//chrome/test:interactive_ui_tests",

DEPS

Lines changed: 20 additions & 2 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
'038a2399b20e67ab17685e23ee873a66811fa107',
2022
'libfuzzer_revision':
@@ -177,8 +179,13 @@ deps = {
177179
(Var("chromium_git")) + '/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521',
178180
'src/tools/swarming_client':
179181
(Var("chromium_git")) + '/external/swarming.client.git@ebc8dab6f8b8d79ec221c94de39a921145abd404',
180-
'src/v8':
181-
(Var("chromium_git")) + '/v8/v8.git@d2f8b8429adbc4ddf887fb7e69d89143df07bf08'
182+
#'src/v8':
183+
# (Var("chromium_git")) + '/v8/v8.git@d2f8b8429adbc4ddf887fb7e69d89143df07bf08'
184+
# (Var("nwjs_git")) + '/v8.git@origin/nw16',
185+
#'src/content/nw':
186+
# (Var("nwjs_git")) + '/nw.js.git@origin/nw16',
187+
#'src/third_party/node':
188+
# (Var("nwjs_git")) + '/node.git@origin/nw16',
182189
}
183190

184191
deps_os = {
@@ -1023,6 +1030,17 @@ hooks = [
10231030
'name':
10241031
'wasm_asmjs_fuzzer'
10251032
},
1033+
{
1034+
'action': [
1035+
'python',
1036+
'src/content/nw/tools/patcher.py',
1037+
'--patch-config', 'src/content/nw/patch/patch.cfg'
1038+
],
1039+
'pattern':
1040+
'.',
1041+
'name':
1042+
'nw_patch'
1043+
},
10261044
{
10271045
'action': [
10281046
'python',

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
@@ -530,6 +530,8 @@ component("base") {
530530
"message_loop/message_pump_libevent.h",
531531
"message_loop/message_pump_mac.h",
532532
"message_loop/message_pump_mac.mm",
533+
"message_loop/message_pump_uv.cc",
534+
"message_loop/message_pump_uv.h",
533535
"message_loop/message_pump_win.cc",
534536
"message_loop/message_pump_win.h",
535537
"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)