| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  | // Copyright (c) 2015 GitHub, Inc.
 | 
					
						
							|  |  |  | // Use of this source code is governed by the MIT license that can be
 | 
					
						
							|  |  |  | // found in the LICENSE file.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-22 08:34:31 +01:00
										 |  |  | #ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SESSION_H_
 | 
					
						
							|  |  |  | #define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SESSION_H_
 | 
					
						
							| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-10 23:23:35 +01:00
										 |  |  | #include <optional>
 | 
					
						
							| 
									
										
										
										
											2015-06-24 11:59:11 +08:00
										 |  |  | #include <string>
 | 
					
						
							| 
									
										
										
										
											2017-09-17 01:13:55 +10:00
										 |  |  | #include <vector>
 | 
					
						
							| 
									
										
										
										
											2015-06-24 11:59:11 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-11 16:07:39 -04:00
										 |  |  | #include "base/memory/raw_ptr.h"
 | 
					
						
							| 
									
										
										
										
											2024-07-22 04:31:32 -05:00
										 |  |  | #include "base/memory/raw_ref.h"
 | 
					
						
							| 
									
										
										
										
											2024-07-08 05:55:48 -05:00
										 |  |  | #include "base/memory/weak_ptr.h"
 | 
					
						
							| 
									
										
										
										
											2016-07-12 21:53:19 +09:00
										 |  |  | #include "base/values.h"
 | 
					
						
							| 
									
										
										
										
											2015-08-31 00:22:01 +05:30
										 |  |  | #include "content/public/browser/download_manager.h"
 | 
					
						
							| 
									
										
										
										
											2019-07-24 19:01:08 -04:00
										 |  |  | #include "electron/buildflags/buildflags.h"
 | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  | #include "gin/wrappable.h"
 | 
					
						
							| 
									
										
										
										
											2024-09-17 14:58:56 -05:00
										 |  |  | #include "services/network/public/mojom/host_resolver.mojom-forward.h"
 | 
					
						
							|  |  |  | #include "services/network/public/mojom/ssl_config.mojom-forward.h"
 | 
					
						
							| 
									
										
										
										
											2025-01-31 09:32:45 -05:00
										 |  |  | #include "shell/browser/api/ipc_dispatcher.h"
 | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  | #include "shell/browser/event_emitter_mixin.h"
 | 
					
						
							| 
									
										
										
										
											2019-06-19 13:46:59 -07:00
										 |  |  | #include "shell/browser/net/resolve_proxy_helper.h"
 | 
					
						
							| 
									
										
										
										
											2020-07-20 12:13:33 -07:00
										 |  |  | #include "shell/common/gin_helper/cleaned_up_at_exit.h"
 | 
					
						
							| 
									
										
										
										
											2023-02-20 12:57:38 -08:00
										 |  |  | #include "shell/common/gin_helper/constructible.h"
 | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  | #include "shell/common/gin_helper/pinnable.h"
 | 
					
						
							| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-10 10:39:40 +01:00
										 |  |  | #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
 | 
					
						
							|  |  |  | #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h"  // nogncheck
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-24 11:59:11 +08:00
										 |  |  | class GURL; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-30 10:38:04 +08:00
										 |  |  | namespace base { | 
					
						
							|  |  |  | class FilePath; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  | namespace gin { | 
					
						
							|  |  |  | class Arguments; | 
					
						
							| 
									
										
										
										
											2024-07-29 12:42:57 -05:00
										 |  |  | template <typename T> | 
					
						
							|  |  |  | class Handle; | 
					
						
							|  |  |  | }  // namespace gin
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace gin_helper { | 
					
						
							|  |  |  | class Dictionary; | 
					
						
							|  |  |  | class ErrorThrower; | 
					
						
							|  |  |  | }  // namespace gin_helper
 | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-10-22 22:56:36 +05:30
										 |  |  | namespace net { | 
					
						
							|  |  |  | class ProxyConfig; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-19 14:23:04 -07:00
										 |  |  | namespace electron { | 
					
						
							| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-04 12:19:40 -08:00
										 |  |  | class ElectronBrowserContext; | 
					
						
							| 
									
										
										
										
											2025-01-23 21:12:23 -05:00
										 |  |  | struct PreloadScript; | 
					
						
							| 
									
										
										
										
											2015-06-23 23:40:41 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  | namespace api { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-04 18:40:02 -05:00
										 |  |  | class Session final : public gin::Wrappable<Session>, | 
					
						
							|  |  |  |                       public gin_helper::Pinnable<Session>, | 
					
						
							|  |  |  |                       public gin_helper::Constructible<Session>, | 
					
						
							|  |  |  |                       public gin_helper::EventEmitterMixin<Session>, | 
					
						
							|  |  |  |                       public gin_helper::CleanedUpAtExit, | 
					
						
							| 
									
										
										
										
											2025-01-31 09:32:45 -05:00
										 |  |  |                       public IpcDispatcher<Session>, | 
					
						
							| 
									
										
										
										
											2020-03-10 10:39:40 +01:00
										 |  |  | #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
 | 
					
						
							| 
									
										
										
										
											2024-09-04 18:40:02 -05:00
										 |  |  |                       private SpellcheckHunspellDictionary::Observer, | 
					
						
							| 
									
										
										
										
											2020-03-10 10:39:40 +01:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2024-09-04 18:40:02 -05:00
										 |  |  |                       private content::DownloadManager::Observer { | 
					
						
							| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  |  public: | 
					
						
							| 
									
										
										
										
											2015-06-24 15:37:04 +08:00
										 |  |  |   // Gets or creates Session from the |browser_context|.
 | 
					
						
							| 
									
										
										
										
											2020-02-04 12:19:40 -08:00
										 |  |  |   static gin::Handle<Session> CreateFrom( | 
					
						
							|  |  |  |       v8::Isolate* isolate, | 
					
						
							|  |  |  |       ElectronBrowserContext* browser_context); | 
					
						
							| 
									
										
										
										
											2023-02-20 12:57:38 -08:00
										 |  |  |   static gin::Handle<Session> New();  // Dummy, do not use!
 | 
					
						
							| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |   static Session* FromBrowserContext(content::BrowserContext* context); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-12 21:01:49 +09:00
										 |  |  |   // Gets the Session of |partition|.
 | 
					
						
							| 
									
										
										
										
											2022-07-05 08:25:18 -07:00
										 |  |  |   static gin::Handle<Session> FromPartition(v8::Isolate* isolate, | 
					
						
							|  |  |  |                                             const std::string& partition, | 
					
						
							|  |  |  |                                             base::Value::Dict options = {}); | 
					
						
							| 
									
										
										
										
											2015-09-05 22:39:48 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-20 14:34:49 +00:00
										 |  |  |   // Gets the Session based on |path|.
 | 
					
						
							| 
									
										
										
										
											2024-01-10 23:23:35 +01:00
										 |  |  |   static std::optional<gin::Handle<Session>> FromPath( | 
					
						
							| 
									
										
										
										
											2023-03-20 14:34:49 +00:00
										 |  |  |       v8::Isolate* isolate, | 
					
						
							|  |  |  |       const base::FilePath& path, | 
					
						
							|  |  |  |       base::Value::Dict options = {}); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-02 16:53:36 -05:00
										 |  |  |   ElectronBrowserContext* browser_context() const { | 
					
						
							|  |  |  |     return &browser_context_.get(); | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2015-07-15 18:05:38 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |   // gin::Wrappable
 | 
					
						
							|  |  |  |   static gin::WrapperInfo kWrapperInfo; | 
					
						
							| 
									
										
										
										
											2023-02-20 12:57:38 -08:00
										 |  |  |   static void FillObjectTemplate(v8::Isolate*, v8::Local<v8::ObjectTemplate>); | 
					
						
							| 
									
										
										
										
											2023-07-10 11:49:20 +02:00
										 |  |  |   static const char* GetClassName() { return "Session"; } | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |   const char* GetTypeName() override; | 
					
						
							| 
									
										
										
										
											2015-12-03 16:04:46 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-30 03:20:37 +09:00
										 |  |  |   // gin_helper::CleanedUpAtExit
 | 
					
						
							|  |  |  |   void WillBeDestroyed() override; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-22 15:57:51 +09:00
										 |  |  |   // Methods.
 | 
					
						
							| 
									
										
										
										
											2023-04-05 07:06:14 -07:00
										 |  |  |   v8::Local<v8::Promise> ResolveHost( | 
					
						
							|  |  |  |       std::string host, | 
					
						
							| 
									
										
										
										
											2024-01-10 23:23:35 +01:00
										 |  |  |       std::optional<network::mojom::ResolveHostParametersPtr> params); | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |   v8::Local<v8::Promise> ResolveProxy(gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2019-04-30 15:09:17 -07:00
										 |  |  |   v8::Local<v8::Promise> GetCacheSize(); | 
					
						
							|  |  |  |   v8::Local<v8::Promise> ClearCache(); | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |   v8::Local<v8::Promise> ClearStorageData(gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2016-01-12 20:58:12 +05:30
										 |  |  |   void FlushStorageData(); | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |   v8::Local<v8::Promise> SetProxy(gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2020-10-27 14:50:06 +08:00
										 |  |  |   v8::Local<v8::Promise> ForceReloadProxyConfig(); | 
					
						
							| 
									
										
										
										
											2015-07-30 10:38:04 +08:00
										 |  |  |   void SetDownloadPath(const base::FilePath& path); | 
					
						
							| 
									
										
										
										
											2019-10-25 22:03:28 +09:00
										 |  |  |   void EnableNetworkEmulation(const gin_helper::Dictionary& options); | 
					
						
							| 
									
										
										
										
											2015-09-27 18:49:52 +05:30
										 |  |  |   void DisableNetworkEmulation(); | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |   void SetCertVerifyProc(v8::Local<v8::Value> proc, gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2016-02-01 03:05:34 +05:30
										 |  |  |   void SetPermissionRequestHandler(v8::Local<v8::Value> val, | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |                                    gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2018-08-29 02:05:08 +12:00
										 |  |  |   void SetPermissionCheckHandler(v8::Local<v8::Value> val, | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |                                  gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2021-09-23 07:00:11 -04:00
										 |  |  |   void SetDevicePermissionHandler(v8::Local<v8::Value> val, | 
					
						
							|  |  |  |                                   gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2023-05-30 12:35:25 -04:00
										 |  |  |   void SetUSBProtectedClassesHandler(v8::Local<v8::Value> val, | 
					
						
							|  |  |  |                                      gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2022-09-26 10:19:58 -04:00
										 |  |  |   void SetBluetoothPairingHandler(v8::Local<v8::Value> val, | 
					
						
							|  |  |  |                                   gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |   v8::Local<v8::Promise> ClearHostResolverCache(gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2019-05-03 14:30:25 -07:00
										 |  |  |   v8::Local<v8::Promise> ClearAuthCache(); | 
					
						
							| 
									
										
										
										
											2016-05-23 10:59:55 +05:30
										 |  |  |   void AllowNTLMCredentialsForDomains(const std::string& domains); | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |   void SetUserAgent(const std::string& user_agent, gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2016-06-22 15:57:51 +09:00
										 |  |  |   std::string GetUserAgent(); | 
					
						
							| 
									
										
										
										
											2020-09-23 13:22:10 -07:00
										 |  |  |   void SetSSLConfig(network::mojom::SSLConfigPtr config); | 
					
						
							| 
									
										
										
										
											2020-03-11 00:02:22 -07:00
										 |  |  |   bool IsPersistent(); | 
					
						
							| 
									
										
										
										
											2019-03-14 08:11:01 -07:00
										 |  |  |   v8::Local<v8::Promise> GetBlobData(v8::Isolate* isolate, | 
					
						
							|  |  |  |                                      const std::string& uuid); | 
					
						
							| 
									
										
										
										
											2023-06-21 15:31:28 +02:00
										 |  |  |   void DownloadURL(const GURL& url, gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2019-10-25 22:03:28 +09:00
										 |  |  |   void CreateInterruptedDownload(const gin_helper::Dictionary& options); | 
					
						
							| 
									
										
										
										
											2025-01-23 21:12:23 -05:00
										 |  |  |   std::string RegisterPreloadScript(gin_helper::ErrorThrower thrower, | 
					
						
							|  |  |  |                                     const PreloadScript& new_preload_script); | 
					
						
							|  |  |  |   void UnregisterPreloadScript(gin_helper::ErrorThrower thrower, | 
					
						
							|  |  |  |                                const std::string& script_id); | 
					
						
							|  |  |  |   std::vector<PreloadScript> GetPreloadScripts() const; | 
					
						
							| 
									
										
										
										
											2024-12-04 14:25:11 -03:00
										 |  |  |   v8::Local<v8::Promise> GetSharedDictionaryInfo( | 
					
						
							|  |  |  |       const gin_helper::Dictionary& options); | 
					
						
							|  |  |  |   v8::Local<v8::Promise> GetSharedDictionaryUsageInfo(); | 
					
						
							|  |  |  |   v8::Local<v8::Promise> ClearSharedDictionaryCache(); | 
					
						
							|  |  |  |   v8::Local<v8::Promise> ClearSharedDictionaryCacheForIsolationKey( | 
					
						
							|  |  |  |       const gin_helper::Dictionary& options); | 
					
						
							| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  |   v8::Local<v8::Value> Cookies(v8::Isolate* isolate); | 
					
						
							| 
									
										
										
										
											2025-02-21 18:36:51 -05:00
										 |  |  |   v8::Local<v8::Value> Extensions(v8::Isolate* isolate); | 
					
						
							| 
									
										
										
										
											2016-06-08 20:01:27 +05:30
										 |  |  |   v8::Local<v8::Value> Protocol(v8::Isolate* isolate); | 
					
						
							| 
									
										
										
										
											2020-02-20 15:19:06 -08:00
										 |  |  |   v8::Local<v8::Value> ServiceWorkerContext(v8::Isolate* isolate); | 
					
						
							| 
									
										
										
										
											2015-12-01 10:22:22 +05:30
										 |  |  |   v8::Local<v8::Value> WebRequest(v8::Isolate* isolate); | 
					
						
							| 
									
										
										
										
											2018-10-04 23:38:56 +05:30
										 |  |  |   v8::Local<v8::Value> NetLog(v8::Isolate* isolate); | 
					
						
							| 
									
										
										
										
											2020-05-19 10:18:12 -07:00
										 |  |  |   void Preconnect(const gin_helper::Dictionary& options, gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2020-10-09 00:45:36 +08:00
										 |  |  |   v8::Local<v8::Promise> CloseAllConnections(); | 
					
						
							| 
									
										
										
										
											2021-04-27 09:54:28 -07:00
										 |  |  |   v8::Local<v8::Value> GetPath(v8::Isolate* isolate); | 
					
						
							| 
									
										
										
										
											2022-03-15 21:34:53 +01:00
										 |  |  |   void SetCodeCachePath(gin::Arguments* args); | 
					
						
							|  |  |  |   v8::Local<v8::Promise> ClearCodeCaches(const gin_helper::Dictionary& options); | 
					
						
							| 
									
										
										
										
											2024-04-01 12:09:01 -04:00
										 |  |  |   v8::Local<v8::Value> ClearData(gin_helper::ErrorThrower thrower, | 
					
						
							|  |  |  |                                  gin::Arguments* args); | 
					
						
							| 
									
										
										
										
											2019-10-31 13:11:51 -07:00
										 |  |  | #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
 | 
					
						
							|  |  |  |   base::Value GetSpellCheckerLanguages(); | 
					
						
							|  |  |  |   void SetSpellCheckerLanguages(gin_helper::ErrorThrower thrower, | 
					
						
							|  |  |  |                                 const std::vector<std::string>& languages); | 
					
						
							| 
									
										
										
										
											2020-02-10 14:08:53 -08:00
										 |  |  |   v8::Local<v8::Promise> ListWordsInSpellCheckerDictionary(); | 
					
						
							| 
									
										
										
										
											2019-11-26 13:16:43 -08:00
										 |  |  |   bool AddWordToSpellCheckerDictionary(const std::string& word); | 
					
						
							| 
									
										
										
										
											2020-02-10 14:07:25 -08:00
										 |  |  |   bool RemoveWordFromSpellCheckerDictionary(const std::string& word); | 
					
						
							| 
									
										
										
										
											2020-11-12 00:29:18 +09:00
										 |  |  |   void SetSpellCheckerEnabled(bool b); | 
					
						
							|  |  |  |   bool IsSpellCheckerEnabled() const; | 
					
						
							| 
									
										
										
										
											2019-10-31 13:11:51 -07:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-03 12:41:45 +01:00
										 |  |  |   // disable copy
 | 
					
						
							|  |  |  |   Session(const Session&) = delete; | 
					
						
							|  |  |  |   Session& operator=(const Session&) = delete; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-22 15:57:51 +09:00
										 |  |  |  protected: | 
					
						
							| 
									
										
										
										
											2020-02-04 12:19:40 -08:00
										 |  |  |   Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context); | 
					
						
							| 
									
										
										
										
											2018-04-17 16:03:51 -07:00
										 |  |  |   ~Session() override; | 
					
						
							| 
									
										
										
										
											2016-06-22 15:57:51 +09:00
										 |  |  | 
 | 
					
						
							|  |  |  |   // content::DownloadManager::Observer:
 | 
					
						
							|  |  |  |   void OnDownloadCreated(content::DownloadManager* manager, | 
					
						
							| 
									
										
										
										
											2018-04-10 17:29:26 +02:00
										 |  |  |                          download::DownloadItem* item) override; | 
					
						
							| 
									
										
										
										
											2016-06-22 15:57:51 +09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-10 10:39:40 +01:00
										 |  |  | #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
 | 
					
						
							| 
									
										
										
										
											2020-03-05 11:58:19 -08:00
										 |  |  |   // SpellcheckHunspellDictionary::Observer
 | 
					
						
							|  |  |  |   void OnHunspellDictionaryInitialized(const std::string& language) override; | 
					
						
							|  |  |  |   void OnHunspellDictionaryDownloadBegin(const std::string& language) override; | 
					
						
							|  |  |  |   void OnHunspellDictionaryDownloadSuccess( | 
					
						
							|  |  |  |       const std::string& language) override; | 
					
						
							|  |  |  |   void OnHunspellDictionaryDownloadFailure( | 
					
						
							|  |  |  |       const std::string& language) override; | 
					
						
							| 
									
										
										
										
											2020-03-10 10:39:40 +01:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2020-03-05 11:58:19 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-22 15:57:51 +09:00
										 |  |  |  private: | 
					
						
							| 
									
										
										
										
											2022-08-22 14:15:32 -07:00
										 |  |  |   void SetDisplayMediaRequestHandler(v8::Isolate* isolate, | 
					
						
							|  |  |  |                                      v8::Local<v8::Value> val); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-05 18:46:34 +09:00
										 |  |  |   // Cached gin_helper::Wrappable objects.
 | 
					
						
							| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  |   v8::Global<v8::Value> cookies_; | 
					
						
							| 
									
										
										
										
											2025-02-21 18:36:51 -05:00
										 |  |  |   v8::Global<v8::Value> extensions_; | 
					
						
							| 
									
										
										
										
											2016-06-08 20:01:27 +05:30
										 |  |  |   v8::Global<v8::Value> protocol_; | 
					
						
							| 
									
										
										
										
											2018-10-04 23:38:56 +05:30
										 |  |  |   v8::Global<v8::Value> net_log_; | 
					
						
							| 
									
										
										
										
											2020-02-20 15:19:06 -08:00
										 |  |  |   v8::Global<v8::Value> service_worker_context_; | 
					
						
							| 
									
										
										
										
											2019-08-13 14:47:35 +09:00
										 |  |  |   v8::Global<v8::Value> web_request_; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-11 16:07:39 -04:00
										 |  |  |   raw_ptr<v8::Isolate> isolate_; | 
					
						
							| 
									
										
										
										
											2021-03-29 10:45:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-02 11:08:10 -07:00
										 |  |  |   // The client id to enable the network throttler.
 | 
					
						
							|  |  |  |   base::UnguessableToken network_emulation_token_; | 
					
						
							| 
									
										
										
										
											2016-04-18 13:59:15 +09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-02 16:53:36 -05:00
										 |  |  |   const raw_ref<ElectronBrowserContext> browser_context_; | 
					
						
							| 
									
										
										
										
											2024-07-08 05:55:48 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |   base::WeakPtrFactory<Session> weak_factory_{this}; | 
					
						
							| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | }  // namespace api
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-19 14:23:04 -07:00
										 |  |  | }  // namespace electron
 | 
					
						
							| 
									
										
										
										
											2015-06-16 17:23:29 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-22 08:34:31 +01:00
										 |  |  | #endif  // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SESSION_H_
 |