Commit graph

900 commits

Author SHA1 Message Date
deepak1556
83632f15a9 Fix session restore with network service.
https://chromium-review.googlesource.com/c/chromium/src/+/818486
2018-06-19 11:49:40 +10:00
deepak1556
bbb2393031 Remove base::SizeTToString
https://chromium-review.googlesource.com/c/chromium/src/+/799550
2018-06-19 11:49:40 +10:00
deepak1556
c31d7ef70a Implement SpecialStoragePolicy::ShouldDeleteCookieOnExit
https://chromium-review.googlesource.com/c/chromium/src/+/926369
2018-06-19 11:49:40 +10:00
deepak1556
3666935c06 [DevTools] Make Inspect Element work for OOPIF
https://chromium-review.googlesource.com/c/chromium/src/+/881522
2018-06-19 11:49:40 +10:00
deepak1556
8e125b2953 REVIEW: Remove the notification close-closure in favour of an explicit method
https://chromium-review.googlesource.com/c/chromium/src/+/744205
2018-06-19 11:49:40 +10:00
deepak1556
026e7bff40 Update NetworkDelegate
* Remove Deprecated OnResponseStarted.
  https://chromium-review.googlesource.com/c/chromium/src/+/763193
* Replace cookie lines with CanonicalCookie in CanSetCookie delegates.
  https://chromium-review.googlesource.com/c/chromium/src/+/775606
* Reporting: Check upload permissions asynchronously
  https://chromium-review.googlesource.com/c/chromium/src/+/937566
2018-06-19 11:49:40 +10:00
deepak1556
bf55d856d2 Cookie Store: Extract change notifications to separate classes.
https://chromium-review.googlesource.com/c/chromium/src/+/919159
2018-06-19 11:49:40 +10:00
deepak1556
806acbdf12 Move content/network to services/network.
https://chromium-review.googlesource.com/891646
2018-06-19 11:49:40 +10:00
deepak1556
01fdfc4574 Remove Permission manager from brightray
Electron manages its own implementation, this was
missed out when merging the brightray/ component.
2018-06-19 11:46:59 +10:00
deepak1556
f6665edc73 Convert ColorChooser from ipc to mojo.
https://chromium-review.googlesource.com/c/chromium/src/+/800350
https://chromium-review.googlesource.com/c/chromium/src/+/821954
2018-06-19 11:46:59 +10:00
deepak1556
c29f08c53e DevTools: remove the 'forced' attribute from the AgentHostClosed in DevToolsAgentHost.
https://chromium-review.googlesource.com/c/chromium/src/+/745301
2018-06-19 11:46:59 +10:00
deepak1556
bf620363b9 Devtools: Remove session_id in browser
https://chromium-review.googlesource.com/c/chromium/src/+/866213
2018-06-19 11:46:59 +10:00
deepak1556
f32e59d4b2 Update devtools_file_system_indexer
* Switch DevToolsFileSystemIndexer to use SequencedTaskRunner
  https://chromium-review.googlesource.com/c/chromium/src/+/545200
* Remove dead code from devtools_file_system_indexer.cc
  https://codereview.chromium.org/2508443002
* Fix DCHECKs and a crash in DevToolsFileSystemIndexer
  https://chromium-review.googlesource.com/c/chromium/src/+/553958
* reset trigram cache when devtools window closes
  https://chromium-review.googlesource.com/c/chromium/src/+/969969
* Directly use base::File instead of FileProxy in DevToolsFileSystemIndexer
  https://chromium-review.googlesource.com/c/chromium/src/+/544793
