Commit graph

277 commits

Author SHA1 Message Date
Charles Kerr
d663b4eaee
fix: fix gn cpplint warnings (#14583)
* chore: fix cpplint 'include_what_you_use' warnings

Typically by including <memory>, <utility> etc.

* chore: fix 'static/global string constant' warning

Use C style strings instead of std::string.

Style guide forbids non-trivial static / global variables. https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables

/home/charles/electron/electron-gn/src/electron/script/cpplint.js

* refactor: remove global string variables.

Fix 'global string variables are not permitted' linter warnings
by using the base::NoDestructor<> wrapper to make it explicit that
these variables are never destroyed.

The style guide's take on globals with nontrivial destructors:
https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables

* fix: initializer error introduced in last commit

* fix: remove WIP file that was included by accident

* fix: include order

* fix: include order

* fix: include order

* fix: include order, again
2018-09-12 19:25:56 -05:00
Robo
f76a8c7b24 build: [m67] enable widevine support (#14519)
* build: [m67] enable widevine support

* fix: remove plugin cache reset hack

It was added in (#8907) to make widevine cdm shows up in
navigator.plugins, since widevine support is no longer
enabled by a plugin it can be removed safely.
2018-09-11 20:24:04 +02:00
Aleksei Kuzmin
7589555cec inspector: stop dragging platform pointer
https://github.com/nodejs/node/commit/296fd57324
2018-09-11 20:24:03 +02:00
Aleksei Kuzmin
ca28b39d9c Rename buildflag_headers for consistency
https://chromium-review.googlesource.com/975990

https://chromium-review.googlesource.com/c/chromium/src/+/988132
2018-09-11 20:21:32 +02:00
Robo
c7c95fab2f build: [gn] widevine cdm support behind flag (#14423)
* build: [gn] widevine cdm support behind flag

* build: [gyp] link cdm_support in the component build
2018-09-05 16:00:37 -05:00
Jeremy Apthorp
9af9634f7d chore: remove unused process_type variable (#13823) 2018-07-26 23:25:54 -07:00
Jeremy Apthorp
d6af3bfcd2
chore: fix more chromium-style errors in windows code (#13487)
Finding more chromium-style linting errors as I build more of the windows code :)
2018-06-28 14:20:11 -07:00
Samuel Attard
b7d00e26bf Default LoadV8Snapshot changed in C66
CR Ref: https://chromium-review.googlesource.com/c/chromium/src/+/859577
2018-06-19 11:49:46 +10:00
deepak1556
77f427acc8 Check for key system support using new mojo service KeySystemSupport
https://chromium-review.googlesource.com/c/chromium/src/+/834764
2018-06-19 11:49:42 +10:00
Aleksei Kuzmin
5e320994f4 Remove content/linux_sandbox dependence on content_switches.h
https://chromium-review.googlesource.com/734265
2018-06-19 11:49:41 +10:00
Milan Burda
28fd571d0c refactoring: use std::make_unique<T> (#13245) 2018-06-18 16:32:55 +09:00
Aleš Pergl
93bee69266 Remove command line argument black-list (#13039)
* Remove command line argument black-list

Instead block all arguments following a URL.

* Updated tests
2018-05-22 11:51:03 -05:00
John Kleinschmidt
fe7947da90
Merge pull request #12805 from electron/update-blacklist-switches
update command-line backlist switches
2018-05-14 13:31:26 -04:00
Jeremy Apthorp
73ac019882 Fix up #includes to work with both GYP and GN 2018-05-10 13:38:40 -07:00
Charles Kerr
1b8b73ce71 update command-line backlist switches
part of the diff comes from the fact that we've bumped
to a new version of libcc.

another part comes from adding network_switch_list.h, whose
switch definitions follow a slightly different format.
2018-05-02 20:58:22 -05:00
Shelley Vohr
12a57ff1c2 clang-format objc files (#12673) 2018-04-20 11:47:04 -07:00
Jeremy Apthorp
6c26bb1cf8 [chromium-style] destructors of ref-counted objects should be private 2018-04-19 11:12:10 -07:00
Jeremy Apthorp
e6695cf2ec [chromium-style] override / virtual warnings 2018-04-19 11:12:10 -07:00
Jeremy Apthorp
a635f078c6 [chromium-style] auto variable type must not deduce to a raw pointer type 2018-04-19 11:10:52 -07:00
Shelley Vohr
c6f4bbd143
also format missing .cc files 2018-04-18 20:48:45 -04:00
Shelley Vohr
53bdf22c85
clang-format atom files 2018-04-18 20:48:45 -04:00
Robo
65e8199a93 Enable plznavigate aka browser side navigation (#12535)
* enable plznavigate code path

* AtomBrowserClient::GetGeolocationApiKey returns the right default

* use IsLoadingToDifferentDocument to identify top level navigation in mainFrame

* use candidate site instance when available

* spec: don't test httpReferrer option for file origin

* update libcc ref

* affinity: only group same site in this mode

* plznavigate: don't emit did-get-response-details event for blob scheme
2018-04-06 16:22:52 +09:00
deepak1556
4b39d17e5f move pdf viewer behind feature flag 2018-03-20 10:13:17 +03:00
deepak1556
6de49f515e FIXME: Disbale browser side navigation aka PlzNavigate 2018-03-20 10:13:15 +03:00
Samuel Attard
ed992ae6a1 trackable_object has moved to base namespace 2018-03-20 10:08:57 +03:00
Ales Pergl
94299f6cd8 Fixed Mac build when enable_run_as_node==false 2018-03-09 13:33:04 +01:00
Cheng Zhao
b9ab2fe0fb Disable stack dumping for 32bit ARM 2018-02-23 10:22:00 +09:00
shelley vohr
0e5b6f9300 Upgrade to node v9.3.0 (#11507)
* update submodule refs for node v9.3.0

* Define "llvm_version" for Node.js build

* NODE_MODULE_CONTEXT_AWARE_BUILTIN -> NODE_BUILTIN_MODULE_CONTEXT_AWARE

* update NodePlatform to MultiIsolatePlatform

* fix linting error

* update node ref

* REVIEW: Explicitly register builtin modules

https://github.com/nodejs/node/pull/16565

* update libcc ref

* switch libcc to c62

* REVIEW: Address node api changes

- Always start the inspector agent for https://github.com/nodejs/node/pull/17085
- Set the tracing controller for node https://github.com/nodejs/node/pull/15538
- Isolate data creation now requires plaform https://github.com/nodejs/node/pull/16700
2018-02-23 10:22:00 +09:00
Aleksei Kuzmin
8c0c1e4ded media: Replace ENABLE_PEPPER_CDMS buildflag with ENABLE_LIBRARY_CDMS
https://chromium-review.googlesource.com/582309
2018-02-23 10:21:23 +09:00
Charles Kerr
402201ac39
Fix cppcheck warnings (#11883)
* remove unused variable

* limit scope of variable 'ret'

* pass shared_ptr<SkBitmap> by reference

* silence warning: value reassign before read

* fix oops

* don't refer to 'response' after std::move()ing it

* make the linter happy
2018-02-14 02:21:46 -06:00
shelley vohr
fae71f9987
Merge pull request #11880 from nitsakh/better-ipc-logging
Add ability to log atom ipc messages
2018-02-12 09:20:37 -05:00
universeroc
069c6187cf Fix #11893 Remove unused member variable content_client_ (#11894) 2018-02-12 08:07:12 -06:00
Nitish Sakhawalkar
e19e2b9242 Address review comments 2018-02-11 10:25:11 -08:00
Nitish Sakhawalkar
5194288fce Add ability to log atom ipc messages 2018-02-09 18:01:14 -08:00
Charles Kerr
e51c78f10c fix oops
because compiling before pushing is for wusses
2018-01-31 22:25:57 -07:00
Charles Kerr
1106cde687 fix oops 2018-01-31 17:40:11 -07:00
Charles Kerr
09a2c80443 use std::binary_search to search switch blacklist 2018-01-31 17:36:06 -07:00
Charles Kerr
8405fe763e Make a copy-paste recipe for rebuilding the blacklist 2018-01-31 17:35:34 -07:00
Samuel Attard
ce361a12e3 Use case-insensitive switch comparisons 2018-01-31 17:35:09 -07:00
Cheng Zhao
b5d5eca224 Make use of sorted order to speed up searching 2018-01-25 14:42:56 +09:00
Aleš Pergl
868e792572 Make run-as-node mode optional (#11701) 2018-01-23 18:17:15 -05:00
Aleš Pergl
c49cb29ddf Disallow launching unknown apps via browser client.
CVE-2018-1000006
2018-01-22 16:49:30 -06:00
deepak1556
1b30cac372 Don't delay node module initialization 2018-01-02 16:37:11 +09:00
deepak1556
e30131f30b Initialize isolate holder in standalone node mode 2018-01-02 16:37:07 +09:00
Cheng Zhao
c0c2461245 Do not create duplicate V8Platform in NodeDebugger 2017-12-22 20:29:09 +09:00
Cheng Zhao
c0e9dbcc00
Merge pull request #11144 from dittos/mas-login-helper-again
Re-land MAS login helper (w/ regression fix)
2017-11-27 17:02:57 +09:00
Ales Pergl
531472bad4 Create a TaskScheduler when initializing run-as-node mode.
It fixes crashes when V8 tries to execute background tasks via the TaskScheduler.
2017-11-24 10:58:53 +09:00
Aleksei Kuzmin
11fa935359 Introduce TaskRunner::RunsTasksInCurrentSequence()
https://codereview.chromium.org/2823103003
2017-11-24 10:58:16 +09:00
Ted Kim
8184cbfb06 Implement login helper to manage login item in Mac App Store build 2017-11-17 10:53:09 +09:00
Alexey Kuzmin
8657169017
Revert "Implement login helper to manage login item in Mac App Store build" 2017-11-16 19:05:13 +03:00
Ted Kim
4119da607f Implement login helper to manage login item in Mac App Store build 2017-10-20 11:44:19 +09:00
Cheng Zhao
c2ab4f711f Merge pull request #10396 from electron/cleanup
Cleanup obsolete code
2017-08-30 19:05:05 +09:00
Ales Pergl
64d9e5b861 Removed obsolete io.h wrappers, included atlbase.h in atom_main.cc 2017-08-30 10:43:29 +02:00
Ales Pergl
7cd64f1bd1 Fixed crash on process exit on Windows 2017-08-30 09:23:19 +02:00
Ales Pergl
a7bae32527 Re-enabled debug mode 2017-08-29 14:19:19 +09:00
Aleksei Kuzmin
d09cab2e21 Migrate base::TaskRunner from Closure to OnceClosure
Migrate base::TaskRunner from Closure to OnceClosure
https://codereview.chromium.org/2637843002

Pass Callback to TaskRunner by value and consume it on invocation (1)
https://codereview.chromium.org/2726523002

Replace base::get with std::get
https://codereview.chromium.org/2797133002
2017-08-15 16:19:21 +03:00
John Kleinschmidt
3d5acdf682 Rollback debug mode changes 2017-08-07 15:54:44 -04:00
Ales Pergl
bdbf9e5d6a Suppress assert dialog boxes when running CI tests 2017-07-22 14:45:50 +02:00
Kevin Sawicki
968759b823 Revert "Suppress assert dialog boxes when running CI tests"
This reverts commit 3574bcacca.
2017-07-17 10:05:21 -07:00
Ales Pergl
3574bcacca Suppress assert dialog boxes when running CI tests 2017-07-17 17:59:40 +02:00
Hari Juturu
80bd6a3e91 🎨 2017-07-11 18:36:01 -07:00
Hari Juturu
9a3b78d9fe Fix devtools open in mixed sandbox mode 2017-07-11 18:36:00 -07:00
Kevin Sawicki
2cd49f3036 Merge pull request #9644 from electron/webview-sandbox
Enable sandbox on webview
2017-06-28 10:10:25 -07:00
deepak1556
538b97582a app: add support for inspect/inspect-brk in forked node process 2017-06-13 00:23:11 +05:30
Hari Juturu
3ee55d9cd3 lint error 2017-06-08 23:46:37 -07:00
Hari Juturu
7bdd259d2e Lint error 2017-06-08 23:39:53 -07:00
Hari Juturu
07f550a748 enable-mixed-sandbox option 2017-06-08 23:29:35 -07:00
Hari Juturu
b5239754ba Enable sandbox on webview 2017-05-31 23:01:14 -07:00
Kevin Sawicki
718cd8d711 Remove unsupported debugger in node processes 2017-05-11 15:02:27 -07:00
Cheng Zhao
fc2d62d5cb Fix API changes of Chrome58 2017-04-27 16:34:52 +09:00
Haojian Wu
00693ba075 Replace "size()" with "empty()". 2017-03-30 21:59:18 +02:00
deepak1556
010193ef44 remove unused header 2017-03-14 00:26:27 +05:30
deepak1556
e767c59da2 enable pdf plugin by default 2017-03-14 00:26:27 +05:30
deepak1556
ddc2e0df71 code cleanup 2017-03-14 00:25:59 +05:30
deepak1556
fdd574cea5 browser: implement pdf renderer as webui 2017-03-14 00:25:59 +05:30
Cheng Zhao
bad6954911 Disable the ActiveVerifier 2017-02-14 17:23:20 +09:00
Cheng Zhao
406224edff enable_pepper_cdms is now a feature flag
So we should not define it anymore.
2017-02-06 10:34:28 -08:00
Kevin Sawicki
43ef4faf79 🎨 2017-01-24 14:00:03 -08:00
Kevin Sawicki
795b674996 Add StartInstance helper on CrashReporter 2017-01-24 13:54:46 -08:00
Kevin Sawicki
f1cd1c6dff Use mate::Dictionary::CreateEmpty 2017-01-24 12:44:39 -08:00
Kevin Sawicki
4107174cfd Group includes 2017-01-24 12:44:39 -08:00
Ramya Achutha Rao
1f07cf2545 Add crashReporter property to process 2017-01-24 12:44:39 -08:00
Ramya Achutha Rao
d4b44d8b69 Expose crash reporter start for child node processes 2017-01-24 12:44:39 -08:00
Kevin Sawicki
54e2c480cb Upgrade to node 7.4 2017-01-19 09:05:59 +02:00
Cheng Zhao
497f5a1199 Update files for Chrome 54 API changes 2017-01-19 09:05:59 +02:00
Kevin Sawicki
cac85d2a12 Remove linter errors 2016-12-12 12:51:48 -08:00
Kevin Sawicki
381f55b3cb Remove unneeded empty checks 2016-12-12 12:51:48 -08:00
Paul Frazee
99ea50649a finish implementation of {secure:true} opt on protocol.registerStandardScehesm, and add working test 2016-12-12 12:49:57 -08:00
Paul Frazee
9d2e23413e add {secure:} opt to protocol.registerStandardSchemes 2016-12-12 12:49:57 -08:00
Kevin Sawicki
a8382d6794 Moving atom_bindings include to Windows block 2016-10-12 13:48:49 -07:00
Kevin Sawicki
b01fd9715b Only expose process.log on Windows 2016-10-12 13:48:48 -07:00
Kevin Sawicki
0740b2f66b Reuse Log method 2016-10-12 13:48:48 -07:00
Kevin Sawicki
d686916fe2 Expose process.log when running as node 2016-10-12 13:48:48 -07:00
Thiago de Arruda
a7b6332ed0 Add atom::AtomSandboxedRendererClient class 2016-09-27 06:01:46 -03:00
Thiago de Arruda
1d228446db Expose --enable-sandbox command-line switch.
When `--enable-sandbox` is passed, electron will use chromium sandbox to spawn
all renderers, and every new BrowserWindow will automatically have "sandboxed"
passed as a web preference(since the renderer would not work properly
otherwise).
2016-09-27 06:01:46 -03:00
Thiago de Arruda
c783ec72bc Add "sandboxed" option to "webPreferences".
When "sandboxed" is passed as a web preference for `BrowserWindow`, the newly
created renderer won't run any node.js code/integration, only communicating with
the system via the IPC API of the content module. This is a requirement for
running the renderer under chrome OS-level sandbox.

Beyond that, certain behaviors of AtomBrowserClient are modified when dealing
with sandboxed renderers:

- `OverrideSiteInstanceNavigation` no longer create a new `SiteInstance` for
  every navigation. Instead, it reuses the source `SiteInstance` when not
  navigating to a different site.
- `CanCreateWindow` will return true and allow javascript access.
2016-09-27 06:01:46 -03:00
Kevin Sawicki
3dd5628ded Include windows.h first 2016-08-26 16:00:05 -07:00
Kevin Sawicki
6285500cdc Sort includes alphabetically 2016-08-26 15:30:02 -07:00
Cheng Zhao
b57665330c Merge branch 'master' into chrome52 2016-07-21 05:34:36 -06:00
Cheng Zhao
cef86f5257 Use node::FreeEnvironment 2016-07-21 16:43:21 +09:00