Skip to content

Commit 685f33c

Browse files
committed
nwjs master
1 parent 53b2efc commit 685f33c

File tree

636 files changed

+8695
-1733
lines changed

Some content is hidden

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

636 files changed

+8695
-1733
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
@@ -206,6 +206,7 @@ check_targets = [
206206
# this situation much easier to create. if the build always lists the
207207
# files and passes them to a script, it will always be correct.
208208
exec_script_whitelist = [
209+
"//content/nw/BUILD.gn",
209210
"//android_webview/BUILD.gn",
210211
"//ash/BUILD.gn",
211212
"//build/config/BUILD.gn",

BUILD.gn

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

204204
if (!is_ios && !is_android && !is_chromecast) {
205205
deps += [
206+
"//content/nw:nwjs",
206207
"//chrome",
207208
"//chrome/test:browser_tests",
208209
"//chrome/test:interactive_ui_tests",

DEPS

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ vars = {
1313
'https://chromium.googlesource.com',
1414
'freetype_android_revision':
1515
'c38be52bf8de3b1699d74932b849bf150265819e',
16+
'nwjs_git':
17+
'https://github.com/nwjs',
1618
'google_toolbox_for_mac_revision':
1719
'e7b41fad2e7f77abf560c79f984c60d5ec6d419c',
1820
'libfuzzer_revision':
@@ -168,8 +170,13 @@ deps = {
168170
(Var("chromium_git")) + '/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521',
169171
'src/tools/swarming_client':
170172
(Var("chromium_git")) + '/external/swarming.client.git@e4288c3040a32f2e7ad92f957668f2ee3d36e5a6',
171-
'src/v8':
172-
(Var("chromium_git")) + '/v8/v8.git@f8cbe2768cc88cb40e24c929fb28965bfb0ca6fe'
173+
#'src/v8':
174+
# (Var("chromium_git")) + '/v8/v8.git@f8cbe2768cc88cb40e24c929fb28965bfb0ca6fe'
175+
# (Var("nwjs_git")) + '/v8.git@origin/nw16',
176+
#'src/content/nw':
177+
# (Var("nwjs_git")) + '/nw.js.git@origin/nw16',
178+
#'src/third_party/node':
179+
# (Var("nwjs_git")) + '/node.git@origin/nw16',
173180
}
174181

175182
deps_os = {
@@ -952,7 +959,18 @@ hooks = [
952959
'.',
953960
'name':
954961
'doclava'
955-
}
962+
},
963+
{
964+
'action': [
965+
'python',
966+
'src/content/nw/tools/patcher.py',
967+
'--patch-config', 'src/content/nw/patch/patch.cfg'
968+
],
969+
'pattern':
970+
'.',
971+
'name':
972+
'nw_patch'
973+
},
956974
]
957975

958976
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
@@ -518,6 +518,8 @@ component("base") {
518518
"message_loop/message_pump_libevent.h",
519519
"message_loop/message_pump_mac.h",
520520
"message_loop/message_pump_mac.mm",
521+
"message_loop/message_pump_uv.cc",
522+
"message_loop/message_pump_uv.h",
521523
"message_loop/message_pump_win.cc",
522524
"message_loop/message_pump_win.h",
523525
"metrics/bucket_ranges.cc",

base/base.gyp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@
251251
'message_loop/message_pump_libevent.h',
252252
'message_loop/message_pump_mac.h',
253253
'message_loop/message_pump_mac.mm',
254+
'message_loop/message_pump_uv.cc',
255+
'message_loop/message_pump_uv.h',
254256
'metrics/field_trial.cc',
255257
'metrics/field_trial.h',
256258
'posix/file_descriptor_shuffle.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

0 commit comments

Comments
 (0)