2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
7c95100180 Rename ProxyService class to ProxyResolutionService
https://chromium-review.googlesource.com/857421
2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
079e5df740 Adds ability for BrowserMainParts::PreEarlyInitialization() to fail
https://chromium-review.googlesource.com/862964
2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
cb604026d6 DevTools: move remote debugging hosted URL to single location.
https://chromium-review.googlesource.com/905983
2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
70cc5d87af ResourceBundle → ui::ResourceBundle
Fixes "error: use of undeclared identifier 'ResourceBundle';
did you mean 'ui::ResourceBundle'?".
2018-06-19 11:46:59 +10:00
Aleksei Kuzmin
408b62bcc2 Move net/proxy to net/proxy_resolution
https://chromium-review.googlesource.com/868176

Also includes changes from:
Rename files relating to PAC (proxy auto config).
https://chromium-review.googlesource.com/836927
2018-06-19 11:46:58 +10: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
Zhuo Lu
fd25f594cd Do not capture cookies and credentials (#13065) 2018-05-24 14:46:54 -07:00
Jeremy Apthorp
9aa18d29a5
Merge pull request #12885 from nornagon/is-desktop-unity
Don't declare IsDesktopEnvironmentUnity on non-Linux
2018-05-10 14:41:29 -07:00
Jeremy Apthorp
87d0175c76 Require !OS_MACOSX as well as TOOLKIT_VIEWS for views code 2018-05-10 14:11:19 -07:00
Jeremy Apthorp
26f5390ac0 Don't declare IsDesktopEnvironmentUnity on non-Linux 2018-05-10 13:59:48 -07:00
Shelley Vohr
12a57ff1c2 clang-format objc files (#12673) 2018-04-20 11:47:04 -07:00
Cheng Zhao
28b85762fd
Merge pull request #12660 from electron/mac-views
Refactor NativeWindow (Part 8): Prepare work for using views::Widget on macOS
2018-04-20 21:31:28 +09:00
Robo
ff571f3b5d Part I: Move from base::Bind to base::BindOnce and remove unneeded base::Passed (#12661) 2018-04-20 19:55:05 +09:00
Cheng Zhao
1c6c75da4f Merge the logic of managing ViewsDelegate 2018-04-20 19:10:37 +09:00
deepak1556
6d0ac6593c [chromium-style] Complex class/struct needs an explicit out-of-line copy constructor. 2018-04-19 11:12:58 -07:00
Jeremy Apthorp
f3c00e96aa Bring mac code into conformance with -Wunguarded-availability 2018-04-19 11:12:58 -07:00
Jeremy Apthorp
27cee90e5e [chromium-style] move methods out of headers 2018-04-19 11:12:58 -07:00
Jeremy Apthorp
f1587da480 [chromium-style] out-of-line default constructors and destructors 2018-04-19 11:12:58 -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
49c8c31220
format previously misses .cc files 2018-04-17 21:56:12 -04:00
Shelley Vohr
284aca68c0
clang-format brightray 2018-04-17 21:46:27 -04:00
Shelley Vohr
d722008367
remove unnecessary ptr_util.h include 2018-04-12 22:34:26 -04:00
Shelley Vohr
b05932310b
replace base::MakeUnique with std::make_unique 2018-04-12 08:48:32 -04:00
Robo
171230e45d Cleanup destruction of URLRequestContextGetter (#12305)
- Add Leak detector
 - Indicate shutdown of request context from Browser Context
 - Change stored references to URLRequestContextGetter to use BrowserContext
 - Destroy session properties explicitly
2018-03-30 08:24:55 -05:00
deepak1556
c3f8f6bc42 re-use request context from IOThread 2018-03-20 10:13:17 +03:00
Tomas Rycl
f2116c50c0 Unity detection now works in all OSes - returns false. 2018-03-20 10:13:15 +03:00
deepak1556
b9bb4dfc06 FIXME: re-enable guest webcontents based on OOPIF feature 2018-03-20 10:13:15 +03:00
deepak1556
b552ad7065 add taskpriority when creating sequences task runners 2018-03-20 10:13:15 +03:00
Aleksei Kuzmin
fa3d9d32ae Use XDG_CURRENT_DESKTOP to determine if the desktop environment is Unity
https://chromium-review.googlesource.com/682615
2018-03-20 10:13:15 +03:00
deepak1556
007ea500d0 REVIEW: Re-use devtools network throttling from content layer
https://chromium-review.googlesource.com/c/chromium/src/+/664356
2018-03-20 10:13:15 +03:00
Samuel Attard
e65815e34c Implement GetBackgroundFetchDelegate in brightray::BrowserContext 2018-03-20 10:08:58 +03:00
Samuel Attard
de2981a767 Move proxy constructor to ProxyService namespace 2018-03-20 10:08:58 +03:00
Samuel Attard
6f695b93d5 Fix system proxy config resolver constructor 2018-03-20 10:08:58 +03:00
Samuel Attard
f2edd5d068 v8 proxy service has been removed 2018-03-20 10:08:58 +03:00
Samuel Attard
f0ef11b856 BlockingPool has been removed 2018-03-20 10:08:58 +03:00
Samuel Attard
12066a60f3 make_scoped_refptr --> WrapRefCounted 2018-03-20 10:08:58 +03:00
Samuel Attard
461e33104e HandleCommand now takes session_id and returns success boolean. It is assumed a nullptr from the handler means failure 2018-03-20 10:08:57 +03:00
Charles Kerr
dd2c2660b9
Fix desktop-id notification edge case (#12216)
* Fix desktop-id notification edge case

* Extract-method platform_util::GetDesktopName()

This removes duplicated code from libnotify_notifications.cc
and atom/common/linux/application_info.cc.

* Check for empty case in GetDesktopName().

* Move GetDesktopName() to brightray::util

* Remove unnecessary changes in platform_util

* Add a brightray::platform_util namespace
2018-03-12 16:02:47 +09:00
Charles Kerr
86af20ded0
Linux named notifications (#12192)
* Set name & desktop-entry on Linux notifications

* DBusMock now honors verbose mode flag

* Disable DBus Notification tests on ia32
2018-03-12 09:33:06 +09:00
Cheng Zhao
cc6bcb6c81 Fix some flaky tests in CI (#12153)
* Guard whole InitPrefs with ScopedAllowIO

Saw a crash:
0 0x7f8d2f7d918d base::debug::StackTrace::StackTrace()
1 0x7f8d2f7d755c base::debug::StackTrace::StackTrace()
2 0x7f8d2f867caa logging::LogMessage::~LogMessage()
3 0x7f8d2fa157c7 base::ThreadRestrictions::AssertIOAllowed()
4 0x7f8d2f83453a base::OpenFile()
5 0x7f8d2f82a967 base::ReadFileToStringWithMaxSize()
6 0x7f8d2f82ad44 base::ReadFileToString()
7 0x7f8d2f846f73 JSONFileValueDeserializer::ReadFileToString()
8 0x7f8d2f84738c JSONFileValueDeserializer::Deserialize()
9 0x7f8d35a5d1f6 <unknown>
10 0x7f8d35a5c217 JsonPrefStore::ReadPrefs()
11 0x7f8d35a87d3e PrefService::InitFromStorage()
12 0x7f8d35a87c60 PrefService::PrefService()
13 0x7f8d35a91a10 PrefServiceFactory::Create()
14 0x000000e86e1b brightray::BrowserContext::InitPrefs()
15 0x000000c2bd64 atom::AtomBrowserContext::AtomBrowserContext()
16 0x000000c320db atom::AtomBrowserContext::From()
17 0x000000b4b8b5 atom::api::Session::FromPartition()

* Fix done being called twice in setInterval test

The callback passed to browser process is called asyncly, so it is
possible that multiple callbacks has already been scheduled before we
can clearInternval.

* Fix failing test when dir name has special chars

The pdfSource is not escaped while parsedURL.search is.

* Call done with Error instead of string

* Fix crash caused by not removing input observer

Solve crash:
0 libcontent.dylib content::RenderWidgetHostImpl::DispatchInputEventWithLatencyInfo(blink::WebInputEvent const&, ui::LatencyInfo*) + 214
1 libcontent.dylib content::RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 1350
2 libcontent.dylib content::RenderWidgetHostViewMac::ProcessMouseEvent(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 44
3 libcontent.dylib content::RenderWidgetHostInputEventRouter::RouteMouseEvent(content::RenderWidgetHostViewBase*, blink::WebMouseEvent*, ui::LatencyInfo const&) + 1817

* Print detailed error

* Run tests after server is ready
2018-03-07 14:40:27 +09:00
Cheng Zhao
53229e3d6c Fix network delegate race condition (#12044)
* Fix race condition when getting network delegate

* Remove the evil URLRequestContextGetter::network_delegate

* Move the arguments instead of const referrencing

Safer and more efficient.
2018-02-26 06:23:59 -08:00
Cheng Zhao
b25175a19a Fix assertion when get X11 error in new thread 2018-02-23 10:22:00 +09: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
5eb0a89579 REVIEW: let browser context manage cookie change sub list 2018-02-23 10:21:24 +09:00
deepak1556
248d572077 REVIEW: Subscribe to cookie store for changes in place of CookieMonsterDelegate 2018-02-23 10:21:23 +09:00
Shelley Vohr
233679865b fix some more compilation errors 2018-02-23 10:21:23 +09:00
deepak1556
75c17cf846 Use generic base::Value::SetKey
Remove base::Value::SetDoubleWithoutPathExpansion
https://chromium-review.googlesource.com/591654

Remove base::Value::SetStringWithoutPathExpansion
https://chromium-review.googlesource.com/592368

Remove base::Value::SetIntegerWithoutPathExpansion
https://chromium-review.googlesource.com/591655
2018-02-23 10:21:23 +09:00
Tomas Rycl
8250dbd172 Removing some function parameters 2018-02-23 10:21:23 +09:00
Tomas Rycl
0d83b69fe2 FIXME: Fix brightray::DevToolsNetworkTransaction compilation
See
https://chromium-review.googlesource.com/631119
https://chromium-review.googlesource.com/611089
2018-02-23 10:21:23 +09:00
Charles Kerr
2a16b28be4
Cache libnotify server caps (#11965)
* cache libnotify server capabilities

* fix broken production cache in NotifierSupportsActions()

* log a warning if LibnotifyNotification::Initialize() fails
2018-02-20 07:53:10 -06:00
Cheng Zhao
af92b04eb9
Merge pull request #11654 from sethlu/set-notification-close-button-text
feat: Set macOS notification close button title
2018-02-15 16:01:30 +09:00
Cheng Zhao
fdda1c55c5
Merge pull request #11647 from sethlu/accept-additional-notification-actions
feat: Accept additional notification actions
2018-02-15 15:46:36 +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
Zhuo Lu
0b7a629a41 Overload method for naming consistency 2018-02-10 03:20:20 -08:00
Zhuo Lu
75b990faff Use std::string::empty to check 2018-02-10 03:20:20 -08:00
Zhuo Lu
1e1087abbb Simplify formatting 2018-02-10 03:20:20 -08:00
Zhuo Lu
31baafab3b NSUserNotification should respond
NSUserNotification is expected to responsd to `@selector(setContentImage:)` with macOS ^10.9
2018-02-10 03:20:20 -08:00
Zhuo Lu
09d51f0a3d Fix include order 2018-02-10 03:20:20 -08:00
Zhuo Lu
844ee0a3f4 Accept additional notification actions
Change to the existing API definition: The first action with type `button` seen will be displayed on the notification, the rest listed as additional actions (shown when holding down on the primary action button)
2018-02-10 03:20:20 -08:00
Zhuo Lu
29f9929703 Organize code 2018-02-10 03:19:47 -08:00
Zhuo Lu
be118d4f13 Make it able to set close button text 2018-02-10 03:19:47 -08:00
Aleš Pergl
efb44050db Enable official build (#11847)
* Updated libchromiumcontent submodule

* Use same LTO settings as libcc

* Use whole program optimization, favour speed, remove redundancies

* Don't use variable template as it confuses LTCG

* Use lld and ThinLTO only on limited set of architectures
2018-02-08 13:26:23 -06:00
shelley vohr
ca34978e73 add app.setLocale() (#11469)
* infrastructure for setLocale via klang

* add documentation for setLocale

* add test for setLocale

* fix spec

* add spec and update docs

* fix carriage feeds on windows

* SetLocale() sets LC_ALL on Linux

* in SetLocale() on Linux, use g_setenv()

* fix tyop: '#ifdef OSX_POSIX'

* make the linter happy

* improvements from review
2018-02-08 08:26:37 -06:00
Samuel Attard
9676c0a4f9 Fix build and ensure no breaking change 2018-02-05 17:29:59 +09:00
Samuel Attard
87c2f0f14f Fix build and ensure no breaking change 2018-02-05 17:29:59 +09:00
Samuel Attard
5f7a173d1d Add missing header import 2018-02-05 17:29:59 +09:00
Samuel Attard
72464a6db5 Fix implicit appUserModelId set 2018-02-05 17:29:59 +09:00
Cheng Zhao
0cce6b3d21 Fix cpplint warning 2018-01-03 17:32:18 +09:00
Cheng Zhao
d6068759b6 win: Fix assertion when creating Notification 2018-01-03 17:25:19 +09:00
deepak1556
abe1faea5c REVIEW: setup request context for NSS OCSP only once 2018-01-02 16:37:11 +09:00
deepak1556
a1592446da REVIEW: access GetApplicationLocale on sequence that allows IO 2018-01-02 16:37:08 +09:00
deepak1556
ebb0e46380 REVIEW: create AtomNetworkDelegate on the IO thread 2018-01-02 16:37:08 +09:00
deepak1556
db156865e7 pref store needs to be loaded on a thread that allows IO 2018-01-02 16:37:06 +09:00
Felix Rieseberg
75cdd9ec70 🔧 Linter's gotta lint 2017-12-13 16:31:02 -08:00
Felix Rieseberg
8a8aaaf16c 🔧 Allow notifications debugging (Windows) 2017-12-13 16:25:49 -08:00
Felix Rieseberg
76d9756fb9 🔧 Use LOG instead of NSLOG 2017-12-13 14:47:23 -08:00
Felix Rieseberg
61ec8df418 🔧 More detailed macOS notification logging 2017-12-13 10:31:59 -08:00
Felix Rieseberg
ffd85bfaac 🔧 Allow notifications debugging (macOS) 2017-12-12 16:09:34 -08:00
deepak1556
16d96a6ef2 Force MediaCaptureDevicesDispatcher to be created on UI thread 2017-12-07 09:47:32 +05:30
Cheng Zhao
d598aa1a67
Merge pull request #11300 from electron/external-devtools
Add API to set arbitrary WebContents as devtools
2017-12-05 10:35:49 +09:00
Ales Pergl
7613afe6d7 Disabled DCHECKs that fail when running tests 2017-12-01 17:55:22 +01:00
Cheng Zhao
5e4914700e Enable using external WebContents as devtools 2017-12-01 10:35:23 +09:00
Ales Pergl
f8b683ca3d Don't access unique pointer after it was moved from 2017-11-27 17:55:21 +01:00
Ales Pergl
9ca658238b Made NotificationDelegateImpl final
The class is designed to call `delete` on itself and because it doesn't have
a virtual destructor, it shouldn't be derived from.
2017-11-24 10:58:53 +09:00
deepak1556
505f2ab9e7 Fix crash when destroying NetLog 2017-11-24 10:58:53 +09:00