Commit graph

43 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
Zhuo Lu
ab24a1e36d feat: netLog API for dynamic logging control (#13068)
* Introduce `net.{start|stop}Logging()`

- Slight regression right now as Electron won't automatically start logging net-logs at launch, will soon be fixed
- To implement callback for async controls

* Add `net.isLogging` & optional callback param for `net.stopLogging()`

* Fix small regression on --log-net-log

--log-net-log should work again

* Error on empty file path

* Only start with valid file path

* Remove unused var

* Allow setting log file path before URLRequestContextGetter starts logging

* Add net log tests

* Remove redundant checks

* Use brightray::NetLog

* Clean up code

* Should automatically stop listening

* 🎨 Attempt to fix styles

* Only run non-null callback

* Dump file to tmpdir

* Simplify net log spec

Spawned Electron process on Linux CI can fail to launch

* Separate netLog module

* Remove net logging test from net spec

* Add tests for netLog

* Fix header guard

* Clean up code

* Add netLog.currentlyLoggingPath

* Callback with filepath

* Add test for case when only .stopLogging() is called

* Add docs

* Reintroduce error on invalid arg

* Update copyright

* Update error message

* Juggle file path string types
2018-06-19 11:45:58 +10:00
Jeremy Apthorp
27cee90e5e [chromium-style] move methods out of headers 2018-04-19 11:12:58 -07:00
Jeremy Apthorp
e6695cf2ec [chromium-style] override / virtual warnings 2018-04-19 11:12:10 -07:00
deepak1556
cdab073614 FIX: add chrome-devtools:// to list of WebUI schemes
https://chromium-review.googlesource.com/c/chromium/src/+/617598
2018-02-23 10:21:24 +09:00
deepak1556
a1592446da REVIEW: access GetApplicationLocale on sequence that allows IO 2018-01-02 16:37:08 +09:00
Kevin Sawicki
d7321ed980 Add brightray prefix to include paths from within brightray 2017-05-19 08:46:15 -07:00
Kevin Sawicki
f193b2b2a6 Fix build/include_what_you_use linter violations in brightray 2017-05-19 08:46:15 -07:00
Kevin Sawicki
cfb5b6ac89 Fix build/header_guard linter violations in brightray 2017-05-19 08:46:15 -07:00
Kevin Sawicki
bb4a61c7ff Remove unused includes 2017-05-19 08:46:15 -07:00
Kevin Sawicki
2ece711c2e Format line length to 80 instead of 100 2017-03-23 15:47:30 -07:00
Cheng Zhao
bf9d2b7fa9 Avoid adding WebContentsAudioMuted method 2016-07-02 16:53:48 +09:00
Samuel Attard
f7a8aa12ac Patch OnWebNotificationAllowed to mark notifications as silent in muted WebContents 2016-07-02 13:30:55 +12:00
Cheng Zhao
babd741786 Get rid of default BrowserContext 2016-06-22 15:40:52 +09:00
Cheng Zhao
f5bfbada97 NetLog should be managed by BrowserClient 2016-05-23 19:02:13 +09:00
Cheng Zhao
851ef398fb Adapt to changes of Chrome 51 API changes 2016-05-23 10:59:07 +09:00
Robo
3b09c370d4 allow client to decide displaying web notifications 2016-01-25 22:09:36 +05:30
Cheng Zhao
6f81d1e29f Expose NotificationPresenter to public 2015-12-24 22:20:47 +08:00
Paul Betts
91a62640ab Come Correct with cpplint 2015-10-16 16:48:07 -07:00
Cheng Zhao
c4d192b9a4 linux: Fix building 2015-08-21 16:14:19 +08:00
Cheng Zhao
8a92ef34a7 Store NetLog in BrowserClient 2015-08-11 18:29:55 +08:00
Robo
7496cb29fe create netlog for devtoolsnetlogobserver 2015-07-15 00:54:28 +05:30
Cheng Zhao
7e88fe107d linux: Pass v8 snapshot's fd to child process 2015-04-21 21:43:30 +08:00
Cheng Zhao
a5026907e4 Implement PlatformNotificationService 2015-03-08 19:37:13 -07:00
Cheng Zhao
02d632c4f7 Fix change of ShowDesktopNotification API 2015-02-03 10:57:25 -08:00
Cheng Zhao
51ef072de5 Implement GetDevToolsManagerDelegate, fixes atom/atom-shell#969 2015-01-02 15:18:24 -08:00
Cheng Zhao
f809fef22d OVERRIDE => override 2014-10-23 11:10:39 +08:00
Cheng Zhao
5bec155c81 Adapt to API changes of Chrome 38 2014-10-11 16:38:27 +08:00
Cheng Zhao
dca1c51b32 Fix API changes of Chrome37. 2014-08-31 18:43:01 +08:00
Cheng Zhao
7b6fbff40d Implement BrowserClient::GetDefaultDownloadDirectory(). 2014-07-28 17:48:55 +08:00
Cheng Zhao
6dd580526e Refactor notification presenter for new desktop notification interface. 2014-07-27 11:27:04 +00:00
Cheng Zhao
d5283b2337 Allow access FileSystem api in devtools.
It is required by the load/save feature of profilers.
2014-07-09 15:38:53 +08:00
Adam Roben
42b86242ea Add support for Chrome 35's "protocol interceptors"
See https://codereview.chromium.org/187223003
2014-06-27 11:54:27 -04:00
Adam Roben
74661c342f Fix cpplint errors in browser_client.h 2013-11-17 18:13:10 -05:00
Adam Roben
2595335045 Enable navigator.webkitGetUserMedia()
The code came from chrome/browser/media, but was simplified to remove
dependencies on other parts of chrome/ and to always allow the media stream
request.
2013-07-31 11:08:45 -07:00
Adam Roben
48878af0db Let embedders add their own protocol handlers 2013-04-23 15:50:17 -04:00
Adam Roben
80cb76355c Update to latest libchromiumcontent
* vendor/libchromiumcontent b6a0d85...0d607ee (3):
  > Stop trying to compile SQLitePersistentCookieStore separately
  > Update to latest Chromium trunk revision
  > Merge pull request #4 from aroben/atom
2013-04-17 23:27:53 -04:00
Adam Roben
080d9f59e9 Implement Notification.close() 2013-03-29 09:36:07 -04:00
Adam Roben
3c41af84a1 Move notification-related code into a new NotificationPresenter class 2013-03-28 17:50:07 -04:00
Adam Roben
0893253188 Add bare-bones HTML notifications support
Calling Notification.show() now works. But Notification.close() does nothing,
and none of the notification's events fire.
2013-03-28 17:50:07 -04:00
Adam Roben
881a203b57 Fix double-delete of BrowserMainParts
The caller of BrowserClient::CreateBrowserMainParts handles destroying the
BrowserMainParts instance we return.
2013-03-27 08:55:54 -04:00
Adam Roben
65dd011fa3 Use Google-style header guards everywhere 2013-03-13 15:42:16 -04:00
Adam Roben
e451d92121 Initial commit 2013-03-13 15:31:24 -04:00