Revert "feat: upgrade to Chromium 72.0.3626.52 (#16334)"
This reverts commit 1918e76913.
	
	
This commit is contained in:
		
					parent
					
						
							
								58a6fe13d6
							
						
					
				
			
			
				commit
				
					
						0b85fb7ea2
					
				
			
		
					 178 changed files with 1734 additions and 2102 deletions
				
			
		|  | @ -167,7 +167,6 @@ step-gn-gen-default: &step-gn-gen-default | ||||||
| step-electron-build: &step-electron-build | step-electron-build: &step-electron-build | ||||||
|   run: |   run: | ||||||
|     name: Electron build |     name: Electron build | ||||||
|     no_output_timeout: 30m |  | ||||||
|     command: | |     command: | | ||||||
|       cd src |       cd src | ||||||
|       ninja -C out/Default electron -j18 |       ninja -C out/Default electron -j18 | ||||||
|  |  | ||||||
							
								
								
									
										11
									
								
								BUILD.gn
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								BUILD.gn
									
										
									
									
									
								
							|  | @ -1,3 +1,8 @@ | ||||||
|  | import("build/asar.gni") | ||||||
|  | import("build/npm.gni") | ||||||
|  | import("buildflags/buildflags.gni") | ||||||
|  | import("electron_paks.gni") | ||||||
|  | import("filenames.gni") | ||||||
| import("//build/config/locales.gni") | import("//build/config/locales.gni") | ||||||
| import("//build/config/ui.gni") | import("//build/config/ui.gni") | ||||||
| import("//build/config/win/manifest.gni") | import("//build/config/win/manifest.gni") | ||||||
|  | @ -9,11 +14,6 @@ import("//tools/grit/grit_rule.gni") | ||||||
| import("//tools/grit/repack.gni") | import("//tools/grit/repack.gni") | ||||||
| import("//tools/v8_context_snapshot/v8_context_snapshot.gni") | import("//tools/v8_context_snapshot/v8_context_snapshot.gni") | ||||||
| import("//v8/snapshot_toolchain.gni") | import("//v8/snapshot_toolchain.gni") | ||||||
| import("build/asar.gni") |  | ||||||
| import("build/npm.gni") |  | ||||||
| import("buildflags/buildflags.gni") |  | ||||||
| import("electron_paks.gni") |  | ||||||
| import("filenames.gni") |  | ||||||
| 
 | 
 | ||||||
| if (is_mac) { | if (is_mac) { | ||||||
|   import("//build/config/mac/rules.gni") |   import("//build/config/mac/rules.gni") | ||||||
|  | @ -421,6 +421,7 @@ static_library("electron_lib") { | ||||||
| 
 | 
 | ||||||
|   if (enable_osr) { |   if (enable_osr) { | ||||||
|     sources += [ |     sources += [ | ||||||
|  |       "atom/browser/api/atom_api_web_contents_osr.cc", | ||||||
|       "atom/browser/osr/osr_output_device.cc", |       "atom/browser/osr/osr_output_device.cc", | ||||||
|       "atom/browser/osr/osr_output_device.h", |       "atom/browser/osr/osr_output_device.h", | ||||||
|       "atom/browser/osr/osr_render_widget_host_view.cc", |       "atom/browser/osr/osr_render_widget_host_view.cc", | ||||||
|  |  | ||||||
							
								
								
									
										4
									
								
								DEPS
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								DEPS
									
										
									
									
									
								
							|  | @ -10,9 +10,9 @@ gclient_gn_args = [ | ||||||
| 
 | 
 | ||||||
| vars = { | vars = { | ||||||
|   'chromium_version': |   'chromium_version': | ||||||
|     '72.0.3626.52', |     '71.0.3578.98', | ||||||
|   'node_version': |   'node_version': | ||||||
|     'ad2c89ec3be0f5db3ea02b0f591d36a5d84c51ad', |     'aeae08cda811ed122918bfd48fd9e56f8204d818', | ||||||
| 
 | 
 | ||||||
|   'boto_version': 'f7574aa6cc2c819430c1f05e9a1a1a666ef8169b', |   'boto_version': 'f7574aa6cc2c819430c1f05e9a1a1a666ef8169b', | ||||||
|   'pyyaml_version': '3.12', |   'pyyaml_version': '3.12', | ||||||
|  |  | ||||||
|  | @ -8,10 +8,6 @@ | ||||||
| #include <memory> | #include <memory> | ||||||
| #include <string> | #include <string> | ||||||
| 
 | 
 | ||||||
| #if defined(OS_LINUX) |  | ||||||
| #include <glib.h>  // for g_setenv()
 |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
| #include "atom/app/atom_content_client.h" | #include "atom/app/atom_content_client.h" | ||||||
| #include "atom/browser/atom_browser_client.h" | #include "atom/browser/atom_browser_client.h" | ||||||
| #include "atom/browser/relauncher.h" | #include "atom/browser/relauncher.h" | ||||||
|  | @ -186,36 +182,6 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { | ||||||
|   return false; |   return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void AtomMainDelegate::PostEarlyInitialization(bool is_running_tests) { |  | ||||||
|   std::string custom_locale; |  | ||||||
|   ui::ResourceBundle::InitSharedInstanceWithLocale( |  | ||||||
|       custom_locale, nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |  | ||||||
|   auto* cmd_line = base::CommandLine::ForCurrentProcess(); |  | ||||||
|   if (cmd_line->HasSwitch(::switches::kLang)) { |  | ||||||
|     const std::string locale = cmd_line->GetSwitchValueASCII(::switches::kLang); |  | ||||||
|     const base::FilePath locale_file_path = |  | ||||||
|         ui::ResourceBundle::GetSharedInstance().GetLocaleFilePath(locale, true); |  | ||||||
|     if (!locale_file_path.empty()) { |  | ||||||
|       custom_locale = locale; |  | ||||||
| #if defined(OS_LINUX) |  | ||||||
|       /* When built with USE_GLIB, libcc's GetApplicationLocaleInternal() uses
 |  | ||||||
|        * glib's g_get_language_names(), which keys off of getenv("LC_ALL") */ |  | ||||||
|       g_setenv("LC_ALL", custom_locale.c_str(), TRUE); |  | ||||||
| #endif |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
| #if defined(OS_MACOSX) |  | ||||||
|   if (custom_locale.empty()) |  | ||||||
|     l10n_util::OverrideLocaleWithCocoaLocale(); |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
|   LoadResourceBundle(custom_locale); |  | ||||||
| 
 |  | ||||||
|   AtomBrowserClient::SetApplicationLocale( |  | ||||||
|       l10n_util::GetApplicationLocale(custom_locale)); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void AtomMainDelegate::PreSandboxStartup() { | void AtomMainDelegate::PreSandboxStartup() { | ||||||
|   auto* command_line = base::CommandLine::ForCurrentProcess(); |   auto* command_line = base::CommandLine::ForCurrentProcess(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -25,7 +25,6 @@ class AtomMainDelegate : public content::ContentMainDelegate { | ||||||
|   bool BasicStartupComplete(int* exit_code) override; |   bool BasicStartupComplete(int* exit_code) override; | ||||||
|   void PreSandboxStartup() override; |   void PreSandboxStartup() override; | ||||||
|   void PreCreateMainMessageLoop() override; |   void PreCreateMainMessageLoop() override; | ||||||
|   void PostEarlyInitialization(bool is_running_tests) override; |  | ||||||
|   content::ContentBrowserClient* CreateContentBrowserClient() override; |   content::ContentBrowserClient* CreateContentBrowserClient() override; | ||||||
|   content::ContentRendererClient* CreateContentRendererClient() override; |   content::ContentRendererClient* CreateContentRendererClient() override; | ||||||
|   content::ContentUtilityClient* CreateContentUtilityClient() override; |   content::ContentUtilityClient* CreateContentUtilityClient() override; | ||||||
|  |  | ||||||
|  | @ -30,7 +30,7 @@ | ||||||
| #include "base/files/file_path.h" | #include "base/files/file_path.h" | ||||||
| #include "base/files/file_util.h" | #include "base/files/file_util.h" | ||||||
| #include "base/path_service.h" | #include "base/path_service.h" | ||||||
| #include "base/system/sys_info.h" | #include "base/sys_info.h" | ||||||
| #include "chrome/browser/browser_process.h" | #include "chrome/browser/browser_process.h" | ||||||
| #include "chrome/browser/icon_manager.h" | #include "chrome/browser/icon_manager.h" | ||||||
| #include "chrome/common/chrome_paths.h" | #include "chrome/common/chrome_paths.h" | ||||||
|  | @ -780,24 +780,24 @@ void App::OnGpuProcessCrashed(base::TerminationStatus status) { | ||||||
| 
 | 
 | ||||||
| void App::BrowserChildProcessLaunchedAndConnected( | void App::BrowserChildProcessLaunchedAndConnected( | ||||||
|     const content::ChildProcessData& data) { |     const content::ChildProcessData& data) { | ||||||
|   ChildProcessLaunched(data.process_type, data.GetProcess().Handle()); |   ChildProcessLaunched(data.process_type, data.GetHandle()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void App::BrowserChildProcessHostDisconnected( | void App::BrowserChildProcessHostDisconnected( | ||||||
|     const content::ChildProcessData& data) { |     const content::ChildProcessData& data) { | ||||||
|   ChildProcessDisconnected(base::GetProcId(data.GetProcess().Handle())); |   ChildProcessDisconnected(base::GetProcId(data.GetHandle())); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void App::BrowserChildProcessCrashed( | void App::BrowserChildProcessCrashed( | ||||||
|     const content::ChildProcessData& data, |     const content::ChildProcessData& data, | ||||||
|     const content::ChildProcessTerminationInfo& info) { |     const content::ChildProcessTerminationInfo& info) { | ||||||
|   ChildProcessDisconnected(base::GetProcId(data.GetProcess().Handle())); |   ChildProcessDisconnected(base::GetProcId(data.GetHandle())); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void App::BrowserChildProcessKilled( | void App::BrowserChildProcessKilled( | ||||||
|     const content::ChildProcessData& data, |     const content::ChildProcessData& data, | ||||||
|     const content::ChildProcessTerminationInfo& info) { |     const content::ChildProcessTerminationInfo& info) { | ||||||
|   ChildProcessDisconnected(base::GetProcId(data.GetProcess().Handle())); |   ChildProcessDisconnected(base::GetProcId(data.GetHandle())); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void App::RenderProcessReady(content::RenderProcessHost* host) { | void App::RenderProcessReady(content::RenderProcessHost* host) { | ||||||
|  | @ -1387,9 +1387,7 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|                 void* priv) { |                 void* priv) { | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set("App", atom::api::App::GetConstructor(isolate) |   dict.Set("App", atom::api::App::GetConstructor(isolate)->GetFunction()); | ||||||
|                       ->GetFunction(context) |  | ||||||
|                       .ToLocalChecked()); |  | ||||||
|   dict.Set("app", atom::api::App::Create(isolate)); |   dict.Set("app", atom::api::App::Create(isolate)); | ||||||
| #if defined(OS_MACOSX) | #if defined(OS_MACOSX) | ||||||
|   auto browser = base::Unretained(Browser::Get()); |   auto browser = base::Unretained(Browser::Get()); | ||||||
|  |  | ||||||
|  | @ -147,9 +147,7 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set("autoUpdater", AutoUpdater::Create(isolate)); |   dict.Set("autoUpdater", AutoUpdater::Create(isolate)); | ||||||
|   dict.Set("AutoUpdater", AutoUpdater::GetConstructor(isolate) |   dict.Set("AutoUpdater", AutoUpdater::GetConstructor(isolate)->GetFunction()); | ||||||
|                               ->GetFunction(context) |  | ||||||
|                               .ToLocalChecked()); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace
 | }  // namespace
 | ||||||
|  |  | ||||||
|  | @ -159,9 +159,8 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   BrowserView::SetConstructor(isolate, base::Bind(&BrowserView::New)); |   BrowserView::SetConstructor(isolate, base::Bind(&BrowserView::New)); | ||||||
| 
 | 
 | ||||||
|   mate::Dictionary browser_view(isolate, BrowserView::GetConstructor(isolate) |   mate::Dictionary browser_view( | ||||||
|                                              ->GetFunction(context) |       isolate, BrowserView::GetConstructor(isolate)->GetFunction()); | ||||||
|                                              .ToLocalChecked()); |  | ||||||
|   browser_view.SetMethod("fromId", |   browser_view.SetMethod("fromId", | ||||||
|                          &mate::TrackableObject<BrowserView>::FromWeakMapID); |                          &mate::TrackableObject<BrowserView>::FromWeakMapID); | ||||||
|   browser_view.SetMethod("getAllViews", |   browser_view.SetMethod("getAllViews", | ||||||
|  |  | ||||||
|  | @ -59,9 +59,8 @@ void BrowserWindow::OverrideNSWindowContentView(InspectableWebContents* iwc) { | ||||||
|   // Make NativeWindow use a NSView as content view. |   // Make NativeWindow use a NSView as content view. | ||||||
|   static_cast<NativeWindowMac*>(window())->OverrideNSWindowContentView(); |   static_cast<NativeWindowMac*>(window())->OverrideNSWindowContentView(); | ||||||
|   // Add webview to contentView. |   // Add webview to contentView. | ||||||
|   NSView* webView = iwc->GetView()->GetNativeView().GetNativeNSView(); |   NSView* webView = iwc->GetView()->GetNativeView(); | ||||||
|   NSView* contentView = |   NSView* contentView = [window()->GetNativeWindow() contentView]; | ||||||
|       [window()->GetNativeWindow().GetNativeNSWindow() contentView]; |  | ||||||
|   [webView setFrame:[contentView bounds]]; |   [webView setFrame:[contentView bounds]]; | ||||||
| 
 | 
 | ||||||
|   // ensure that buttons view is floated to top of view hierarchy |   // ensure that buttons view is floated to top of view hierarchy | ||||||
|  | @ -81,7 +80,7 @@ void BrowserWindow::UpdateDraggableRegions( | ||||||
|   // All ControlRegionViews should be added as children of the WebContentsView, |   // All ControlRegionViews should be added as children of the WebContentsView, | ||||||
|   // because WebContentsView will be removed and re-added when entering and |   // because WebContentsView will be removed and re-added when entering and | ||||||
|   // leaving fullscreen mode. |   // leaving fullscreen mode. | ||||||
|   NSView* webView = web_contents()->GetNativeView().GetNativeNSView(); |   NSView* webView = web_contents()->GetNativeView(); | ||||||
|   NSInteger webViewWidth = NSWidth([webView bounds]); |   NSInteger webViewWidth = NSWidth([webView bounds]); | ||||||
|   NSInteger webViewHeight = NSHeight([webView bounds]); |   NSInteger webViewHeight = NSHeight([webView bounds]); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -194,9 +194,7 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|                 void* priv) { |                 void* priv) { | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   mate::Dictionary(isolate, exports) |   mate::Dictionary(isolate, exports) | ||||||
|       .Set("Debugger", Debugger::GetConstructor(isolate) |       .Set("Debugger", Debugger::GetConstructor(isolate)->GetFunction()); | ||||||
|                            ->GetFunction(context) |  | ||||||
|                            .ToLocalChecked()); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace
 | }  // namespace
 | ||||||
|  |  | ||||||
|  | @ -244,9 +244,8 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|                 void* priv) { |                 void* priv) { | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   mate::Dictionary(isolate, exports) |   mate::Dictionary(isolate, exports) | ||||||
|       .Set("DownloadItem", atom::api::DownloadItem::GetConstructor(isolate) |       .Set("DownloadItem", | ||||||
|                                ->GetFunction(context) |            atom::api::DownloadItem::GetConstructor(isolate)->GetFunction()); | ||||||
|                                .ToLocalChecked()); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace
 | }  // namespace
 | ||||||
|  |  | ||||||
|  | @ -132,9 +132,8 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set("inAppPurchase", InAppPurchase::Create(isolate)); |   dict.Set("inAppPurchase", InAppPurchase::Create(isolate)); | ||||||
|   dict.Set("InAppPurchase", InAppPurchase::GetConstructor(isolate) |   dict.Set("InAppPurchase", | ||||||
|                                 ->GetFunction(context) |            InAppPurchase::GetConstructor(isolate)->GetFunction()); | ||||||
|                                 .ToLocalChecked()); |  | ||||||
| #endif | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -233,9 +233,7 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   Menu::SetConstructor(isolate, base::Bind(&Menu::New)); |   Menu::SetConstructor(isolate, base::Bind(&Menu::New)); | ||||||
| 
 | 
 | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set( |   dict.Set("Menu", Menu::GetConstructor(isolate)->GetFunction()); | ||||||
|       "Menu", |  | ||||||
|       Menu::GetConstructor(isolate)->GetFunction(context).ToLocalChecked()); |  | ||||||
| #if defined(OS_MACOSX) | #if defined(OS_MACOSX) | ||||||
|   dict.SetMethod("setApplicationMenu", &Menu::SetApplicationMenu); |   dict.SetMethod("setApplicationMenu", &Menu::SetApplicationMenu); | ||||||
|   dict.SetMethod("sendActionToFirstResponder", |   dict.SetMethod("sendActionToFirstResponder", | ||||||
|  |  | ||||||
|  | @ -56,7 +56,7 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window, | ||||||
|                         base::Closure callback) { |                         base::Closure callback) { | ||||||
|   if (!native_window) |   if (!native_window) | ||||||
|     return; |     return; | ||||||
|   NSWindow* nswindow = native_window->GetNativeWindow().GetNativeNSWindow(); |   NSWindow* nswindow = native_window->GetNativeWindow(); | ||||||
| 
 | 
 | ||||||
|   auto close_callback = base::Bind( |   auto close_callback = base::Bind( | ||||||
|       &MenuMac::OnClosed, weak_factory_.GetWeakPtr(), window_id, callback); |       &MenuMac::OnClosed, weak_factory_.GetWeakPtr(), window_id, callback); | ||||||
|  | @ -99,7 +99,7 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window, | ||||||
| 
 | 
 | ||||||
|   [popup_controllers_[window_id] setCloseCallback:close_callback]; |   [popup_controllers_[window_id] setCloseCallback:close_callback]; | ||||||
|   // Make sure events can be pumped while the menu is up. |   // Make sure events can be pumped while the menu is up. | ||||||
|   base::MessageLoopCurrent::ScopedNestableTaskAllower allow; |   base::MessageLoop::ScopedNestableTaskAllower allow; | ||||||
| 
 | 
 | ||||||
|   // One of the events that could be pumped is |window.close()|. |   // One of the events that could be pumped is |window.close()|. | ||||||
|   // User-initiated event-tracking loops protect against this by |   // User-initiated event-tracking loops protect against this by | ||||||
|  |  | ||||||
|  | @ -31,9 +31,7 @@ void Net::BuildPrototype(v8::Isolate* isolate, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| v8::Local<v8::Value> Net::URLRequest(v8::Isolate* isolate) { | v8::Local<v8::Value> Net::URLRequest(v8::Isolate* isolate) { | ||||||
|   return URLRequest::GetConstructor(isolate) |   return URLRequest::GetConstructor(isolate)->GetFunction(); | ||||||
|       ->GetFunction(isolate->GetCurrentContext()) |  | ||||||
|       .ToLocalChecked(); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace api
 | }  // namespace api
 | ||||||
|  | @ -55,8 +53,7 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
| 
 | 
 | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set("net", Net::Create(isolate)); |   dict.Set("net", Net::Create(isolate)); | ||||||
|   dict.Set("Net", |   dict.Set("Net", Net::GetConstructor(isolate)->GetFunction()); | ||||||
|            Net::GetConstructor(isolate)->GetFunction(context).ToLocalChecked()); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace
 | }  // namespace
 | ||||||
|  |  | ||||||
|  | @ -263,9 +263,8 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   Notification::SetConstructor(isolate, base::Bind(&Notification::New)); |   Notification::SetConstructor(isolate, base::Bind(&Notification::New)); | ||||||
| 
 | 
 | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set("Notification", Notification::GetConstructor(isolate) |   dict.Set("Notification", | ||||||
|                                ->GetFunction(context) |            Notification::GetConstructor(isolate)->GetFunction()); | ||||||
|                                .ToLocalChecked()); |  | ||||||
| 
 | 
 | ||||||
|   dict.SetMethod("isSupported", &Notification::IsSupported); |   dict.SetMethod("isSupported", &Notification::IsSupported); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -141,9 +141,8 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set("powerMonitor", PowerMonitor::Create(isolate)); |   dict.Set("powerMonitor", PowerMonitor::Create(isolate)); | ||||||
|   dict.Set("PowerMonitor", PowerMonitor::GetConstructor(isolate) |   dict.Set("PowerMonitor", | ||||||
|                                ->GetFunction(context) |            PowerMonitor::GetConstructor(isolate)->GetFunction()); | ||||||
|                                .ToLocalChecked()); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace
 | }  // namespace
 | ||||||
|  |  | ||||||
|  | @ -164,9 +164,7 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set("screen", Screen::Create(isolate)); |   dict.Set("screen", Screen::Create(isolate)); | ||||||
|   dict.Set( |   dict.Set("Screen", Screen::GetConstructor(isolate)->GetFunction()); | ||||||
|       "Screen", |  | ||||||
|       Screen::GetConstructor(isolate)->GetFunction(context).ToLocalChecked()); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace
 | }  // namespace
 | ||||||
|  |  | ||||||
|  | @ -444,9 +444,10 @@ void Session::ClearStorageData(mate::Arguments* args) { | ||||||
|     // https://w3c.github.io/mediacapture-main/#dom-mediadeviceinfo-deviceid
 |     // https://w3c.github.io/mediacapture-main/#dom-mediadeviceinfo-deviceid
 | ||||||
|     MediaDeviceIDSalt::Reset(browser_context()->prefs()); |     MediaDeviceIDSalt::Reset(browser_context()->prefs()); | ||||||
|   } |   } | ||||||
|   storage_partition->ClearData(options.storage_types, options.quota_types, |   storage_partition->ClearData( | ||||||
|                                options.origin, base::Time(), base::Time::Max(), |       options.storage_types, options.quota_types, options.origin, | ||||||
|                                base::Bind(&OnClearStorageDataDone, callback)); |       content::StoragePartition::OriginMatcherFunction(), base::Time(), | ||||||
|  |       base::Time::Max(), base::Bind(&OnClearStorageDataDone, callback)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void Session::FlushStorageData() { | void Session::FlushStorageData() { | ||||||
|  | @ -804,12 +805,8 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|                 void* priv) { |                 void* priv) { | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set( |   dict.Set("Session", Session::GetConstructor(isolate)->GetFunction()); | ||||||
|       "Session", |   dict.Set("Cookies", Cookies::GetConstructor(isolate)->GetFunction()); | ||||||
|       Session::GetConstructor(isolate)->GetFunction(context).ToLocalChecked()); |  | ||||||
|   dict.Set( |  | ||||||
|       "Cookies", |  | ||||||
|       Cookies::GetConstructor(isolate)->GetFunction(context).ToLocalChecked()); |  | ||||||
|   dict.SetMethod("fromPartition", &FromPartition); |   dict.SetMethod("fromPartition", &FromPartition); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -121,9 +121,8 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set("systemPreferences", SystemPreferences::Create(isolate)); |   dict.Set("systemPreferences", SystemPreferences::Create(isolate)); | ||||||
|   dict.Set("SystemPreferences", SystemPreferences::GetConstructor(isolate) |   dict.Set("SystemPreferences", | ||||||
|                                     ->GetFunction(context) |            SystemPreferences::GetConstructor(isolate)->GetFunction()); | ||||||
|                                     .ToLocalChecked()); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace
 | }  // namespace
 | ||||||
|  |  | ||||||
|  | @ -1179,9 +1179,8 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   TopLevelWindow::SetConstructor(isolate, base::Bind(&TopLevelWindow::New)); |   TopLevelWindow::SetConstructor(isolate, base::Bind(&TopLevelWindow::New)); | ||||||
| 
 | 
 | ||||||
|   mate::Dictionary constructor(isolate, TopLevelWindow::GetConstructor(isolate) |   mate::Dictionary constructor( | ||||||
|                                             ->GetFunction(context) |       isolate, TopLevelWindow::GetConstructor(isolate)->GetFunction()); | ||||||
|                                             .ToLocalChecked()); |  | ||||||
|   constructor.SetMethod("fromId", |   constructor.SetMethod("fromId", | ||||||
|                         &mate::TrackableObject<TopLevelWindow>::FromWeakMapID); |                         &mate::TrackableObject<TopLevelWindow>::FromWeakMapID); | ||||||
|   constructor.SetMethod("getAllWindows", |   constructor.SetMethod("getAllWindows", | ||||||
|  |  | ||||||
|  | @ -254,9 +254,7 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   Tray::SetConstructor(isolate, base::Bind(&Tray::New)); |   Tray::SetConstructor(isolate, base::Bind(&Tray::New)); | ||||||
| 
 | 
 | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set( |   dict.Set("Tray", Tray::GetConstructor(isolate)->GetFunction()); | ||||||
|       "Tray", |  | ||||||
|       Tray::GetConstructor(isolate)->GetFunction(context).ToLocalChecked()); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace
 | }  // namespace
 | ||||||
|  |  | ||||||
|  | @ -76,9 +76,8 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   View::SetConstructor(isolate, base::Bind(&View::New)); |   View::SetConstructor(isolate, base::Bind(&View::New)); | ||||||
| 
 | 
 | ||||||
|   mate::Dictionary constructor( |   mate::Dictionary constructor(isolate, | ||||||
|       isolate, |                                View::GetConstructor(isolate)->GetFunction()); | ||||||
|       View::GetConstructor(isolate)->GetFunction(context).ToLocalChecked()); |  | ||||||
| 
 | 
 | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set("View", constructor); |   dict.Set("View", constructor); | ||||||
|  |  | ||||||
|  | @ -47,7 +47,6 @@ | ||||||
| #include "atom/common/native_mate_converters/value_converter.h" | #include "atom/common/native_mate_converters/value_converter.h" | ||||||
| #include "atom/common/options_switches.h" | #include "atom/common/options_switches.h" | ||||||
| #include "base/message_loop/message_loop.h" | #include "base/message_loop/message_loop.h" | ||||||
| #include "base/no_destructor.h" |  | ||||||
| #include "base/strings/utf_string_conversions.h" | #include "base/strings/utf_string_conversions.h" | ||||||
| #include "base/threading/thread_restrictions.h" | #include "base/threading/thread_restrictions.h" | ||||||
| #include "base/threading/thread_task_runner_handle.h" | #include "base/threading/thread_task_runner_handle.h" | ||||||
|  | @ -241,7 +240,7 @@ namespace api { | ||||||
| namespace { | namespace { | ||||||
| 
 | 
 | ||||||
| content::ServiceWorkerContext* GetServiceWorkerContext( | content::ServiceWorkerContext* GetServiceWorkerContext( | ||||||
|     content::WebContents* web_contents) { |     const content::WebContents* web_contents) { | ||||||
|   auto* context = web_contents->GetBrowserContext(); |   auto* context = web_contents->GetBrowserContext(); | ||||||
|   auto* site_instance = web_contents->GetSiteInstance(); |   auto* site_instance = web_contents->GetSiteInstance(); | ||||||
|   if (!context || !site_instance) |   if (!context || !site_instance) | ||||||
|  | @ -422,14 +421,15 @@ void WebContents::InitWithSessionAndOptions( | ||||||
| 
 | 
 | ||||||
| #if defined(OS_LINUX) || defined(OS_WIN) | #if defined(OS_LINUX) || defined(OS_WIN) | ||||||
|   // Update font settings.
 |   // Update font settings.
 | ||||||
|   static const base::NoDestructor<gfx::FontRenderParams> params( |   CR_DEFINE_STATIC_LOCAL( | ||||||
|       gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr)); |       const gfx::FontRenderParams, params, | ||||||
|   prefs->should_antialias_text = params->antialiasing; |       (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr))); | ||||||
|   prefs->use_subpixel_positioning = params->subpixel_positioning; |   prefs->should_antialias_text = params.antialiasing; | ||||||
|   prefs->hinting = params->hinting; |   prefs->use_subpixel_positioning = params.subpixel_positioning; | ||||||
|   prefs->use_autohinter = params->autohinter; |   prefs->hinting = params.hinting; | ||||||
|   prefs->use_bitmaps = params->use_bitmaps; |   prefs->use_autohinter = params.autohinter; | ||||||
|   prefs->subpixel_rendering = params->subpixel_rendering; |   prefs->use_bitmaps = params.use_bitmaps; | ||||||
|  |   prefs->subpixel_rendering = params.subpixel_rendering; | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|   // Save the preferences in C++.
 |   // Save the preferences in C++.
 | ||||||
|  | @ -470,9 +470,9 @@ WebContents::~WebContents() { | ||||||
|     RenderViewDeleted(web_contents()->GetRenderViewHost()); |     RenderViewDeleted(web_contents()->GetRenderViewHost()); | ||||||
| 
 | 
 | ||||||
|     if (type_ == WEB_VIEW) { |     if (type_ == WEB_VIEW) { | ||||||
|       DCHECK(!web_contents()->GetOuterWebContents()) |  | ||||||
|           << "Should never manually destroy an attached webview"; |  | ||||||
|       // For webview simply destroy the WebContents immediately.
 |       // For webview simply destroy the WebContents immediately.
 | ||||||
|  |       // TODO(zcbenz): Add an internal API for webview instead of using
 | ||||||
|  |       // destroy(), so we don't have to add a special branch here.
 | ||||||
|       DestroyWebContents(false /* async */); |       DestroyWebContents(false /* async */); | ||||||
|     } else if (type_ == BROWSER_WINDOW && owner_window()) { |     } else if (type_ == BROWSER_WINDOW && owner_window()) { | ||||||
|       // For BrowserWindow we should close the window and clean up everything
 |       // For BrowserWindow we should close the window and clean up everything
 | ||||||
|  | @ -617,15 +617,15 @@ void WebContents::UpdateTargetURL(content::WebContents* source, | ||||||
|   Emit("update-target-url", url); |   Emit("update-target-url", url); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool WebContents::HandleKeyboardEvent( | void WebContents::HandleKeyboardEvent( | ||||||
|     content::WebContents* source, |     content::WebContents* source, | ||||||
|     const content::NativeWebKeyboardEvent& event) { |     const content::NativeWebKeyboardEvent& event) { | ||||||
|   if (type_ == WEB_VIEW && embedder_) { |   if (type_ == WEB_VIEW && embedder_) { | ||||||
|     // Send the unhandled keyboard events back to the embedder.
 |     // Send the unhandled keyboard events back to the embedder.
 | ||||||
|     return embedder_->HandleKeyboardEvent(source, event); |     embedder_->HandleKeyboardEvent(source, event); | ||||||
|   } else { |   } else { | ||||||
|     // Go to the default keyboard handling.
 |     // Go to the default keyboard handling.
 | ||||||
|     return CommonWebContentsDelegate::HandleKeyboardEvent(source, event); |     CommonWebContentsDelegate::HandleKeyboardEvent(source, event); | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -1129,7 +1129,7 @@ void WebContents::NavigationEntryCommitted( | ||||||
| void WebContents::SetBackgroundThrottling(bool allowed) { | void WebContents::SetBackgroundThrottling(bool allowed) { | ||||||
|   background_throttling_ = allowed; |   background_throttling_ = allowed; | ||||||
| 
 | 
 | ||||||
|   auto* contents = web_contents(); |   const auto* contents = web_contents(); | ||||||
|   if (!contents) { |   if (!contents) { | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
|  | @ -1188,9 +1188,8 @@ void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) { | ||||||
|   if (!options.Get("httpReferrer", ¶ms.referrer)) { |   if (!options.Get("httpReferrer", ¶ms.referrer)) { | ||||||
|     GURL http_referrer; |     GURL http_referrer; | ||||||
|     if (options.Get("httpReferrer", &http_referrer)) |     if (options.Get("httpReferrer", &http_referrer)) | ||||||
|       params.referrer = |       params.referrer = content::Referrer(http_referrer.GetAsReferrer(), | ||||||
|           content::Referrer(http_referrer.GetAsReferrer(), |                                           blink::kWebReferrerPolicyDefault); | ||||||
|                             network::mojom::ReferrerPolicy::kDefault); |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   std::string user_agent; |   std::string user_agent; | ||||||
|  | @ -1794,7 +1793,7 @@ void WebContents::StartDrag(const mate::Dictionary& item, | ||||||
| 
 | 
 | ||||||
|   // Start dragging.
 |   // Start dragging.
 | ||||||
|   if (!files.empty()) { |   if (!files.empty()) { | ||||||
|     base::MessageLoopCurrent::ScopedNestableTaskAllower allow; |     base::MessageLoop::ScopedNestableTaskAllower allow; | ||||||
|     DragFileItems(files, icon->image(), web_contents()->GetNativeView()); |     DragFileItems(files, icon->image(), web_contents()->GetNativeView()); | ||||||
|   } else { |   } else { | ||||||
|     args->ThrowError("Must specify either 'file' or 'files' option"); |     args->ThrowError("Must specify either 'file' or 'files' option"); | ||||||
|  | @ -2150,7 +2149,6 @@ void WebContents::BuildPrototype(v8::Isolate* isolate, | ||||||
|       .SetMethod("startDrag", &WebContents::StartDrag) |       .SetMethod("startDrag", &WebContents::StartDrag) | ||||||
|       .SetMethod("isGuest", &WebContents::IsGuest) |       .SetMethod("isGuest", &WebContents::IsGuest) | ||||||
|       .SetMethod("attachToIframe", &WebContents::AttachToIframe) |       .SetMethod("attachToIframe", &WebContents::AttachToIframe) | ||||||
|       .SetMethod("detachFromOuterFrame", &WebContents::DetachFromOuterFrame) |  | ||||||
|       .SetMethod("isOffscreen", &WebContents::IsOffScreen) |       .SetMethod("isOffscreen", &WebContents::IsOffScreen) | ||||||
| #if BUILDFLAG(ENABLE_OSR) | #if BUILDFLAG(ENABLE_OSR) | ||||||
|       .SetMethod("startPainting", &WebContents::StartPainting) |       .SetMethod("startPainting", &WebContents::StartPainting) | ||||||
|  | @ -2286,9 +2284,7 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|                 void* priv) { |                 void* priv) { | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set("WebContents", WebContents::GetConstructor(isolate) |   dict.Set("WebContents", WebContents::GetConstructor(isolate)->GetFunction()); | ||||||
|                               ->GetFunction(context) |  | ||||||
|                               .ToLocalChecked()); |  | ||||||
|   dict.SetMethod("create", &WebContents::Create); |   dict.SetMethod("create", &WebContents::Create); | ||||||
|   dict.SetMethod("fromId", &mate::TrackableObject<WebContents>::FromWeakMapID); |   dict.SetMethod("fromId", &mate::TrackableObject<WebContents>::FromWeakMapID); | ||||||
|   dict.SetMethod("getAllWebContents", |   dict.SetMethod("getAllWebContents", | ||||||
|  |  | ||||||
|  | @ -242,7 +242,6 @@ class WebContents : public mate::TrackableObject<WebContents>, | ||||||
|   bool IsGuest() const; |   bool IsGuest() const; | ||||||
|   void AttachToIframe(content::WebContents* embedder_web_contents, |   void AttachToIframe(content::WebContents* embedder_web_contents, | ||||||
|                       int embedder_frame_id); |                       int embedder_frame_id); | ||||||
|   void DetachFromOuterFrame(); |  | ||||||
| 
 | 
 | ||||||
|   // Methods for offscreen rendering
 |   // Methods for offscreen rendering
 | ||||||
|   bool IsOffScreen() const; |   bool IsOffScreen() const; | ||||||
|  | @ -363,7 +362,7 @@ class WebContents : public mate::TrackableObject<WebContents>, | ||||||
|   void CloseContents(content::WebContents* source) override; |   void CloseContents(content::WebContents* source) override; | ||||||
|   void ActivateContents(content::WebContents* contents) override; |   void ActivateContents(content::WebContents* contents) override; | ||||||
|   void UpdateTargetURL(content::WebContents* source, const GURL& url) override; |   void UpdateTargetURL(content::WebContents* source, const GURL& url) override; | ||||||
|   bool HandleKeyboardEvent( |   void HandleKeyboardEvent( | ||||||
|       content::WebContents* source, |       content::WebContents* source, | ||||||
|       const content::NativeWebKeyboardEvent& event) override; |       const content::NativeWebKeyboardEvent& event) override; | ||||||
|   content::KeyboardEventProcessingResult PreHandleKeyboardEvent( |   content::KeyboardEventProcessingResult PreHandleKeyboardEvent( | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ bool WebContents::IsFocused() const { | ||||||
|     return false; |     return false; | ||||||
| 
 | 
 | ||||||
|   if (GetType() != BACKGROUND_PAGE) { |   if (GetType() != BACKGROUND_PAGE) { | ||||||
|     auto window = [web_contents()->GetNativeView().GetNativeNSView() window]; |     auto window = [web_contents()->GetNativeView() window]; | ||||||
|     // On Mac the render widget host view does not lose focus when the window |     // On Mac the render widget host view does not lose focus when the window | ||||||
|     // loses focus so check if the top level window is the key window. |     // loses focus so check if the top level window is the key window. | ||||||
|     if (window && ![window isKeyWindow]) |     if (window && ![window isKeyWindow]) | ||||||
|  |  | ||||||
|  | @ -4,12 +4,9 @@ | ||||||
| 
 | 
 | ||||||
| #include "atom/browser/api/atom_api_web_contents.h" | #include "atom/browser/api/atom_api_web_contents.h" | ||||||
| 
 | 
 | ||||||
| #include "content/browser/web_contents/web_contents_impl.h" |  | ||||||
| 
 |  | ||||||
| #if BUILDFLAG(ENABLE_OSR) |  | ||||||
| #include "atom/browser/osr/osr_render_widget_host_view.h" | #include "atom/browser/osr/osr_render_widget_host_view.h" | ||||||
| #include "atom/browser/osr/osr_web_contents_view.h" | #include "atom/browser/osr/osr_web_contents_view.h" | ||||||
| #endif | #include "content/browser/web_contents/web_contents_impl.h" | ||||||
| 
 | 
 | ||||||
| // Including both web_contents_impl.h and node.h would introduce a error, we
 | // Including both web_contents_impl.h and node.h would introduce a error, we
 | ||||||
| // have to isolate the usage of WebContentsImpl into a clean file to fix it:
 | // have to isolate the usage of WebContentsImpl into a clean file to fix it:
 | ||||||
|  | @ -19,13 +16,6 @@ namespace atom { | ||||||
| 
 | 
 | ||||||
| namespace api { | namespace api { | ||||||
| 
 | 
 | ||||||
| void WebContents::DetachFromOuterFrame() { |  | ||||||
|   // See detach_webview_frame.patch on how to detach.
 |  | ||||||
|   auto* impl = static_cast<content::WebContentsImpl*>(web_contents()); |  | ||||||
|   impl->GetRenderManagerForTesting()->RemoveOuterDelegateFrame(); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| #if BUILDFLAG(ENABLE_OSR) |  | ||||||
| OffScreenWebContentsView* WebContents::GetOffScreenWebContentsView() const { | OffScreenWebContentsView* WebContents::GetOffScreenWebContentsView() const { | ||||||
|   if (IsOffScreen()) { |   if (IsOffScreen()) { | ||||||
|     const auto* impl = |     const auto* impl = | ||||||
|  | @ -45,7 +35,6 @@ OffScreenRenderWidgetHostView* WebContents::GetOffScreenRenderWidgetHostView() | ||||||
|     return nullptr; |     return nullptr; | ||||||
|   } |   } | ||||||
| } | } | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
| }  // namespace api
 | }  // namespace api
 | ||||||
| 
 | 
 | ||||||
|  | @ -35,8 +35,7 @@ v8::Local<v8::Object> CreateEventObject(v8::Isolate* isolate) { | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   return v8::Local<v8::ObjectTemplate>::New(isolate, event_template) |   return v8::Local<v8::ObjectTemplate>::New(isolate, event_template) | ||||||
|       ->NewInstance(isolate->GetCurrentContext()) |       ->NewInstance(); | ||||||
|       .ToLocalChecked(); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace
 | }  // namespace
 | ||||||
|  |  | ||||||
|  | @ -95,7 +95,6 @@ | ||||||
| #endif  // BUILDFLAG(OVERRIDE_LOCATION_PROVIDER)
 | #endif  // BUILDFLAG(OVERRIDE_LOCATION_PROVIDER)
 | ||||||
| 
 | 
 | ||||||
| #if BUILDFLAG(ENABLE_TTS) | #if BUILDFLAG(ENABLE_TTS) | ||||||
| #include "chrome/browser/speech/tts_controller_delegate_impl.h" |  | ||||||
| #include "chrome/browser/speech/tts_message_filter.h" | #include "chrome/browser/speech/tts_message_filter.h" | ||||||
| #endif  // BUILDFLAG(ENABLE_TTS)
 | #endif  // BUILDFLAG(ENABLE_TTS)
 | ||||||
| 
 | 
 | ||||||
|  | @ -159,6 +158,8 @@ AtomBrowserClient* AtomBrowserClient::Get() { | ||||||
| 
 | 
 | ||||||
| // static
 | // static
 | ||||||
| void AtomBrowserClient::SetApplicationLocale(const std::string& locale) { | void AtomBrowserClient::SetApplicationLocale(const std::string& locale) { | ||||||
|  |   DCHECK_CURRENTLY_ON(BrowserThread::UI); | ||||||
|  | 
 | ||||||
|   if (!BrowserThread::IsThreadInitialized(BrowserThread::IO) || |   if (!BrowserThread::IsThreadInitialized(BrowserThread::IO) || | ||||||
|       !base::PostTaskWithTraits( |       !base::PostTaskWithTraits( | ||||||
|           FROM_HERE, {BrowserThread::IO}, |           FROM_HERE, {BrowserThread::IO}, | ||||||
|  | @ -367,14 +368,6 @@ AtomBrowserClient::CreateSpeechRecognitionManagerDelegate() { | ||||||
|   return new AtomSpeechRecognitionManagerDelegate; |   return new AtomSpeechRecognitionManagerDelegate; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| content::TtsControllerDelegate* AtomBrowserClient::GetTtsControllerDelegate() { |  | ||||||
| #if BUILDFLAG(ENABLE_TTS) |  | ||||||
|   return TtsControllerDelegateImpl::GetInstance(); |  | ||||||
| #else |  | ||||||
|   return nullptr; |  | ||||||
| #endif |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void AtomBrowserClient::OverrideWebkitPrefs(content::RenderViewHost* host, | void AtomBrowserClient::OverrideWebkitPrefs(content::RenderViewHost* host, | ||||||
|                                             content::WebPreferences* prefs) { |                                             content::WebPreferences* prefs) { | ||||||
|   prefs->javascript_enabled = true; |   prefs->javascript_enabled = true; | ||||||
|  | @ -543,17 +536,6 @@ AtomBrowserClient::CreateQuotaPermissionContext() { | ||||||
|   return new AtomQuotaPermissionContext; |   return new AtomQuotaPermissionContext; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| content::GeneratedCodeCacheSettings |  | ||||||
| AtomBrowserClient::GetGeneratedCodeCacheSettings( |  | ||||||
|     content::BrowserContext* context) { |  | ||||||
|   // TODO(deepak1556): Use platform cache directory.
 |  | ||||||
|   base::FilePath cache_path = context->GetPath(); |  | ||||||
|   // If we pass 0 for size, disk_cache will pick a default size using the
 |  | ||||||
|   // heuristics based on available disk size. These are implemented in
 |  | ||||||
|   // disk_cache::PreferredCacheSize in net/disk_cache/cache_util.cc.
 |  | ||||||
|   return content::GeneratedCodeCacheSettings(true, 0, cache_path); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void AtomBrowserClient::AllowCertificateError( | void AtomBrowserClient::AllowCertificateError( | ||||||
|     content::WebContents* web_contents, |     content::WebContents* web_contents, | ||||||
|     int cert_error, |     int cert_error, | ||||||
|  | @ -822,9 +804,7 @@ bool AtomBrowserClient::HandleExternalProtocol( | ||||||
|     content::NavigationUIData* navigation_data, |     content::NavigationUIData* navigation_data, | ||||||
|     bool is_main_frame, |     bool is_main_frame, | ||||||
|     ui::PageTransition page_transition, |     ui::PageTransition page_transition, | ||||||
|     bool has_user_gesture, |     bool has_user_gesture) { | ||||||
|     const std::string& method, |  | ||||||
|     const net::HttpRequestHeaders& headers) { |  | ||||||
|   base::PostTaskWithTraits( |   base::PostTaskWithTraits( | ||||||
|       FROM_HERE, {BrowserThread::UI}, |       FROM_HERE, {BrowserThread::UI}, | ||||||
|       base::BindOnce(&HandleExternalProtocolInUI, url, web_contents_getter, |       base::BindOnce(&HandleExternalProtocolInUI, url, web_contents_getter, | ||||||
|  |  | ||||||
|  | @ -74,7 +74,6 @@ class AtomBrowserClient : public content::ContentBrowserClient, | ||||||
|       service_manager::mojom::ServiceRequest* service_request) override; |       service_manager::mojom::ServiceRequest* service_request) override; | ||||||
|   content::SpeechRecognitionManagerDelegate* |   content::SpeechRecognitionManagerDelegate* | ||||||
|   CreateSpeechRecognitionManagerDelegate() override; |   CreateSpeechRecognitionManagerDelegate() override; | ||||||
|   content::TtsControllerDelegate* GetTtsControllerDelegate() override; |  | ||||||
|   void OverrideWebkitPrefs(content::RenderViewHost* render_view_host, |   void OverrideWebkitPrefs(content::RenderViewHost* render_view_host, | ||||||
|                            content::WebPreferences* prefs) override; |                            content::WebPreferences* prefs) override; | ||||||
|   SiteInstanceForNavigationType ShouldOverrideSiteInstanceForNavigation( |   SiteInstanceForNavigationType ShouldOverrideSiteInstanceForNavigation( | ||||||
|  | @ -92,8 +91,6 @@ class AtomBrowserClient : public content::ContentBrowserClient, | ||||||
|   void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override; |   void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override; | ||||||
|   std::string GetGeolocationApiKey() override; |   std::string GetGeolocationApiKey() override; | ||||||
|   content::QuotaPermissionContext* CreateQuotaPermissionContext() override; |   content::QuotaPermissionContext* CreateQuotaPermissionContext() override; | ||||||
|   content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings( |  | ||||||
|       content::BrowserContext* context) override; |  | ||||||
|   void AllowCertificateError( |   void AllowCertificateError( | ||||||
|       content::WebContents* web_contents, |       content::WebContents* web_contents, | ||||||
|       int cert_error, |       int cert_error, | ||||||
|  | @ -168,9 +165,7 @@ class AtomBrowserClient : public content::ContentBrowserClient, | ||||||
|       content::NavigationUIData* navigation_data, |       content::NavigationUIData* navigation_data, | ||||||
|       bool is_main_frame, |       bool is_main_frame, | ||||||
|       ui::PageTransition page_transition, |       ui::PageTransition page_transition, | ||||||
|       bool has_user_gesture, |       bool has_user_gesture) override; | ||||||
|       const std::string& method, |  | ||||||
|       const net::HttpRequestHeaders& headers) override; |  | ||||||
| 
 | 
 | ||||||
|  private: |  private: | ||||||
|   struct ProcessPreferences { |   struct ProcessPreferences { | ||||||
|  |  | ||||||
|  | @ -191,6 +191,11 @@ base::FilePath AtomBrowserContext::GetPath() const { | ||||||
|   return path_; |   return path_; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | base::FilePath AtomBrowserContext::GetCachePath() const { | ||||||
|  |   // TODO(deepak1556): Use platform cache directory.
 | ||||||
|  |   return path_; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| bool AtomBrowserContext::IsOffTheRecord() const { | bool AtomBrowserContext::IsOffTheRecord() const { | ||||||
|   return in_memory_; |   return in_memory_; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -60,6 +60,7 @@ class AtomBrowserContext | ||||||
| 
 | 
 | ||||||
|   // content::BrowserContext:
 |   // content::BrowserContext:
 | ||||||
|   base::FilePath GetPath() const override; |   base::FilePath GetPath() const override; | ||||||
|  |   base::FilePath GetCachePath() const override; | ||||||
|   bool IsOffTheRecord() const override; |   bool IsOffTheRecord() const override; | ||||||
|   content::ResourceContext* GetResourceContext() override; |   content::ResourceContext* GetResourceContext() override; | ||||||
|   std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate( |   std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate( | ||||||
|  |  | ||||||
|  | @ -47,7 +47,9 @@ | ||||||
| #include "services/device/public/mojom/constants.mojom.h" | #include "services/device/public/mojom/constants.mojom.h" | ||||||
| #include "services/service_manager/public/cpp/connector.h" | #include "services/service_manager/public/cpp/connector.h" | ||||||
| #include "ui/base/idle/idle.h" | #include "ui/base/idle/idle.h" | ||||||
|  | #include "ui/base/l10n/l10n_util.h" | ||||||
| #include "ui/base/material_design/material_design_controller.h" | #include "ui/base/material_design/material_design_controller.h" | ||||||
|  | #include "ui/base/resource/resource_bundle.h" | ||||||
| #include "ui/base/ui_base_switches.h" | #include "ui/base/ui_base_switches.h" | ||||||
| 
 | 
 | ||||||
| #if defined(USE_AURA) | #if defined(USE_AURA) | ||||||
|  | @ -71,7 +73,6 @@ | ||||||
| 
 | 
 | ||||||
| #if defined(OS_WIN) | #if defined(OS_WIN) | ||||||
| #include "ui/base/cursor/cursor_loader_win.h" | #include "ui/base/cursor/cursor_loader_win.h" | ||||||
| #include "ui/base/l10n/l10n_util.h" |  | ||||||
| #include "ui/base/l10n/l10n_util_win.h" | #include "ui/base/l10n/l10n_util_win.h" | ||||||
| #include "ui/display/win/dpi.h" | #include "ui/display/win/dpi.h" | ||||||
| #include "ui/gfx/platform_font_win.h" | #include "ui/gfx/platform_font_win.h" | ||||||
|  | @ -354,6 +355,9 @@ int AtomBrowserMainParts::PreCreateThreads() { | ||||||
|     layout_provider_.reset(new views::LayoutProvider()); |     layout_provider_.reset(new views::LayoutProvider()); | ||||||
| 
 | 
 | ||||||
|   // Initialize the app locale.
 |   // Initialize the app locale.
 | ||||||
|  |   AtomBrowserClient::SetApplicationLocale( | ||||||
|  |       l10n_util::GetApplicationLocale(custom_locale_)); | ||||||
|  | 
 | ||||||
|   fake_browser_process_->SetApplicationLocale( |   fake_browser_process_->SetApplicationLocale( | ||||||
|       AtomBrowserClient::Get()->GetApplicationLocale()); |       AtomBrowserClient::Get()->GetApplicationLocale()); | ||||||
| 
 | 
 | ||||||
|  | @ -509,6 +513,29 @@ void AtomBrowserMainParts::PreMainMessageLoopStart() { | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| void AtomBrowserMainParts::PreMainMessageLoopStartCommon() { | void AtomBrowserMainParts::PreMainMessageLoopStartCommon() { | ||||||
|  |   // Initialize ui::ResourceBundle.
 | ||||||
|  |   ui::ResourceBundle::InitSharedInstanceWithLocale( | ||||||
|  |       "", nullptr, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES); | ||||||
|  |   auto* cmd_line = base::CommandLine::ForCurrentProcess(); | ||||||
|  |   if (cmd_line->HasSwitch(switches::kLang)) { | ||||||
|  |     const std::string locale = cmd_line->GetSwitchValueASCII(switches::kLang); | ||||||
|  |     const base::FilePath locale_file_path = | ||||||
|  |         ui::ResourceBundle::GetSharedInstance().GetLocaleFilePath(locale, true); | ||||||
|  |     if (!locale_file_path.empty()) { | ||||||
|  |       custom_locale_ = locale; | ||||||
|  | #if defined(OS_LINUX) | ||||||
|  |       /* When built with USE_GLIB, libcc's GetApplicationLocaleInternal() uses
 | ||||||
|  |        * glib's g_get_language_names(), which keys off of getenv("LC_ALL") */ | ||||||
|  |       g_setenv("LC_ALL", custom_locale_.c_str(), TRUE); | ||||||
|  | #endif | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  | #if defined(OS_MACOSX) | ||||||
|  |   if (custom_locale_.empty()) | ||||||
|  |     l10n_util::OverrideLocaleWithCocoaLocale(); | ||||||
|  | #endif | ||||||
|  |   LoadResourceBundle(custom_locale_); | ||||||
| #if defined(OS_MACOSX) | #if defined(OS_MACOSX) | ||||||
|   InitializeMainNib(); |   InitializeMainNib(); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -112,6 +112,7 @@ class AtomBrowserMainParts : public content::BrowserMainParts { | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|   std::unique_ptr<views::LayoutProvider> layout_provider_; |   std::unique_ptr<views::LayoutProvider> layout_provider_; | ||||||
|  |   std::string custom_locale_; | ||||||
| 
 | 
 | ||||||
|   // A fake BrowserProcess object that used to feed the source code from chrome.
 |   // A fake BrowserProcess object that used to feed the source code from chrome.
 | ||||||
|   std::unique_ptr<BrowserProcessImpl> fake_browser_process_; |   std::unique_ptr<BrowserProcessImpl> fake_browser_process_; | ||||||
|  |  | ||||||
|  | @ -325,7 +325,7 @@ std::string Browser::DockGetBadgeText() { | ||||||
| 
 | 
 | ||||||
| void Browser::DockHide() { | void Browser::DockHide() { | ||||||
|   for (auto* const& window : WindowList::GetWindows()) |   for (auto* const& window : WindowList::GetWindows()) | ||||||
|     [window->GetNativeWindow().GetNativeNSWindow() setCanHide:NO]; |     [window->GetNativeWindow() setCanHide:NO]; | ||||||
| 
 | 
 | ||||||
|   ProcessSerialNumber psn = {0, kCurrentProcess}; |   ProcessSerialNumber psn = {0, kCurrentProcess}; | ||||||
|   TransformProcessType(&psn, kProcessTransformToUIElementApplication); |   TransformProcessType(&psn, kProcessTransformToUIElementApplication); | ||||||
|  |  | ||||||
|  | @ -258,7 +258,7 @@ BrowserProcessImpl::safe_browsing_detection_service() { | ||||||
|   return nullptr; |   return nullptr; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| subresource_filter::RulesetService* | subresource_filter::ContentRulesetService* | ||||||
| BrowserProcessImpl::subresource_filter_ruleset_service() { | BrowserProcessImpl::subresource_filter_ruleset_service() { | ||||||
|   return nullptr; |   return nullptr; | ||||||
| } | } | ||||||
|  | @ -299,11 +299,6 @@ gcm::GCMDriver* BrowserProcessImpl::gcm_driver() { | ||||||
|   return nullptr; |   return nullptr; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| resource_coordinator::ResourceCoordinatorParts* |  | ||||||
| BrowserProcessImpl::resource_coordinator_parts() { |  | ||||||
|   return nullptr; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| resource_coordinator::TabManager* BrowserProcessImpl::GetTabManager() { | resource_coordinator::TabManager* BrowserProcessImpl::GetTabManager() { | ||||||
|   return nullptr; |   return nullptr; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -86,8 +86,8 @@ class BrowserProcessImpl : public BrowserProcess { | ||||||
|   safe_browsing::SafeBrowsingService* safe_browsing_service() override; |   safe_browsing::SafeBrowsingService* safe_browsing_service() override; | ||||||
|   safe_browsing::ClientSideDetectionService* safe_browsing_detection_service() |   safe_browsing::ClientSideDetectionService* safe_browsing_detection_service() | ||||||
|       override; |       override; | ||||||
|   subresource_filter::RulesetService* subresource_filter_ruleset_service() |   subresource_filter::ContentRulesetService* | ||||||
|       override; |   subresource_filter_ruleset_service() override; | ||||||
|   optimization_guide::OptimizationGuideService* optimization_guide_service() |   optimization_guide::OptimizationGuideService* optimization_guide_service() | ||||||
|       override; |       override; | ||||||
|   net_log::ChromeNetLog* net_log() override; |   net_log::ChromeNetLog* net_log() override; | ||||||
|  | @ -98,8 +98,6 @@ class BrowserProcessImpl : public BrowserProcess { | ||||||
|   WebRtcLogUploader* webrtc_log_uploader() override; |   WebRtcLogUploader* webrtc_log_uploader() override; | ||||||
|   network_time::NetworkTimeTracker* network_time_tracker() override; |   network_time::NetworkTimeTracker* network_time_tracker() override; | ||||||
|   gcm::GCMDriver* gcm_driver() override; |   gcm::GCMDriver* gcm_driver() override; | ||||||
|   resource_coordinator::ResourceCoordinatorParts* resource_coordinator_parts() |  | ||||||
|       override; |  | ||||||
|   resource_coordinator::TabManager* GetTabManager() override; |   resource_coordinator::TabManager* GetTabManager() override; | ||||||
|   shell_integration::DefaultWebClientState CachedDefaultWebClientState() |   shell_integration::DefaultWebClientState CachedDefaultWebClientState() | ||||||
|       override; |       override; | ||||||
|  |  | ||||||
|  | @ -20,7 +20,6 @@ | ||||||
| #include "base/files/file_util.h" | #include "base/files/file_util.h" | ||||||
| #include "base/json/json_reader.h" | #include "base/json/json_reader.h" | ||||||
| #include "base/task/post_task.h" | #include "base/task/post_task.h" | ||||||
| #include "base/threading/scoped_blocking_call.h" |  | ||||||
| #include "base/threading/sequenced_task_runner_handle.h" | #include "base/threading/sequenced_task_runner_handle.h" | ||||||
| #include "chrome/browser/ssl/security_state_tab_helper.h" | #include "chrome/browser/ssl/security_state_tab_helper.h" | ||||||
| #include "chrome/browser/ui/browser_dialogs.h" | #include "chrome/browser/ui/browser_dialogs.h" | ||||||
|  | @ -122,14 +121,14 @@ std::unique_ptr<base::DictionaryValue> CreateFileSystemValue( | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void WriteToFile(const base::FilePath& path, const std::string& content) { | void WriteToFile(const base::FilePath& path, const std::string& content) { | ||||||
|   base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::WILL_BLOCK); |   base::AssertBlockingAllowed(); | ||||||
|   DCHECK(!path.empty()); |   DCHECK(!path.empty()); | ||||||
| 
 | 
 | ||||||
|   base::WriteFile(path, content.data(), content.size()); |   base::WriteFile(path, content.data(), content.size()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void AppendToFile(const base::FilePath& path, const std::string& content) { | void AppendToFile(const base::FilePath& path, const std::string& content) { | ||||||
|   base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::WILL_BLOCK); |   base::AssertBlockingAllowed(); | ||||||
|   DCHECK(!path.empty()); |   DCHECK(!path.empty()); | ||||||
| 
 | 
 | ||||||
|   base::AppendToFile(path, content.data(), content.size()); |   base::AppendToFile(path, content.data(), content.size()); | ||||||
|  |  | ||||||
|  | @ -100,7 +100,7 @@ class CommonWebContentsDelegate : public content::WebContentsDelegate, | ||||||
|       content::WebContents* web_contents, |       content::WebContents* web_contents, | ||||||
|       content::SecurityStyleExplanations* explanations) override; |       content::SecurityStyleExplanations* explanations) override; | ||||||
|   bool TakeFocus(content::WebContents* source, bool reverse) override; |   bool TakeFocus(content::WebContents* source, bool reverse) override; | ||||||
|   bool HandleKeyboardEvent( |   void HandleKeyboardEvent( | ||||||
|       content::WebContents* source, |       content::WebContents* source, | ||||||
|       const content::NativeWebKeyboardEvent& event) override; |       const content::NativeWebKeyboardEvent& event) override; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -17,40 +17,33 @@ | ||||||
| 
 | 
 | ||||||
| namespace atom { | namespace atom { | ||||||
| 
 | 
 | ||||||
| bool CommonWebContentsDelegate::HandleKeyboardEvent( | void CommonWebContentsDelegate::HandleKeyboardEvent( | ||||||
|     content::WebContents* source, |     content::WebContents* source, | ||||||
|     const content::NativeWebKeyboardEvent& event) { |     const content::NativeWebKeyboardEvent& event) { | ||||||
|   if (event.skip_in_browser || |   if (event.skip_in_browser || | ||||||
|       event.GetType() == content::NativeWebKeyboardEvent::kChar) |       event.GetType() == content::NativeWebKeyboardEvent::kChar) | ||||||
|     return false; |     return; | ||||||
| 
 | 
 | ||||||
|   // Escape exits tabbed fullscreen mode. |   // Escape exits tabbed fullscreen mode. | ||||||
|   if (event.windows_key_code == ui::VKEY_ESCAPE && is_html_fullscreen()) { |   if (event.windows_key_code == ui::VKEY_ESCAPE && is_html_fullscreen()) { | ||||||
|     ExitFullscreenModeForTab(source); |     ExitFullscreenModeForTab(source); | ||||||
|     return true; |     return; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // Check if the webContents has preferences and to ignore shortcuts |   // Check if the webContents has preferences and to ignore shortcuts | ||||||
|   auto* web_preferences = WebContentsPreferences::From(source); |   auto* web_preferences = WebContentsPreferences::From(source); | ||||||
|   if (web_preferences && |   if (web_preferences && | ||||||
|       web_preferences->IsEnabled("ignoreMenuShortcuts", false)) |       web_preferences->IsEnabled("ignoreMenuShortcuts", false)) | ||||||
|     return false; |     return; | ||||||
| 
 | 
 | ||||||
|   // Send the event to the menu before sending it to the window |   // Send the event to the menu before sending it to the window | ||||||
|   if (event.os_event.type == NSKeyDown && |   if (event.os_event.type == NSKeyDown && | ||||||
|       [[NSApp mainMenu] performKeyEquivalent:event.os_event]) |       [[NSApp mainMenu] performKeyEquivalent:event.os_event]) | ||||||
|     return true; |     return; | ||||||
| 
 | 
 | ||||||
|   if (event.os_event.window && |   if (event.os_event.window && | ||||||
|       [event.os_event.window isKindOfClass:[EventDispatchingWindow class]]) { |       [event.os_event.window isKindOfClass:[EventDispatchingWindow class]]) | ||||||
|     [event.os_event.window redispatchKeyEvent:event.os_event]; |     [event.os_event.window redispatchKeyEvent:event.os_event]; | ||||||
|     // FIXME(nornagon): this isn't the right return value; we should implement |  | ||||||
|     // devtools windows as Widgets in order to take advantage of the |  | ||||||
|     // pre-existing redispatch code in bridged_native_widget. |  | ||||||
|     return false; |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   return false; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace atom | }  // namespace atom | ||||||
|  |  | ||||||
|  | @ -17,28 +17,25 @@ | ||||||
| 
 | 
 | ||||||
| namespace atom { | namespace atom { | ||||||
| 
 | 
 | ||||||
| bool CommonWebContentsDelegate::HandleKeyboardEvent( | void CommonWebContentsDelegate::HandleKeyboardEvent( | ||||||
|     content::WebContents* source, |     content::WebContents* source, | ||||||
|     const content::NativeWebKeyboardEvent& event) { |     const content::NativeWebKeyboardEvent& event) { | ||||||
|   // Escape exits tabbed fullscreen mode.
 |   // Escape exits tabbed fullscreen mode.
 | ||||||
|   if (event.windows_key_code == ui::VKEY_ESCAPE && is_html_fullscreen()) { |   if (event.windows_key_code == ui::VKEY_ESCAPE && is_html_fullscreen()) { | ||||||
|     ExitFullscreenModeForTab(source); |     ExitFullscreenModeForTab(source); | ||||||
|     return true; |     return; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // Check if the webContents has preferences and to ignore shortcuts
 |   // Check if the webContents has preferences and to ignore shortcuts
 | ||||||
|   auto* web_preferences = WebContentsPreferences::From(source); |   auto* web_preferences = WebContentsPreferences::From(source); | ||||||
|   if (web_preferences && |   if (web_preferences && | ||||||
|       web_preferences->IsEnabled("ignoreMenuShortcuts", false)) |       web_preferences->IsEnabled("ignoreMenuShortcuts", false)) | ||||||
|     return false; |     return; | ||||||
| 
 | 
 | ||||||
|   // Let the NativeWindow handle other parts.
 |   // Let the NativeWindow handle other parts.
 | ||||||
|   if (owner_window()) { |   if (owner_window()) { | ||||||
|     owner_window()->HandleKeyboardEvent(source, event); |     owner_window()->HandleKeyboardEvent(source, event); | ||||||
|     return true; |  | ||||||
|   } |   } | ||||||
| 
 |  | ||||||
|   return false; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CommonWebContentsDelegate::ShowAutofillPopup( | void CommonWebContentsDelegate::ShowAutofillPopup( | ||||||
|  |  | ||||||
|  | @ -8,11 +8,8 @@ | ||||||
| #import "atom/browser/mac/atom_application_delegate.h" | #import "atom/browser/mac/atom_application_delegate.h" | ||||||
| #include "atom/browser/mac/dict_util.h" | #include "atom/browser/mac/dict_util.h" | ||||||
| #include "base/auto_reset.h" | #include "base/auto_reset.h" | ||||||
| #include "base/observer_list.h" |  | ||||||
| #include "base/strings/sys_string_conversions.h" | #include "base/strings/sys_string_conversions.h" | ||||||
| #include "content/public/browser/browser_accessibility_state.h" | #include "content/public/browser/browser_accessibility_state.h" | ||||||
| #include "content/public/browser/native_event_processor_mac.h" |  | ||||||
| #include "content/public/browser/native_event_processor_observer_mac.h" |  | ||||||
| 
 | 
 | ||||||
| namespace { | namespace { | ||||||
| 
 | 
 | ||||||
|  | @ -25,12 +22,6 @@ inline void dispatch_sync_main(dispatch_block_t block) { | ||||||
| 
 | 
 | ||||||
| }  // namespace | }  // namespace | ||||||
| 
 | 
 | ||||||
| @interface AtomApplication () <NativeEventProcessor> { |  | ||||||
|   base::ObserverList<content::NativeEventProcessorObserver>::Unchecked |  | ||||||
|       observers_; |  | ||||||
| } |  | ||||||
| @end |  | ||||||
| 
 |  | ||||||
| @implementation AtomApplication | @implementation AtomApplication | ||||||
| 
 | 
 | ||||||
| + (AtomApplication*)sharedApplication { | + (AtomApplication*)sharedApplication { | ||||||
|  | @ -57,8 +48,6 @@ inline void dispatch_sync_main(dispatch_block_t block) { | ||||||
| 
 | 
 | ||||||
| - (void)sendEvent:(NSEvent*)event { | - (void)sendEvent:(NSEvent*)event { | ||||||
|   base::AutoReset<BOOL> scoper(&handlingSendEvent_, YES); |   base::AutoReset<BOOL> scoper(&handlingSendEvent_, YES); | ||||||
|   content::ScopedNotifyNativeEventProcessorObserver scopedObserverNotifier( |  | ||||||
|       &observers_, event); |  | ||||||
|   [super sendEvent:event]; |   [super sendEvent:event]; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -199,14 +188,4 @@ inline void dispatch_sync_main(dispatch_block_t block) { | ||||||
|   atom::Browser::Get()->ShowAboutPanel(); |   atom::Browser::Get()->ShowAboutPanel(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| - (void)addNativeEventProcessorObserver: |  | ||||||
|     (content::NativeEventProcessorObserver*)observer { |  | ||||||
|   observers_.AddObserver(observer); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| - (void)removeNativeEventProcessorObserver: |  | ||||||
|     (content::NativeEventProcessorObserver*)observer { |  | ||||||
|   observers_.RemoveObserver(observer); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| @end | @end | ||||||
|  |  | ||||||
|  | @ -160,8 +160,7 @@ namespace atom { | ||||||
| NativeBrowserViewMac::NativeBrowserViewMac( | NativeBrowserViewMac::NativeBrowserViewMac( | ||||||
|     InspectableWebContents* inspectable_web_contents) |     InspectableWebContents* inspectable_web_contents) | ||||||
|     : NativeBrowserView(inspectable_web_contents) { |     : NativeBrowserView(inspectable_web_contents) { | ||||||
|   auto* view = |   auto* view = GetInspectableWebContentsView()->GetNativeView(); | ||||||
|       GetInspectableWebContentsView()->GetNativeView().GetNativeNSView(); |  | ||||||
|   view.autoresizingMask = kDefaultAutoResizingMask; |   view.autoresizingMask = kDefaultAutoResizingMask; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -176,14 +175,12 @@ void NativeBrowserViewMac::SetAutoResizeFlags(uint8_t flags) { | ||||||
|     autoresizing_mask |= NSViewHeightSizable; |     autoresizing_mask |= NSViewHeightSizable; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   auto* view = |   auto* view = GetInspectableWebContentsView()->GetNativeView(); | ||||||
|       GetInspectableWebContentsView()->GetNativeView().GetNativeNSView(); |  | ||||||
|   view.autoresizingMask = autoresizing_mask; |   view.autoresizingMask = autoresizing_mask; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void NativeBrowserViewMac::SetBounds(const gfx::Rect& bounds) { | void NativeBrowserViewMac::SetBounds(const gfx::Rect& bounds) { | ||||||
|   auto* view = |   auto* view = GetInspectableWebContentsView()->GetNativeView(); | ||||||
|       GetInspectableWebContentsView()->GetNativeView().GetNativeNSView(); |  | ||||||
|   auto* superview = view.superview; |   auto* superview = view.superview; | ||||||
|   const auto superview_height = superview ? superview.frame.size.height : 0; |   const auto superview_height = superview ? superview.frame.size.height : 0; | ||||||
|   view.frame = |   view.frame = | ||||||
|  | @ -192,17 +189,15 @@ void NativeBrowserViewMac::SetBounds(const gfx::Rect& bounds) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void NativeBrowserViewMac::SetBackgroundColor(SkColor color) { | void NativeBrowserViewMac::SetBackgroundColor(SkColor color) { | ||||||
|   auto* view = |   auto* view = GetInspectableWebContentsView()->GetNativeView(); | ||||||
|       GetInspectableWebContentsView()->GetNativeView().GetNativeNSView(); |  | ||||||
|   view.wantsLayer = YES; |   view.wantsLayer = YES; | ||||||
|   view.layer.backgroundColor = skia::CGColorCreateFromSkColor(color); |   view.layer.backgroundColor = skia::CGColorCreateFromSkColor(color); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void NativeBrowserViewMac::UpdateDraggableRegions( | void NativeBrowserViewMac::UpdateDraggableRegions( | ||||||
|     const std::vector<gfx::Rect>& drag_exclude_rects) { |     const std::vector<gfx::Rect>& drag_exclude_rects) { | ||||||
|   NSView* web_view = GetWebContents()->GetNativeView().GetNativeNSView(); |   NSView* web_view = GetWebContents()->GetNativeView(); | ||||||
|   NSView* inspectable_view = |   NSView* inspectable_view = GetInspectableWebContentsView()->GetNativeView(); | ||||||
|       GetInspectableWebContentsView()->GetNativeView().GetNativeNSView(); |  | ||||||
|   NSView* window_content_view = inspectable_view.superview; |   NSView* window_content_view = inspectable_view.superview; | ||||||
|   const auto window_content_view_height = NSHeight(window_content_view.bounds); |   const auto window_content_view_height = NSHeight(window_content_view.bounds); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -347,8 +347,7 @@ NativeWindowMac::NativeWindowMac(const mate::Dictionary& options, | ||||||
|   params.type = views::Widget::InitParams::TYPE_WINDOW; |   params.type = views::Widget::InitParams::TYPE_WINDOW; | ||||||
|   params.native_widget = new AtomNativeWidgetMac(this, styleMask, widget()); |   params.native_widget = new AtomNativeWidgetMac(this, styleMask, widget()); | ||||||
|   widget()->Init(params); |   widget()->Init(params); | ||||||
|   window_ = static_cast<AtomNSWindow*>( |   window_ = static_cast<AtomNSWindow*>(widget()->GetNativeWindow()); | ||||||
|       widget()->GetNativeWindow().GetNativeNSWindow()); |  | ||||||
| 
 | 
 | ||||||
|   [window_ setEnableLargerThanScreen:enable_larger_than_screen()]; |   [window_ setEnableLargerThanScreen:enable_larger_than_screen()]; | ||||||
| 
 | 
 | ||||||
|  | @ -498,7 +497,7 @@ void NativeWindowMac::SetContentView(views::View* view) { | ||||||
| void NativeWindowMac::Close() { | void NativeWindowMac::Close() { | ||||||
|   // When this is a sheet showing, performClose won't work. |   // When this is a sheet showing, performClose won't work. | ||||||
|   if (is_modal() && parent() && IsVisible()) { |   if (is_modal() && parent() && IsVisible()) { | ||||||
|     [parent()->GetNativeWindow().GetNativeNSWindow() endSheet:window_]; |     [parent()->GetNativeWindow() endSheet:window_]; | ||||||
|     CloseImmediately(); |     CloseImmediately(); | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
|  | @ -546,10 +545,9 @@ bool NativeWindowMac::IsFocused() { | ||||||
| void NativeWindowMac::Show() { | void NativeWindowMac::Show() { | ||||||
|   if (is_modal() && parent()) { |   if (is_modal() && parent()) { | ||||||
|     if ([window_ sheetParent] == nil) |     if ([window_ sheetParent] == nil) | ||||||
|       [parent()->GetNativeWindow().GetNativeNSWindow() |       [parent()->GetNativeWindow() beginSheet:window_ | ||||||
|                  beginSheet:window_ |                             completionHandler:^(NSModalResponse){ | ||||||
|           completionHandler:^(NSModalResponse){ |                             }]; | ||||||
|           }]; |  | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | @ -575,7 +573,7 @@ void NativeWindowMac::ShowInactive() { | ||||||
| void NativeWindowMac::Hide() { | void NativeWindowMac::Hide() { | ||||||
|   if (is_modal() && parent()) { |   if (is_modal() && parent()) { | ||||||
|     [window_ orderOut:nil]; |     [window_ orderOut:nil]; | ||||||
|     [parent()->GetNativeWindow().GetNativeNSWindow() endSheet:window_]; |     [parent()->GetNativeWindow() endSheet:window_]; | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | @ -899,7 +897,7 @@ void NativeWindowMac::FlashFrame(bool flash) { | ||||||
| void NativeWindowMac::SetSkipTaskbar(bool skip) {} | void NativeWindowMac::SetSkipTaskbar(bool skip) {} | ||||||
| 
 | 
 | ||||||
| void NativeWindowMac::SetSimpleFullScreen(bool simple_fullscreen) { | void NativeWindowMac::SetSimpleFullScreen(bool simple_fullscreen) { | ||||||
|   NSWindow* window = GetNativeWindow().GetNativeNSWindow(); |   NSWindow* window = GetNativeWindow(); | ||||||
| 
 | 
 | ||||||
|   if (simple_fullscreen && !is_simple_fullscreen_) { |   if (simple_fullscreen && !is_simple_fullscreen_) { | ||||||
|     is_simple_fullscreen_ = true; |     is_simple_fullscreen_ = true; | ||||||
|  | @ -1081,8 +1079,7 @@ void NativeWindowMac::AddBrowserView(NativeBrowserView* view) { | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   add_browser_view(view); |   add_browser_view(view); | ||||||
|   auto* native_view = |   auto* native_view = view->GetInspectableWebContentsView()->GetNativeView(); | ||||||
|       view->GetInspectableWebContentsView()->GetNativeView().GetNativeNSView(); |  | ||||||
|   [[window_ contentView] addSubview:native_view |   [[window_ contentView] addSubview:native_view | ||||||
|                          positioned:NSWindowAbove |                          positioned:NSWindowAbove | ||||||
|                          relativeTo:nil]; |                          relativeTo:nil]; | ||||||
|  | @ -1100,8 +1097,7 @@ void NativeWindowMac::RemoveBrowserView(NativeBrowserView* view) { | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   [view->GetInspectableWebContentsView()->GetNativeView().GetNativeNSView() |   [view->GetInspectableWebContentsView()->GetNativeView() removeFromSuperview]; | ||||||
|           removeFromSuperview]; |  | ||||||
|   remove_browser_view(view); |   remove_browser_view(view); | ||||||
| 
 | 
 | ||||||
|   [CATransaction commit]; |   [CATransaction commit]; | ||||||
|  | @ -1216,12 +1212,11 @@ void NativeWindowMac::ToggleTabBar() { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool NativeWindowMac::AddTabbedWindow(NativeWindow* window) { | bool NativeWindowMac::AddTabbedWindow(NativeWindow* window) { | ||||||
|   if (window_ == window->GetNativeWindow().GetNativeNSWindow()) { |   if (window_ == window->GetNativeWindow()) { | ||||||
|     return false; |     return false; | ||||||
|   } else { |   } else { | ||||||
|     if (@available(macOS 10.12, *)) |     if (@available(macOS 10.12, *)) | ||||||
|       [window_ addTabbedWindow:window->GetNativeWindow().GetNativeNSWindow() |       [window_ addTabbedWindow:window->GetNativeWindow() ordered:NSWindowAbove]; | ||||||
|                        ordered:NSWindowAbove]; |  | ||||||
|   } |   } | ||||||
|   return true; |   return true; | ||||||
| } | } | ||||||
|  | @ -1446,8 +1441,7 @@ void NativeWindowMac::InternalSetParentWindow(NativeWindow* parent, | ||||||
|   NativeWindow::SetParentWindow(parent); |   NativeWindow::SetParentWindow(parent); | ||||||
| 
 | 
 | ||||||
|   // Do not remove/add if we are already properly attached. |   // Do not remove/add if we are already properly attached. | ||||||
|   if (attach && parent && |   if (attach && parent && [window_ parentWindow] == parent->GetNativeWindow()) | ||||||
|       [window_ parentWindow] == parent->GetNativeWindow().GetNativeNSWindow()) |  | ||||||
|     return; |     return; | ||||||
| 
 | 
 | ||||||
|   // Remove current parent window. |   // Remove current parent window. | ||||||
|  | @ -1457,9 +1451,7 @@ void NativeWindowMac::InternalSetParentWindow(NativeWindow* parent, | ||||||
|   // Set new parent window. |   // Set new parent window. | ||||||
|   // Note that this method will force the window to become visible. |   // Note that this method will force the window to become visible. | ||||||
|   if (parent && attach) |   if (parent && attach) | ||||||
|     [parent->GetNativeWindow().GetNativeNSWindow() |     [parent->GetNativeWindow() addChildWindow:window_ ordered:NSWindowAbove]; | ||||||
|         addChildWindow:window_ |  | ||||||
|                ordered:NSWindowAbove]; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void NativeWindowMac::ShowWindowButton(NSWindowButton button) { | void NativeWindowMac::ShowWindowButton(NSWindowButton button) { | ||||||
|  |  | ||||||
|  | @ -1216,14 +1216,6 @@ void NativeWindowViews::OnWidgetBoundsChanged(views::Widget* changed_widget, | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void NativeWindowViews::OnWidgetDestroying(views::Widget* widget) { |  | ||||||
| #if defined(OS_LINUX) |  | ||||||
|   aura::Window* window = GetNativeWindow(); |  | ||||||
|   if (window) |  | ||||||
|     window->RemovePreTargetHandler(this); |  | ||||||
| #endif |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void NativeWindowViews::DeleteDelegate() { | void NativeWindowViews::DeleteDelegate() { | ||||||
|   if (is_modal() && this->parent()) { |   if (is_modal() && this->parent()) { | ||||||
|     auto* parent = this->parent(); |     auto* parent = this->parent(); | ||||||
|  |  | ||||||
|  | @ -161,7 +161,6 @@ class NativeWindowViews : public NativeWindow, | ||||||
|   void AutoresizeBrowserView(int width_delta, |   void AutoresizeBrowserView(int width_delta, | ||||||
|                              int height_delta, |                              int height_delta, | ||||||
|                              NativeBrowserView* browser_view); |                              NativeBrowserView* browser_view); | ||||||
|   void OnWidgetDestroying(views::Widget* widget) override; |  | ||||||
|   // views::WidgetDelegate:
 |   // views::WidgetDelegate:
 | ||||||
|   void DeleteDelegate() override; |   void DeleteDelegate() override; | ||||||
|   views::View* GetInitiallyFocusedView() override; |   views::View* GetInitiallyFocusedView() override; | ||||||
|  |  | ||||||
|  | @ -419,12 +419,16 @@ bool AtomNetworkDelegate::OnCanAccessFile( | ||||||
|   return true; |   return true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool AtomNetworkDelegate::OnForcePrivacyMode( | bool AtomNetworkDelegate::OnCanEnablePrivacyMode( | ||||||
|     const GURL& url, |     const GURL& url, | ||||||
|     const GURL& first_party_for_cookies) const { |     const GURL& first_party_for_cookies) const { | ||||||
|   return false; |   return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | bool AtomNetworkDelegate::OnAreExperimentalCookieFeaturesEnabled() const { | ||||||
|  |   return true; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| bool AtomNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( | bool AtomNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( | ||||||
|     const net::URLRequest& request, |     const net::URLRequest& request, | ||||||
|     const GURL& target_url, |     const GURL& target_url, | ||||||
|  |  | ||||||
|  | @ -127,8 +127,10 @@ class AtomNetworkDelegate : public net::NetworkDelegate { | ||||||
|   bool OnCanAccessFile(const net::URLRequest& request, |   bool OnCanAccessFile(const net::URLRequest& request, | ||||||
|                        const base::FilePath& original_path, |                        const base::FilePath& original_path, | ||||||
|                        const base::FilePath& absolute_path) const override; |                        const base::FilePath& absolute_path) const override; | ||||||
|   bool OnForcePrivacyMode(const GURL& url, |   bool OnCanEnablePrivacyMode( | ||||||
|                           const GURL& first_party_for_cookies) const override; |       const GURL& url, | ||||||
|  |       const GURL& first_party_for_cookies) const override; | ||||||
|  |   bool OnAreExperimentalCookieFeaturesEnabled() const override; | ||||||
|   bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( |   bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( | ||||||
|       const net::URLRequest& request, |       const net::URLRequest& request, | ||||||
|       const GURL& target_url, |       const GURL& target_url, | ||||||
|  |  | ||||||
|  | @ -107,7 +107,15 @@ class ResourceContext : public content::ResourceContext { | ||||||
|   ResourceContext() = default; |   ResourceContext() = default; | ||||||
|   ~ResourceContext() override = default; |   ~ResourceContext() override = default; | ||||||
| 
 | 
 | ||||||
|  |   net::URLRequestContext* GetRequestContext() override { | ||||||
|  |     return request_context_; | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  private: |  private: | ||||||
|  |   friend class URLRequestContextGetter; | ||||||
|  | 
 | ||||||
|  |   net::URLRequestContext* request_context_ = nullptr; | ||||||
|  | 
 | ||||||
|   DISALLOW_COPY_AND_ASSIGN(ResourceContext); |   DISALLOW_COPY_AND_ASSIGN(ResourceContext); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | @ -324,6 +332,8 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { | ||||||
|     } |     } | ||||||
|     top_job_factory_->Chain(std::move(inner_job_factory)); |     top_job_factory_->Chain(std::move(inner_job_factory)); | ||||||
|     url_request_context_->set_job_factory(top_job_factory_.get()); |     url_request_context_->set_job_factory(top_job_factory_.get()); | ||||||
|  | 
 | ||||||
|  |     context_handle_->resource_context_->request_context_ = url_request_context_; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   return url_request_context_; |   return url_request_context_; | ||||||
|  |  | ||||||
|  | @ -92,9 +92,7 @@ void ShowCertificateTrust(atom::NativeWindow* parent_window, | ||||||
|   SecTrustRef trust = nullptr; |   SecTrustRef trust = nullptr; | ||||||
|   SecTrustCreateWithCertificates(cert_chain, sec_policy, &trust); |   SecTrustCreateWithCertificates(cert_chain, sec_policy, &trust); | ||||||
| 
 | 
 | ||||||
|   NSWindow* window = parent_window |   NSWindow* window = parent_window ? parent_window->GetNativeWindow() : nil; | ||||||
|                          ? parent_window->GetNativeWindow().GetNativeNSWindow() |  | ||||||
|                          : nil; |  | ||||||
|   auto msg = base::SysUTF8ToNSString(message); |   auto msg = base::SysUTF8ToNSString(message); | ||||||
| 
 | 
 | ||||||
|   auto panel = [[SFCertificateTrustPanel alloc] init]; |   auto panel = [[SFCertificateTrustPanel alloc] init]; | ||||||
|  |  | ||||||
|  | @ -43,7 +43,7 @@ | ||||||
|   } else { |   } else { | ||||||
|     auto* contents = inspectableWebContentsView_->inspectable_web_contents() |     auto* contents = inspectableWebContentsView_->inspectable_web_contents() | ||||||
|                          ->GetWebContents(); |                          ->GetWebContents(); | ||||||
|     auto* contentsView = contents->GetNativeView().GetNativeNSView(); |     auto contentsView = contents->GetNativeView(); | ||||||
|     [contentsView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; |     [contentsView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; | ||||||
|     [self addSubview:contentsView]; |     [self addSubview:contentsView]; | ||||||
|   } |   } | ||||||
|  | @ -79,7 +79,7 @@ | ||||||
|       inspectableWebContentsView_->inspectable_web_contents(); |       inspectableWebContentsView_->inspectable_web_contents(); | ||||||
|   auto* devToolsWebContents = |   auto* devToolsWebContents = | ||||||
|       inspectable_web_contents->GetDevToolsWebContents(); |       inspectable_web_contents->GetDevToolsWebContents(); | ||||||
|   auto* devToolsView = devToolsWebContents->GetNativeView().GetNativeNSView(); |   auto devToolsView = devToolsWebContents->GetNativeView(); | ||||||
| 
 | 
 | ||||||
|   devtools_visible_ = visible; |   devtools_visible_ = visible; | ||||||
|   if (devtools_docked_) { |   if (devtools_docked_) { | ||||||
|  | @ -134,7 +134,7 @@ | ||||||
|         inspectableWebContentsView_->inspectable_web_contents(); |         inspectableWebContentsView_->inspectable_web_contents(); | ||||||
|     auto* devToolsWebContents = |     auto* devToolsWebContents = | ||||||
|         inspectable_web_contents->GetDevToolsWebContents(); |         inspectable_web_contents->GetDevToolsWebContents(); | ||||||
|     auto devToolsView = devToolsWebContents->GetNativeView().GetNativeNSView(); |     auto devToolsView = devToolsWebContents->GetNativeView(); | ||||||
| 
 | 
 | ||||||
|     auto styleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | |     auto styleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | | ||||||
|                      NSMiniaturizableWindowMask | NSWindowStyleMaskResizable | |                      NSMiniaturizableWindowMask | NSWindowStyleMaskResizable | | ||||||
|  | @ -203,7 +203,7 @@ | ||||||
|   if (!inspectable_web_contents || inspectable_web_contents->IsGuest()) |   if (!inspectable_web_contents || inspectable_web_contents->IsGuest()) | ||||||
|     return; |     return; | ||||||
|   auto* webContents = inspectable_web_contents->GetWebContents(); |   auto* webContents = inspectable_web_contents->GetWebContents(); | ||||||
|   auto* webContentsView = webContents->GetNativeView().GetNativeNSView(); |   auto webContentsView = webContents->GetNativeView(); | ||||||
| 
 | 
 | ||||||
|   NSView* view = [notification object]; |   NSView* view = [notification object]; | ||||||
|   if ([[webContentsView subviews] containsObject:view]) { |   if ([[webContentsView subviews] containsObject:view]) { | ||||||
|  | @ -215,7 +215,7 @@ | ||||||
|       inspectable_web_contents->GetDevToolsWebContents(); |       inspectable_web_contents->GetDevToolsWebContents(); | ||||||
|   if (!devToolsWebContents) |   if (!devToolsWebContents) | ||||||
|     return; |     return; | ||||||
|   auto devToolsView = devToolsWebContents->GetNativeView().GetNativeNSView(); |   auto devToolsView = devToolsWebContents->GetNativeView(); | ||||||
| 
 | 
 | ||||||
|   if ([[devToolsView subviews] containsObject:view]) { |   if ([[devToolsView subviews] containsObject:view]) { | ||||||
|     devtools_is_first_responder_ = YES; |     devtools_is_first_responder_ = YES; | ||||||
|  |  | ||||||
|  | @ -21,7 +21,7 @@ class AtomNativeWidgetMac : public views::NativeWidgetMac { | ||||||
|  protected: |  protected: | ||||||
|   // NativeWidgetMac:
 |   // NativeWidgetMac:
 | ||||||
|   NativeWidgetMacNSWindow* CreateNSWindow( |   NativeWidgetMacNSWindow* CreateNSWindow( | ||||||
|       const views_bridge_mac::mojom::CreateWindowParams* params) override; |       const views::Widget::InitParams& params) override; | ||||||
| 
 | 
 | ||||||
|  private: |  private: | ||||||
|   NativeWindowMac* shell_; |   NativeWindowMac* shell_; | ||||||
|  |  | ||||||
|  | @ -19,7 +19,7 @@ AtomNativeWidgetMac::AtomNativeWidgetMac( | ||||||
| AtomNativeWidgetMac::~AtomNativeWidgetMac() {} | AtomNativeWidgetMac::~AtomNativeWidgetMac() {} | ||||||
| 
 | 
 | ||||||
| NativeWidgetMacNSWindow* AtomNativeWidgetMac::CreateNSWindow( | NativeWidgetMacNSWindow* AtomNativeWidgetMac::CreateNSWindow( | ||||||
|     const views_bridge_mac::mojom::CreateWindowParams* params) { |     const views::Widget::InitParams& params) { | ||||||
|   return [[[AtomNSWindow alloc] initWithShell:shell_ styleMask:style_mask_] |   return [[[AtomNSWindow alloc] initWithShell:shell_ styleMask:style_mask_] | ||||||
|       autorelease]; |       autorelease]; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -9,7 +9,6 @@ | ||||||
| #include "atom/browser/ui/cocoa/atom_preview_item.h" | #include "atom/browser/ui/cocoa/atom_preview_item.h" | ||||||
| #include "atom/browser/ui/cocoa/atom_touch_bar.h" | #include "atom/browser/ui/cocoa/atom_touch_bar.h" | ||||||
| #include "base/mac/mac_util.h" | #include "base/mac/mac_util.h" | ||||||
| #include "ui/views/cocoa/bridged_native_widget_host_impl.h" |  | ||||||
| #include "ui/views/widget/native_widget_mac.h" | #include "ui/views/widget/native_widget_mac.h" | ||||||
| #include "ui/views_bridge_mac/bridged_native_widget_impl.h" | #include "ui/views_bridge_mac/bridged_native_widget_impl.h" | ||||||
| 
 | 
 | ||||||
|  | @ -22,13 +21,12 @@ | ||||||
|   // on the fly. |   // on the fly. | ||||||
|   // TODO(zcbenz): Add interface in NativeWidgetMac to allow overriding creating |   // TODO(zcbenz): Add interface in NativeWidgetMac to allow overriding creating | ||||||
|   // window delegate. |   // window delegate. | ||||||
|   auto* bridge_host = views::BridgedNativeWidgetHostImpl::GetFromNativeWindow( |   auto* bridged_view = views::BridgedNativeWidgetImpl::GetFromNativeWindow( | ||||||
|       shell->GetNativeWindow()); |       shell->GetNativeWindow()); | ||||||
|   auto* bridged_view = bridge_host->bridge_impl(); |  | ||||||
|   if ((self = [super initWithBridgedNativeWidget:bridged_view])) { |   if ((self = [super initWithBridgedNativeWidget:bridged_view])) { | ||||||
|     shell_ = shell; |     shell_ = shell; | ||||||
|     is_zooming_ = false; |     is_zooming_ = false; | ||||||
|     level_ = [shell_->GetNativeWindow().GetNativeNSWindow() level]; |     level_ = [shell_->GetNativeWindow() level]; | ||||||
|   } |   } | ||||||
|   return self; |   return self; | ||||||
| } | } | ||||||
|  | @ -140,7 +138,7 @@ | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| - (void)windowWillMiniaturize:(NSNotification*)notification { | - (void)windowWillMiniaturize:(NSNotification*)notification { | ||||||
|   NSWindow* window = shell_->GetNativeWindow().GetNativeNSWindow(); |   NSWindow* window = shell_->GetNativeWindow(); | ||||||
|   // store the current status window level to be restored in |   // store the current status window level to be restored in | ||||||
|   // windowDidDeminiaturize |   // windowDidDeminiaturize | ||||||
|   level_ = [window level]; |   level_ = [window level]; | ||||||
|  | @ -154,7 +152,7 @@ | ||||||
| 
 | 
 | ||||||
| - (void)windowDidDeminiaturize:(NSNotification*)notification { | - (void)windowDidDeminiaturize:(NSNotification*)notification { | ||||||
|   [super windowDidDeminiaturize:notification]; |   [super windowDidDeminiaturize:notification]; | ||||||
|   [shell_->GetNativeWindow().GetNativeNSWindow() setLevel:level_]; |   [shell_->GetNativeWindow() setLevel:level_]; | ||||||
|   shell_->NotifyWindowRestore(); |   shell_->NotifyWindowRestore(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -181,7 +179,7 @@ | ||||||
|   // artifacts. |   // artifacts. | ||||||
|   if (@available(macOS 10.10, *)) { |   if (@available(macOS 10.10, *)) { | ||||||
|     if (shell_->title_bar_style() == atom::NativeWindowMac::HIDDEN_INSET) { |     if (shell_->title_bar_style() == atom::NativeWindowMac::HIDDEN_INSET) { | ||||||
|       NSWindow* window = shell_->GetNativeWindow().GetNativeNSWindow(); |       NSWindow* window = shell_->GetNativeWindow(); | ||||||
|       [window setToolbar:nil]; |       [window setToolbar:nil]; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  | @ -194,7 +192,7 @@ | ||||||
|     // For frameless window we don't show set title for normal mode since the |     // For frameless window we don't show set title for normal mode since the | ||||||
|     // titlebar is expected to be empty, but after entering fullscreen mode we |     // titlebar is expected to be empty, but after entering fullscreen mode we | ||||||
|     // have to set one, because title bar is visible here. |     // have to set one, because title bar is visible here. | ||||||
|     NSWindow* window = shell_->GetNativeWindow().GetNativeNSWindow(); |     NSWindow* window = shell_->GetNativeWindow(); | ||||||
|     if ((shell_->transparent() || !shell_->has_frame()) && |     if ((shell_->transparent() || !shell_->has_frame()) && | ||||||
|         // FIXME(zcbenz): Showing titlebar for hiddenInset window is weird under |         // FIXME(zcbenz): Showing titlebar for hiddenInset window is weird under | ||||||
|         // fullscreen mode. |         // fullscreen mode. | ||||||
|  | @ -223,7 +221,7 @@ | ||||||
| - (void)windowWillExitFullScreen:(NSNotification*)notification { | - (void)windowWillExitFullScreen:(NSNotification*)notification { | ||||||
|   if (@available(macOS 10.10, *)) { |   if (@available(macOS 10.10, *)) { | ||||||
|     // Restore the titlebar visibility. |     // Restore the titlebar visibility. | ||||||
|     NSWindow* window = shell_->GetNativeWindow().GetNativeNSWindow(); |     NSWindow* window = shell_->GetNativeWindow(); | ||||||
|     if ((shell_->transparent() || !shell_->has_frame()) && |     if ((shell_->transparent() || !shell_->has_frame()) && | ||||||
|         (shell_->title_bar_style() != atom::NativeWindowMac::HIDDEN_INSET || |         (shell_->title_bar_style() != atom::NativeWindowMac::HIDDEN_INSET || | ||||||
|          shell_->fullscreen_window_title())) { |          shell_->fullscreen_window_title())) { | ||||||
|  | @ -249,9 +247,8 @@ | ||||||
|   // Clears the delegate when window is going to be closed, since EL Capitan it |   // Clears the delegate when window is going to be closed, since EL Capitan it | ||||||
|   // is possible that the methods of delegate would get called after the window |   // is possible that the methods of delegate would get called after the window | ||||||
|   // has been closed. |   // has been closed. | ||||||
|   auto* bridge_host = views::BridgedNativeWidgetHostImpl::GetFromNativeWindow( |   auto* bridged_view = views::BridgedNativeWidgetImpl::GetFromNativeWindow( | ||||||
|       shell_->GetNativeWindow()); |       shell_->GetNativeWindow()); | ||||||
|   auto* bridged_view = bridge_host->bridge_impl(); |  | ||||||
|   bridged_view->OnWindowWillClose(); |   bridged_view->OnWindowWillClose(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -33,27 +33,26 @@ void DragFileItems(const std::vector<base::FilePath>& files, | ||||||
| 
 | 
 | ||||||
|   // Synthesize a drag event, since we don't have access to the actual event |   // Synthesize a drag event, since we don't have access to the actual event | ||||||
|   // that initiated a drag (possibly consumed by the Web UI, for example). |   // that initiated a drag (possibly consumed by the Web UI, for example). | ||||||
|   NSWindow* window = [view.GetNativeNSView() window]; |   NSPoint position = [[view window] mouseLocationOutsideOfEventStream]; | ||||||
|   NSPoint position = [window mouseLocationOutsideOfEventStream]; |  | ||||||
|   NSTimeInterval eventTime = [[NSApp currentEvent] timestamp]; |   NSTimeInterval eventTime = [[NSApp currentEvent] timestamp]; | ||||||
|   NSEvent* dragEvent = [NSEvent mouseEventWithType:NSLeftMouseDragged |   NSEvent* dragEvent = [NSEvent mouseEventWithType:NSLeftMouseDragged | ||||||
|                                           location:position |                                           location:position | ||||||
|                                      modifierFlags:NSLeftMouseDraggedMask |                                      modifierFlags:NSLeftMouseDraggedMask | ||||||
|                                          timestamp:eventTime |                                          timestamp:eventTime | ||||||
|                                       windowNumber:[window windowNumber] |                                       windowNumber:[[view window] windowNumber] | ||||||
|                                            context:nil |                                            context:nil | ||||||
|                                        eventNumber:0 |                                        eventNumber:0 | ||||||
|                                         clickCount:1 |                                         clickCount:1 | ||||||
|                                           pressure:1.0]; |                                           pressure:1.0]; | ||||||
| 
 | 
 | ||||||
|   // Run the drag operation. |   // Run the drag operation. | ||||||
|   [window dragImage:icon.ToNSImage() |   [[view window] dragImage:icon.ToNSImage() | ||||||
|                  at:position |                         at:position | ||||||
|              offset:NSZeroSize |                     offset:NSZeroSize | ||||||
|               event:dragEvent |                      event:dragEvent | ||||||
|          pasteboard:pasteboard |                 pasteboard:pasteboard | ||||||
|              source:view.GetNativeNSView() |                     source:view | ||||||
|           slideBack:YES]; |                  slideBack:YES]; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace atom | }  // namespace atom | ||||||
|  |  | ||||||
|  | @ -210,8 +210,7 @@ int RunModalDialog(NSSavePanel* dialog, const DialogSettings& settings) { | ||||||
|       settings.force_detached) { |       settings.force_detached) { | ||||||
|     chosen = [dialog runModal]; |     chosen = [dialog runModal]; | ||||||
|   } else { |   } else { | ||||||
|     NSWindow* window = |     NSWindow* window = settings.parent_window->GetNativeWindow(); | ||||||
|         settings.parent_window->GetNativeWindow().GetNativeNSWindow(); |  | ||||||
| 
 | 
 | ||||||
|     [dialog beginSheetModalForWindow:window |     [dialog beginSheetModalForWindow:window | ||||||
|                    completionHandler:^(NSInteger c) { |                    completionHandler:^(NSInteger c) { | ||||||
|  | @ -329,8 +328,7 @@ void ShowOpenDialog(const DialogSettings& settings, | ||||||
|       OpenDialogCompletion(chosen, dialog, settings, callback); |       OpenDialogCompletion(chosen, dialog, settings, callback); | ||||||
|     }]; |     }]; | ||||||
|   } else { |   } else { | ||||||
|     NSWindow* window = |     NSWindow* window = settings.parent_window->GetNativeWindow(); | ||||||
|         settings.parent_window->GetNativeWindow().GetNativeNSWindow(); |  | ||||||
|     [dialog beginSheetModalForWindow:window |     [dialog beginSheetModalForWindow:window | ||||||
|                    completionHandler:^(NSInteger chosen) { |                    completionHandler:^(NSInteger chosen) { | ||||||
|                      OpenDialogCompletion(chosen, dialog, settings, callback); |                      OpenDialogCompletion(chosen, dialog, settings, callback); | ||||||
|  | @ -391,8 +389,7 @@ void ShowSaveDialog(const DialogSettings& settings, | ||||||
|       SaveDialogCompletion(chosen, dialog, settings, callback); |       SaveDialogCompletion(chosen, dialog, settings, callback); | ||||||
|     }]; |     }]; | ||||||
|   } else { |   } else { | ||||||
|     NSWindow* window = |     NSWindow* window = settings.parent_window->GetNativeWindow(); | ||||||
|         settings.parent_window->GetNativeWindow().GetNativeNSWindow(); |  | ||||||
|     [dialog beginSheetModalForWindow:window |     [dialog beginSheetModalForWindow:window | ||||||
|                    completionHandler:^(NSInteger chosen) { |                    completionHandler:^(NSInteger chosen) { | ||||||
|                      SaveDialogCompletion(chosen, dialog, settings, callback); |                      SaveDialogCompletion(chosen, dialog, settings, callback); | ||||||
|  |  | ||||||
|  | @ -779,11 +779,12 @@ bool InspectableWebContentsImpl::ShouldCreateWebContents( | ||||||
|   return false; |   return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool InspectableWebContentsImpl::HandleKeyboardEvent( | void InspectableWebContentsImpl::HandleKeyboardEvent( | ||||||
|     content::WebContents* source, |     content::WebContents* source, | ||||||
|     const content::NativeWebKeyboardEvent& event) { |     const content::NativeWebKeyboardEvent& event) { | ||||||
|   auto* delegate = web_contents_->GetDelegate(); |   auto* delegate = web_contents_->GetDelegate(); | ||||||
|   return !delegate || delegate->HandleKeyboardEvent(source, event); |   if (delegate) | ||||||
|  |     delegate->HandleKeyboardEvent(source, event); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void InspectableWebContentsImpl::CloseContents(content::WebContents* source) { | void InspectableWebContentsImpl::CloseContents(content::WebContents* source) { | ||||||
|  |  | ||||||
|  | @ -182,7 +182,7 @@ class InspectableWebContentsImpl | ||||||
|       const GURL& target_url, |       const GURL& target_url, | ||||||
|       const std::string& partition_id, |       const std::string& partition_id, | ||||||
|       content::SessionStorageNamespace* session_storage_namespace) override; |       content::SessionStorageNamespace* session_storage_namespace) override; | ||||||
|   bool HandleKeyboardEvent(content::WebContents*, |   void HandleKeyboardEvent(content::WebContents*, | ||||||
|                            const content::NativeWebKeyboardEvent&) override; |                            const content::NativeWebKeyboardEvent&) override; | ||||||
|   void CloseContents(content::WebContents* source) override; |   void CloseContents(content::WebContents* source) override; | ||||||
|   content::ColorChooser* OpenColorChooser( |   content::ColorChooser* OpenColorChooser( | ||||||
|  |  | ||||||
|  | @ -156,7 +156,7 @@ int ShowMessageBox(NativeWindow* parent_window, | ||||||
|               andAlert:alert |               andAlert:alert | ||||||
|           callEndModal:true]; |           callEndModal:true]; | ||||||
| 
 | 
 | ||||||
|   NSWindow* window = parent_window->GetNativeWindow().GetNativeNSWindow(); |   NSWindow* window = parent_window->GetNativeWindow(); | ||||||
|   [alert beginSheetModalForWindow:window |   [alert beginSheetModalForWindow:window | ||||||
|                     modalDelegate:delegate |                     modalDelegate:delegate | ||||||
|                    didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) |                    didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) | ||||||
|  | @ -193,9 +193,7 @@ void ShowMessageBox(NativeWindow* parent_window, | ||||||
|                                                              andAlert:alert |                                                              andAlert:alert | ||||||
|                                                          callEndModal:false]; |                                                          callEndModal:false]; | ||||||
| 
 | 
 | ||||||
|     NSWindow* window = |     NSWindow* window = parent_window ? parent_window->GetNativeWindow() : nil; | ||||||
|         parent_window ? parent_window->GetNativeWindow().GetNativeNSWindow() |  | ||||||
|                       : nil; |  | ||||||
|     [alert |     [alert | ||||||
|         beginSheetModalForWindow:window |         beginSheetModalForWindow:window | ||||||
|                    modalDelegate:delegate |                    modalDelegate:delegate | ||||||
|  |  | ||||||
|  | @ -47,6 +47,9 @@ bool ViewsDelegate::GetSavedWindowPlacement( | ||||||
|   return false; |   return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void ViewsDelegate::NotifyAccessibilityEvent(views::View* view, | ||||||
|  |                                              ax::mojom::Event event_type) {} | ||||||
|  | 
 | ||||||
| void ViewsDelegate::NotifyMenuItemFocused(const base::string16& menu_name, | void ViewsDelegate::NotifyMenuItemFocused(const base::string16& menu_name, | ||||||
|                                           const base::string16& menu_item_name, |                                           const base::string16& menu_item_name, | ||||||
|                                           int item_index, |                                           int item_index, | ||||||
|  |  | ||||||
|  | @ -27,6 +27,8 @@ class ViewsDelegate : public views::ViewsDelegate { | ||||||
|                                const std::string& window_name, |                                const std::string& window_name, | ||||||
|                                gfx::Rect* bounds, |                                gfx::Rect* bounds, | ||||||
|                                ui::WindowShowState* show_state) const override; |                                ui::WindowShowState* show_state) const override; | ||||||
|  |   void NotifyAccessibilityEvent(views::View* view, | ||||||
|  |                                 ax::mojom::Event event_type) override; | ||||||
|   void NotifyMenuItemFocused(const base::string16& menu_name, |   void NotifyMenuItemFocused(const base::string16& menu_name, | ||||||
|                              const base::string16& menu_item_name, |                              const base::string16& menu_item_name, | ||||||
|                              int item_index, |                              int item_index, | ||||||
|  |  | ||||||
|  | @ -23,7 +23,8 @@ SubmenuButton::SubmenuButton(const base::string16& title, | ||||||
|                              views::MenuButtonListener* menu_button_listener, |                              views::MenuButtonListener* menu_button_listener, | ||||||
|                              const SkColor& background_color) |                              const SkColor& background_color) | ||||||
|     : views::MenuButton(gfx::RemoveAcceleratorChar(title, '&', NULL, NULL), |     : views::MenuButton(gfx::RemoveAcceleratorChar(title, '&', NULL, NULL), | ||||||
|                         menu_button_listener), |                         menu_button_listener, | ||||||
|  |                         false), | ||||||
|       background_color_(background_color) { |       background_color_(background_color) { | ||||||
| #if defined(OS_LINUX) | #if defined(OS_LINUX) | ||||||
|   // Dont' use native style border.
 |   // Dont' use native style border.
 | ||||||
|  | @ -71,7 +72,7 @@ void SubmenuButton::SetUnderlineColor(SkColor color) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void SubmenuButton::GetAccessibleNodeData(ui::AXNodeData* node_data) { | void SubmenuButton::GetAccessibleNodeData(ui::AXNodeData* node_data) { | ||||||
|   node_data->SetName(GetAccessibleName()); |   node_data->SetName(accessible_name()); | ||||||
|   node_data->role = ax::mojom::Role::kPopUpButton; |   node_data->role = ax::mojom::Role::kPopUpButton; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -73,29 +73,6 @@ bool GetAsInteger(const base::Value* val, | ||||||
|   return false; |   return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool GetAsAutoplayPolicy(const base::Value* val, |  | ||||||
|                          const base::StringPiece& path, |  | ||||||
|                          content::AutoplayPolicy* out) { |  | ||||||
|   std::string policy_str; |  | ||||||
|   if (GetAsString(val, path, &policy_str)) { |  | ||||||
|     if (policy_str == "no-user-gesture-required") { |  | ||||||
|       *out = content::AutoplayPolicy::kNoUserGestureRequired; |  | ||||||
|       return true; |  | ||||||
|     } else if (policy_str == "user-gesture-required") { |  | ||||||
|       *out = content::AutoplayPolicy::kUserGestureRequired; |  | ||||||
|       return true; |  | ||||||
|     } else if (policy_str == "user-gesture-required-for-cross-origin") { |  | ||||||
|       *out = content::AutoplayPolicy::kUserGestureRequiredForCrossOrigin; |  | ||||||
|       return true; |  | ||||||
|     } else if (policy_str == "document-user-activation-required") { |  | ||||||
|       *out = content::AutoplayPolicy::kDocumentUserActivationRequired; |  | ||||||
|       return true; |  | ||||||
|     } |  | ||||||
|     return false; |  | ||||||
|   } |  | ||||||
|   return false; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| }  // namespace
 | }  // namespace
 | ||||||
| 
 | 
 | ||||||
| namespace atom { | namespace atom { | ||||||
|  | @ -387,10 +364,6 @@ void WebContentsPreferences::OverrideWebkitPrefs( | ||||||
|       IsEnabled("textAreasAreResizable", true /* default_value */); |       IsEnabled("textAreasAreResizable", true /* default_value */); | ||||||
|   prefs->navigate_on_drag_drop = |   prefs->navigate_on_drag_drop = | ||||||
|       IsEnabled("navigateOnDragDrop", false /* default_value */); |       IsEnabled("navigateOnDragDrop", false /* default_value */); | ||||||
|   if (!GetAsAutoplayPolicy(&preference_, "autoplayPolicy", |  | ||||||
|                            &prefs->autoplay_policy)) { |  | ||||||
|     prefs->autoplay_policy = content::AutoplayPolicy::kNoUserGestureRequired; |  | ||||||
|   } |  | ||||||
| 
 | 
 | ||||||
|   // Check if webgl should be enabled.
 |   // Check if webgl should be enabled.
 | ||||||
|   bool is_webgl_enabled = IsEnabled("webgl", true /* default_value */); |   bool is_webgl_enabled = IsEnabled("webgl", true /* default_value */); | ||||||
|  |  | ||||||
|  | @ -105,7 +105,7 @@ class FileSelectHelper : public base::RefCounted<FileSelectHelper>, | ||||||
| 
 | 
 | ||||||
|   void OnFilesSelected(std::vector<FileChooserFileInfoPtr> file_info) { |   void OnFilesSelected(std::vector<FileChooserFileInfoPtr> file_info) { | ||||||
|     if (listener_) { |     if (listener_) { | ||||||
|       listener_->FileSelected(std::move(file_info), base::FilePath(), mode_); |       listener_->FileSelected(std::move(file_info), mode_); | ||||||
|       listener_.reset(); |       listener_.reset(); | ||||||
|     } |     } | ||||||
|     render_frame_host_ = nullptr; |     render_frame_host_ = nullptr; | ||||||
|  | @ -265,7 +265,7 @@ void WebDialogHelper::EnumerateDirectory( | ||||||
|         blink::mojom::NativeFileInfo::New(path, base::string16()))); |         blink::mojom::NativeFileInfo::New(path, base::string16()))); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   listener->FileSelected(std::move(file_info), dir, |   listener->FileSelected(std::move(file_info), | ||||||
|                          FileChooserParams::Mode::kUploadFolder); |                          FileChooserParams::Mode::kUploadFolder); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -38,13 +38,11 @@ void WebViewGuestDelegate::AttachToIframe( | ||||||
|   DCHECK_EQ(embedder_web_contents_, |   DCHECK_EQ(embedder_web_contents_, | ||||||
|             content::WebContents::FromRenderFrameHost(embedder_frame)); |             content::WebContents::FromRenderFrameHost(embedder_frame)); | ||||||
| 
 | 
 | ||||||
|   content::WebContents* guest_web_contents = api_web_contents_->web_contents(); |  | ||||||
|   // Attach this inner WebContents |guest_web_contents| to the outer
 |   // Attach this inner WebContents |guest_web_contents| to the outer
 | ||||||
|   // WebContents |embedder_web_contents|. The outer WebContents's
 |   // WebContents |embedder_web_contents|. The outer WebContents's
 | ||||||
|   // frame |embedder_frame| hosts the inner WebContents.
 |   // frame |embedder_frame| hosts the inner WebContents.
 | ||||||
|   guest_web_contents->AttachToOuterWebContentsFrame( |   api_web_contents_->web_contents()->AttachToOuterWebContentsFrame( | ||||||
|       base::WrapUnique<content::WebContents>(guest_web_contents), |       embedder_web_contents_, embedder_frame); | ||||||
|       embedder_frame); |  | ||||||
| 
 | 
 | ||||||
|   ResetZoomController(); |   ResetZoomController(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -52,7 +52,7 @@ mate::Handle<NativeImage> NativeImage::CreateFromNamedImage( | ||||||
|       png_data = bufferFromNSImage( |       png_data = bufferFromNSImage( | ||||||
|           gfx::Image(gfx::ImageSkiaOperations::CreateHSLShiftedImage( |           gfx::Image(gfx::ImageSkiaOperations::CreateHSLShiftedImage( | ||||||
|                          gfx_image.AsImageSkia(), shift)) |                          gfx_image.AsImageSkia(), shift)) | ||||||
|               .AsNSImage()); |               .CopyNSImage()); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return CreateFromPNG(args->isolate(), (char*)[png_data bytes], |     return CreateFromPNG(args->isolate(), (char*)[png_data bytes], | ||||||
|  |  | ||||||
|  | @ -19,10 +19,10 @@ | ||||||
| #include "atom/common/native_mate_converters/string16_converter.h" | #include "atom/common/native_mate_converters/string16_converter.h" | ||||||
| #include "atom/common/promise_util.h" | #include "atom/common/promise_util.h" | ||||||
| #include "base/logging.h" | #include "base/logging.h" | ||||||
| #include "base/process/process.h" |  | ||||||
| #include "base/process/process_handle.h" | #include "base/process/process_handle.h" | ||||||
|  | #include "base/process/process_info.h" | ||||||
| #include "base/process/process_metrics_iocounters.h" | #include "base/process/process_metrics_iocounters.h" | ||||||
| #include "base/system/sys_info.h" | #include "base/sys_info.h" | ||||||
| #include "base/threading/thread_restrictions.h" | #include "base/threading/thread_restrictions.h" | ||||||
| #include "chrome/common/chrome_version.h" | #include "chrome/common/chrome_version.h" | ||||||
| #include "native_mate/dictionary.h" | #include "native_mate/dictionary.h" | ||||||
|  | @ -189,7 +189,7 @@ v8::Local<v8::Value> AtomBindings::GetHeapStatistics(v8::Isolate* isolate) { | ||||||
| 
 | 
 | ||||||
| // static
 | // static
 | ||||||
| v8::Local<v8::Value> AtomBindings::GetCreationTime(v8::Isolate* isolate) { | v8::Local<v8::Value> AtomBindings::GetCreationTime(v8::Isolate* isolate) { | ||||||
|   auto timeValue = base::Process::Current().CreationTime(); |   auto timeValue = base::CurrentProcessInfo::CreationTime(); | ||||||
|   if (timeValue.is_null()) { |   if (timeValue.is_null()) { | ||||||
|     return v8::Null(isolate); |     return v8::Null(isolate); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | @ -25,7 +25,7 @@ v8::Local<v8::Function> CreateConstructor(v8::Isolate* isolate, | ||||||
|       isolate, base::Bind(&mate::internal::InvokeNew<Sig>, func)); |       isolate, base::Bind(&mate::internal::InvokeNew<Sig>, func)); | ||||||
|   templ->InstanceTemplate()->SetInternalFieldCount(1); |   templ->InstanceTemplate()->SetInternalFieldCount(1); | ||||||
|   T::BuildPrototype(isolate, templ); |   T::BuildPrototype(isolate, templ); | ||||||
|   return templ->GetFunction(isolate->GetCurrentContext()).ToLocalChecked(); |   return templ->GetFunction(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace mate
 | }  // namespace mate
 | ||||||
|  |  | ||||||
|  | @ -9,7 +9,13 @@ | ||||||
| // Generate constructors.
 | // Generate constructors.
 | ||||||
| #include "ipc/struct_constructor_macros.h" | #include "ipc/struct_constructor_macros.h" | ||||||
| 
 | 
 | ||||||
| // lint: must come after struct_constructor_macros.
 | // must go after struct_contructor_macros
 | ||||||
|  | #include "atom/common/common_message_generator.h" | ||||||
|  | 
 | ||||||
|  | // Generate destructors.
 | ||||||
|  | #include "ipc/struct_destructor_macros.h" | ||||||
|  | 
 | ||||||
|  | // must go after struct_destructor_macros
 | ||||||
| #include "atom/common/common_message_generator.h" | #include "atom/common/common_message_generator.h" | ||||||
| 
 | 
 | ||||||
| // Generate param traits write methods.
 | // Generate param traits write methods.
 | ||||||
|  |  | ||||||
|  | @ -473,26 +473,25 @@ v8::Local<v8::Value> Converter<blink::WebCache::ResourceTypeStats>::ToV8( | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // static
 | // static
 | ||||||
| v8::Local<v8::Value> Converter<network::mojom::ReferrerPolicy>::ToV8( | v8::Local<v8::Value> Converter<blink::WebReferrerPolicy>::ToV8( | ||||||
|     v8::Isolate* isolate, |     v8::Isolate* isolate, | ||||||
|     const network::mojom::ReferrerPolicy& in) { |     const blink::WebReferrerPolicy& in) { | ||||||
|   switch (in) { |   switch (in) { | ||||||
|     case network::mojom::ReferrerPolicy::kDefault: |     case blink::kWebReferrerPolicyDefault: | ||||||
|       return mate::StringToV8(isolate, "default"); |       return mate::StringToV8(isolate, "default"); | ||||||
|     case network::mojom::ReferrerPolicy::kAlways: |     case blink::kWebReferrerPolicyAlways: | ||||||
|       return mate::StringToV8(isolate, "unsafe-url"); |       return mate::StringToV8(isolate, "unsafe-url"); | ||||||
|     case network::mojom::ReferrerPolicy::kNoReferrerWhenDowngrade: |     case blink::kWebReferrerPolicyNoReferrerWhenDowngrade: | ||||||
|       return mate::StringToV8(isolate, "no-referrer-when-downgrade"); |       return mate::StringToV8(isolate, "no-referrer-when-downgrade"); | ||||||
|     case network::mojom::ReferrerPolicy::kNever: |     case blink::kWebReferrerPolicyNever: | ||||||
|       return mate::StringToV8(isolate, "no-referrer"); |       return mate::StringToV8(isolate, "no-referrer"); | ||||||
|     case network::mojom::ReferrerPolicy::kOrigin: |     case blink::kWebReferrerPolicyOrigin: | ||||||
|       return mate::StringToV8(isolate, "origin"); |       return mate::StringToV8(isolate, "origin"); | ||||||
|     case network::mojom::ReferrerPolicy:: |     case blink::kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin: | ||||||
|         kNoReferrerWhenDowngradeOriginWhenCrossOrigin: |  | ||||||
|       return mate::StringToV8(isolate, "strict-origin-when-cross-origin"); |       return mate::StringToV8(isolate, "strict-origin-when-cross-origin"); | ||||||
|     case network::mojom::ReferrerPolicy::kSameOrigin: |     case blink::kWebReferrerPolicySameOrigin: | ||||||
|       return mate::StringToV8(isolate, "same-origin"); |       return mate::StringToV8(isolate, "same-origin"); | ||||||
|     case network::mojom::ReferrerPolicy::kStrictOrigin: |     case blink::kWebReferrerPolicyStrictOrigin: | ||||||
|       return mate::StringToV8(isolate, "strict-origin"); |       return mate::StringToV8(isolate, "strict-origin"); | ||||||
|     default: |     default: | ||||||
|       return mate::StringToV8(isolate, "no-referrer"); |       return mate::StringToV8(isolate, "no-referrer"); | ||||||
|  | @ -500,28 +499,28 @@ v8::Local<v8::Value> Converter<network::mojom::ReferrerPolicy>::ToV8( | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // static
 | // static
 | ||||||
| bool Converter<network::mojom::ReferrerPolicy>::FromV8( | bool Converter<blink::WebReferrerPolicy>::FromV8( | ||||||
|     v8::Isolate* isolate, |     v8::Isolate* isolate, | ||||||
|     v8::Handle<v8::Value> val, |     v8::Handle<v8::Value> val, | ||||||
|     network::mojom::ReferrerPolicy* out) { |     blink::WebReferrerPolicy* out) { | ||||||
|   std::string policy = base::ToLowerASCII(gin::V8ToString(isolate, val)); |   std::string policy = base::ToLowerASCII(gin::V8ToString(isolate, val)); | ||||||
|   if (policy == "default") |   if (policy == "default") | ||||||
|     *out = network::mojom::ReferrerPolicy::kDefault; |     *out = blink::kWebReferrerPolicyDefault; | ||||||
|   else if (policy == "unsafe-url") |   else if (policy == "unsafe-url") | ||||||
|     *out = network::mojom::ReferrerPolicy::kAlways; |     *out = blink::kWebReferrerPolicyAlways; | ||||||
|   else if (policy == "no-referrer-when-downgrade") |   else if (policy == "no-referrer-when-downgrade") | ||||||
|     *out = network::mojom::ReferrerPolicy::kNoReferrerWhenDowngrade; |     *out = blink::kWebReferrerPolicyNoReferrerWhenDowngrade; | ||||||
|   else if (policy == "no-referrer") |   else if (policy == "no-referrer") | ||||||
|     *out = network::mojom::ReferrerPolicy::kNever; |     *out = blink::kWebReferrerPolicyNever; | ||||||
|   else if (policy == "origin") |   else if (policy == "origin") | ||||||
|     *out = network::mojom::ReferrerPolicy::kOrigin; |     *out = blink::kWebReferrerPolicyOrigin; | ||||||
|   else if (policy == "strict-origin-when-cross-origin") |   else if (policy == "strict-origin-when-cross-origin") | ||||||
|     *out = network::mojom::ReferrerPolicy:: |     *out = | ||||||
|         kNoReferrerWhenDowngradeOriginWhenCrossOrigin; |         blink::kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin; | ||||||
|   else if (policy == "same-origin") |   else if (policy == "same-origin") | ||||||
|     *out = network::mojom::ReferrerPolicy::kSameOrigin; |     *out = blink::kWebReferrerPolicySameOrigin; | ||||||
|   else if (policy == "strict-origin") |   else if (policy == "strict-origin") | ||||||
|     *out = network::mojom::ReferrerPolicy::kStrictOrigin; |     *out = blink::kWebReferrerPolicyStrictOrigin; | ||||||
|   else |   else | ||||||
|     return false; |     return false; | ||||||
|   return true; |   return true; | ||||||
|  |  | ||||||
|  | @ -123,12 +123,12 @@ struct Converter<blink::WebCache::ResourceTypeStats> { | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| template <> | template <> | ||||||
| struct Converter<network::mojom::ReferrerPolicy> { | struct Converter<blink::WebReferrerPolicy> { | ||||||
|   static v8::Local<v8::Value> ToV8(v8::Isolate* isolate, |   static v8::Local<v8::Value> ToV8(v8::Isolate* isolate, | ||||||
|                                    const network::mojom::ReferrerPolicy& in); |                                    const blink::WebReferrerPolicy& in); | ||||||
|   static bool FromV8(v8::Isolate* isolate, |   static bool FromV8(v8::Isolate* isolate, | ||||||
|                      v8::Local<v8::Value> val, |                      v8::Local<v8::Value> val, | ||||||
|                      network::mojom::ReferrerPolicy* out); |                      blink::WebReferrerPolicy* out); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags); | v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags); | ||||||
|  |  | ||||||
|  | @ -43,19 +43,16 @@ void CallTranslater(v8::Local<v8::External> external, | ||||||
|                     mate::Arguments* args) { |                     mate::Arguments* args) { | ||||||
|   // Whether the callback should only be called for once.
 |   // Whether the callback should only be called for once.
 | ||||||
|   v8::Isolate* isolate = args->isolate(); |   v8::Isolate* isolate = args->isolate(); | ||||||
|   auto context = isolate->GetCurrentContext(); |   bool one_time = state->Has(mate::StringToSymbol(isolate, "oneTime")); | ||||||
|   bool one_time = |  | ||||||
|       state->Has(context, mate::StringToSymbol(isolate, "oneTime")).ToChecked(); |  | ||||||
| 
 | 
 | ||||||
|   // Check if the callback has already been called.
 |   // Check if the callback has already been called.
 | ||||||
|   if (one_time) { |   if (one_time) { | ||||||
|     auto called_symbol = mate::StringToSymbol(isolate, "called"); |     auto called_symbol = mate::StringToSymbol(isolate, "called"); | ||||||
|     if (state->Has(context, called_symbol).ToChecked()) { |     if (state->Has(called_symbol)) { | ||||||
|       args->ThrowError("callback can only be called for once"); |       args->ThrowError("callback can only be called for once"); | ||||||
|       return; |       return; | ||||||
|     } else { |     } else { | ||||||
|       state->Set(context, called_symbol, v8::Boolean::New(isolate, true)) |       state->Set(called_symbol, v8::Boolean::New(isolate, true)); | ||||||
|           .ToChecked(); |  | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | @ -133,10 +130,9 @@ v8::Local<v8::Value> CreateFunctionFromTranslater(v8::Isolate* isolate, | ||||||
|   Dictionary state = mate::Dictionary::CreateEmpty(isolate); |   Dictionary state = mate::Dictionary::CreateEmpty(isolate); | ||||||
|   if (one_time) |   if (one_time) | ||||||
|     state.Set("oneTime", true); |     state.Set("oneTime", true); | ||||||
|   auto context = isolate->GetCurrentContext(); |   return BindFunctionWith(isolate, isolate->GetCurrentContext(), | ||||||
|   return BindFunctionWith( |                           call_translater->GetFunction(), | ||||||
|       isolate, context, call_translater->GetFunction(context).ToLocalChecked(), |                           holder->handle.Get(isolate), state.GetHandle()); | ||||||
|       holder->handle.Get(isolate), state.GetHandle()); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // func.bind(func, arg1).
 | // func.bind(func, arg1).
 | ||||||
|  |  | ||||||
|  | @ -55,10 +55,8 @@ struct V8FunctionInvoker<v8::Local<v8::Value>(ArgTypes...)> { | ||||||
|     v8::Local<v8::Context> context = holder->CreationContext(); |     v8::Local<v8::Context> context = holder->CreationContext(); | ||||||
|     v8::Context::Scope context_scope(context); |     v8::Context::Scope context_scope(context); | ||||||
|     std::vector<v8::Local<v8::Value>> args{ConvertToV8(isolate, raw)...}; |     std::vector<v8::Local<v8::Value>> args{ConvertToV8(isolate, raw)...}; | ||||||
|     v8::Local<v8::Value> ret(holder |     v8::Local<v8::Value> ret(holder->Call( | ||||||
|                                  ->Call(context, holder, args.size(), |         holder, args.size(), args.empty() ? nullptr : &args.front())); | ||||||
|                                         args.empty() ? nullptr : &args.front()) |  | ||||||
|                                  .ToLocalChecked()); |  | ||||||
|     return handle_scope.Escape(ret); |     return handle_scope.Escape(ret); | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
|  | @ -78,10 +76,7 @@ struct V8FunctionInvoker<void(ArgTypes...)> { | ||||||
|     v8::Local<v8::Context> context = holder->CreationContext(); |     v8::Local<v8::Context> context = holder->CreationContext(); | ||||||
|     v8::Context::Scope context_scope(context); |     v8::Context::Scope context_scope(context); | ||||||
|     std::vector<v8::Local<v8::Value>> args{ConvertToV8(isolate, raw)...}; |     std::vector<v8::Local<v8::Value>> args{ConvertToV8(isolate, raw)...}; | ||||||
|     holder |     holder->Call(holder, args.size(), args.empty() ? nullptr : &args.front()); | ||||||
|         ->Call(context, holder, args.size(), |  | ||||||
|                args.empty() ? nullptr : &args.front()) |  | ||||||
|         .ToLocalChecked(); |  | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -331,9 +331,8 @@ base::Value* V8ValueConverter::FromV8ValueImpl(FromV8ValueState* state, | ||||||
|     v8::Local<v8::Value> toISOString = |     v8::Local<v8::Value> toISOString = | ||||||
|         date->Get(v8::String::NewFromUtf8(isolate, "toISOString")); |         date->Get(v8::String::NewFromUtf8(isolate, "toISOString")); | ||||||
|     if (toISOString->IsFunction()) { |     if (toISOString->IsFunction()) { | ||||||
|       v8::Local<v8::Value> result = toISOString.As<v8::Function>() |       v8::Local<v8::Value> result = | ||||||
|                                         ->Call(context, val, 0, nullptr) |           toISOString.As<v8::Function>()->Call(val, 0, nullptr); | ||||||
|                                         .ToLocalChecked(); |  | ||||||
|       if (!result.IsEmpty()) { |       if (!result.IsEmpty()) { | ||||||
|         v8::String::Utf8Value utf8(isolate, |         v8::String::Utf8Value utf8(isolate, | ||||||
|                                    result->ToString(context).ToLocalChecked()); |                                    result->ToString(context).ToLocalChecked()); | ||||||
|  |  | ||||||
|  | @ -7,7 +7,7 @@ | ||||||
| #include <windows.h> | #include <windows.h> | ||||||
| 
 | 
 | ||||||
| #include "base/logging.h" | #include "base/logging.h" | ||||||
| #include "base/system/sys_info.h" | #include "base/sys_info.h" | ||||||
| 
 | 
 | ||||||
| namespace atom { | namespace atom { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -211,11 +211,10 @@ void SpellCheckClient::SpellCheckWords( | ||||||
|   v8::Local<v8::FunctionTemplate> templ = mate::CreateFunctionTemplate( |   v8::Local<v8::FunctionTemplate> templ = mate::CreateFunctionTemplate( | ||||||
|       isolate_, base::Bind(&SpellCheckClient::OnSpellCheckDone, AsWeakPtr())); |       isolate_, base::Bind(&SpellCheckClient::OnSpellCheckDone, AsWeakPtr())); | ||||||
| 
 | 
 | ||||||
|   auto context = isolate_->GetCurrentContext(); |  | ||||||
|   v8::Local<v8::Value> args[] = {mate::ConvertToV8(isolate_, words), |   v8::Local<v8::Value> args[] = {mate::ConvertToV8(isolate_, words), | ||||||
|                                  templ->GetFunction(context).ToLocalChecked()}; |                                  templ->GetFunction()}; | ||||||
|   // Call javascript with the words and the callback function
 |   // Call javascript with the words and the callback function
 | ||||||
|   scope.spell_check_->Call(context, scope.provider_, 2, args).ToLocalChecked(); |   scope.spell_check_->Call(scope.provider_, 2, args); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // Returns whether or not the given string is a contraction.
 | // Returns whether or not the given string is a contraction.
 | ||||||
|  |  | ||||||
|  | @ -222,9 +222,7 @@ int WebFrame::GetWebFrameId(v8::Local<v8::Value> content_window) { | ||||||
| void WebFrame::SetSpellCheckProvider(mate::Arguments* args, | void WebFrame::SetSpellCheckProvider(mate::Arguments* args, | ||||||
|                                      const std::string& language, |                                      const std::string& language, | ||||||
|                                      v8::Local<v8::Object> provider) { |                                      v8::Local<v8::Object> provider) { | ||||||
|   auto context = args->isolate()->GetCurrentContext(); |   if (!provider->Has(mate::StringToV8(args->isolate(), "spellCheck"))) { | ||||||
|   if (!provider->Has(context, mate::StringToV8(args->isolate(), "spellCheck")) |  | ||||||
|            .ToChecked()) { |  | ||||||
|     args->ThrowError("\"spellCheck\" has to be defined"); |     args->ThrowError("\"spellCheck\" has to be defined"); | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
|  | @ -284,7 +282,7 @@ void WebFrame::RegisterURLSchemeAsPrivileged(const std::string& scheme, | ||||||
|         privileged_scheme); |         privileged_scheme); | ||||||
|   } |   } | ||||||
|   if (corsEnabled) { |   if (corsEnabled) { | ||||||
|     url::AddCorsEnabledScheme(scheme.c_str()); |     url::AddCORSEnabledScheme(scheme.c_str()); | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -543,9 +541,7 @@ void Initialize(v8::Local<v8::Object> exports, | ||||||
|   v8::Isolate* isolate = context->GetIsolate(); |   v8::Isolate* isolate = context->GetIsolate(); | ||||||
|   mate::Dictionary dict(isolate, exports); |   mate::Dictionary dict(isolate, exports); | ||||||
|   dict.Set("webFrame", WebFrame::Create(isolate)); |   dict.Set("webFrame", WebFrame::Create(isolate)); | ||||||
|   dict.Set( |   dict.Set("WebFrame", WebFrame::GetConstructor(isolate)->GetFunction()); | ||||||
|       "WebFrame", |  | ||||||
|       WebFrame::GetConstructor(isolate)->GetFunction(context).ToLocalChecked()); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace
 | }  // namespace
 | ||||||
|  |  | ||||||
|  | @ -45,6 +45,7 @@ bool ContentSettingsObserver::AllowStorage(bool local) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool ContentSettingsObserver::AllowIndexedDB( | bool ContentSettingsObserver::AllowIndexedDB( | ||||||
|  |     const blink::WebString& name, | ||||||
|     const blink::WebSecurityOrigin& security_origin) { |     const blink::WebSecurityOrigin& security_origin) { | ||||||
|   blink::WebFrame* frame = render_frame()->GetWebFrame(); |   blink::WebFrame* frame = render_frame()->GetWebFrame(); | ||||||
|   if (frame->GetSecurityOrigin().IsUnique() || |   if (frame->GetSecurityOrigin().IsUnique() || | ||||||
|  |  | ||||||
|  | @ -22,7 +22,8 @@ class ContentSettingsObserver : public content::RenderFrameObserver, | ||||||
|                      const blink::WebString& display_name, |                      const blink::WebString& display_name, | ||||||
|                      unsigned estimated_size) override; |                      unsigned estimated_size) override; | ||||||
|   bool AllowStorage(bool local) override; |   bool AllowStorage(bool local) override; | ||||||
|   bool AllowIndexedDB(const blink::WebSecurityOrigin& security_origin) override; |   bool AllowIndexedDB(const blink::WebString& name, | ||||||
|  |                       const blink::WebSecurityOrigin& security_origin) override; | ||||||
| 
 | 
 | ||||||
|  private: |  private: | ||||||
|   // content::RenderFrameObserver implementation.
 |   // content::RenderFrameObserver implementation.
 | ||||||
|  |  | ||||||
|  | @ -4,6 +4,7 @@ | ||||||
| 
 | 
 | ||||||
| #include "atom/utility/atom_content_utility_client.h" | #include "atom/utility/atom_content_utility_client.h" | ||||||
| 
 | 
 | ||||||
|  | #include <string> | ||||||
| #include <utility> | #include <utility> | ||||||
| 
 | 
 | ||||||
| #include "base/command_line.h" | #include "base/command_line.h" | ||||||
|  | @ -94,6 +95,11 @@ void AtomContentUtilityClient::RegisterServices(StaticServiceMap* services) { | ||||||
|                     proxy_resolver_info); |                     proxy_resolver_info); | ||||||
| 
 | 
 | ||||||
| #if BUILDFLAG(ENABLE_PRINTING) | #if BUILDFLAG(ENABLE_PRINTING) | ||||||
|  |   service_manager::EmbeddedServiceInfo pdf_compositor_info; | ||||||
|  |   pdf_compositor_info.factory = | ||||||
|  |       base::BindRepeating(&printing::CreatePdfCompositorService, std::string()); | ||||||
|  |   services->emplace(printing::mojom::kServiceName, pdf_compositor_info); | ||||||
|  | 
 | ||||||
|   service_manager::EmbeddedServiceInfo printing_info; |   service_manager::EmbeddedServiceInfo printing_info; | ||||||
|   printing_info.factory = |   printing_info.factory = | ||||||
|       base::BindRepeating(&printing::PrintingService::CreateService); |       base::BindRepeating(&printing::PrintingService::CreateService); | ||||||
|  | @ -101,18 +107,4 @@ void AtomContentUtilityClient::RegisterServices(StaticServiceMap* services) { | ||||||
| #endif | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::unique_ptr<service_manager::Service> |  | ||||||
| AtomContentUtilityClient::HandleServiceRequest( |  | ||||||
|     const std::string& service_name, |  | ||||||
|     service_manager::mojom::ServiceRequest request) { |  | ||||||
| #if BUILDFLAG(ENABLE_PRINTING) |  | ||||||
|   if (service_name == printing::mojom::kServiceName) { |  | ||||||
|     return printing::CreatePdfCompositorService(std::string(), |  | ||||||
|                                                 std::move(request)); |  | ||||||
|   } |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
|   return nullptr; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| }  // namespace atom
 | }  // namespace atom
 | ||||||
|  |  | ||||||
|  | @ -6,7 +6,6 @@ | ||||||
| #define ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_ | #define ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_ | ||||||
| 
 | 
 | ||||||
| #include <memory> | #include <memory> | ||||||
| #include <string> |  | ||||||
| #include <vector> | #include <vector> | ||||||
| 
 | 
 | ||||||
| #include "base/compiler_specific.h" | #include "base/compiler_specific.h" | ||||||
|  | @ -28,10 +27,6 @@ class AtomContentUtilityClient : public content::ContentUtilityClient { | ||||||
|   bool OnMessageReceived(const IPC::Message& message) override; |   bool OnMessageReceived(const IPC::Message& message) override; | ||||||
|   void RegisterServices(StaticServiceMap* services) override; |   void RegisterServices(StaticServiceMap* services) override; | ||||||
| 
 | 
 | ||||||
|   std::unique_ptr<service_manager::Service> HandleServiceRequest( |  | ||||||
|       const std::string& service_name, |  | ||||||
|       service_manager::mojom::ServiceRequest request) override; |  | ||||||
| 
 |  | ||||||
|  private: |  private: | ||||||
| #if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN) | #if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN) | ||||||
|   std::unique_ptr<printing::PrintingHandler> printing_handler_; |   std::unique_ptr<printing::PrintingHandler> printing_handler_; | ||||||
|  |  | ||||||
|  | @ -90,7 +90,6 @@ static_library("chrome") { | ||||||
|         "//chrome/browser/ui/views/color_chooser_aura.cc", |         "//chrome/browser/ui/views/color_chooser_aura.cc", | ||||||
|         "//chrome/browser/ui/views/color_chooser_aura.h", |         "//chrome/browser/ui/views/color_chooser_aura.h", | ||||||
|       ] |       ] | ||||||
|       deps += [ "//components/feature_engagement" ] |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if (is_mac) { |     if (is_mac) { | ||||||
|  | @ -113,15 +112,18 @@ static_library("chrome") { | ||||||
| 
 | 
 | ||||||
|   if (enable_tts) { |   if (enable_tts) { | ||||||
|     sources += [ |     sources += [ | ||||||
|       "//chrome/browser/speech/tts_controller_delegate_impl.cc", |       "//chrome/browser/speech/tts_controller.h", | ||||||
|       "//chrome/browser/speech/tts_controller_delegate_impl.h", |       "//chrome/browser/speech/tts_controller_impl.cc", | ||||||
|  |       "//chrome/browser/speech/tts_controller_impl.h", | ||||||
|       "//chrome/browser/speech/tts_mac.mm", |       "//chrome/browser/speech/tts_mac.mm", | ||||||
|       "//chrome/browser/speech/tts_message_filter.cc", |       "//chrome/browser/speech/tts_message_filter.cc", | ||||||
|       "//chrome/browser/speech/tts_message_filter.h", |       "//chrome/browser/speech/tts_message_filter.h", | ||||||
|       "//chrome/browser/speech/tts_platform.h ", |       "//chrome/browser/speech/tts_platform.cc", | ||||||
|       "//chrome/browser/speech/tts_platform_impl.cc", |       "//chrome/browser/speech/tts_platform.h", | ||||||
|       "//chrome/browser/speech/tts_platform_impl.h", |  | ||||||
|       "//chrome/browser/speech/tts_win.cc", |       "//chrome/browser/speech/tts_win.cc", | ||||||
|  |       "//chrome/common/tts_messages.h", | ||||||
|  |       "//chrome/common/tts_utterance_request.cc", | ||||||
|  |       "//chrome/common/tts_utterance_request.h", | ||||||
|       "//chrome/renderer/tts_dispatcher.cc", |       "//chrome/renderer/tts_dispatcher.cc", | ||||||
|       "//chrome/renderer/tts_dispatcher.h", |       "//chrome/renderer/tts_dispatcher.h", | ||||||
|     ] |     ] | ||||||
|  |  | ||||||
|  | @ -375,11 +375,6 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. | ||||||
|       English and not localized. |       English and not localized. | ||||||
|     * `navigateOnDragDrop` Boolean (optional) - Whether dragging and dropping a |     * `navigateOnDragDrop` Boolean (optional) - Whether dragging and dropping a | ||||||
|       file or link onto the page causes a navigation. Default is `false`. |       file or link onto the page causes a navigation. Default is `false`. | ||||||
|     * `autoplayPolicy` String (optional) - Autoplay policy to apply to |  | ||||||
|       content in the window, can be `no-user-gesture-required`, |  | ||||||
|       `user-gesture-required`, `user-gesture-required-for-cross-origin`, |  | ||||||
|       `document-user-activation-required`. Defaults to |  | ||||||
|       `no-user-gesture-required`. |  | ||||||
| 
 | 
 | ||||||
| When setting minimum or maximum window size with `minWidth`/`maxWidth`/ | When setting minimum or maximum window size with `minWidth`/`maxWidth`/ | ||||||
| `minHeight`/`maxHeight`, it only constrains the users. It won't prevent you from | `minHeight`/`maxHeight`, it only constrains the users. It won't prevent you from | ||||||
|  |  | ||||||
|  | @ -177,7 +177,6 @@ filenames = { | ||||||
|     "atom/browser/api/atom_api_view.h", |     "atom/browser/api/atom_api_view.h", | ||||||
|     "atom/browser/api/atom_api_web_contents.cc", |     "atom/browser/api/atom_api_web_contents.cc", | ||||||
|     "atom/browser/api/atom_api_web_contents.h", |     "atom/browser/api/atom_api_web_contents.h", | ||||||
|     "atom/browser/api/atom_api_web_contents_impl.cc", |  | ||||||
|     "atom/browser/api/atom_api_web_contents_mac.mm", |     "atom/browser/api/atom_api_web_contents_mac.mm", | ||||||
|     "atom/browser/api/atom_api_web_contents_view.cc", |     "atom/browser/api/atom_api_web_contents_view.cc", | ||||||
|     "atom/browser/api/atom_api_web_contents_view.h", |     "atom/browser/api/atom_api_web_contents_view.h", | ||||||
|  |  | ||||||
|  | @ -181,7 +181,7 @@ const attachGuest = function (event, embedderFrameId, elementInstanceId, guestIn | ||||||
| 
 | 
 | ||||||
|     const oldGuestInstance = guestInstances[oldGuestInstanceId] |     const oldGuestInstance = guestInstances[oldGuestInstanceId] | ||||||
|     if (oldGuestInstance) { |     if (oldGuestInstance) { | ||||||
|       oldGuestInstance.guest.detachFromOuterFrame() |       oldGuestInstance.guest.destroy() | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | @ -361,7 +361,7 @@ handleMessage('ELECTRON_GUEST_VIEW_MANAGER_CREATE_GUEST_SYNC', function (event, | ||||||
| handleMessage('ELECTRON_GUEST_VIEW_MANAGER_DESTROY_GUEST', function (event, guestInstanceId) { | handleMessage('ELECTRON_GUEST_VIEW_MANAGER_DESTROY_GUEST', function (event, guestInstanceId) { | ||||||
|   try { |   try { | ||||||
|     const guest = getGuestForWebContents(guestInstanceId, event.sender) |     const guest = getGuestForWebContents(guestInstanceId, event.sender) | ||||||
|     guest.detachFromOuterFrame() |     guest.destroy() | ||||||
|   } catch (error) { |   } catch (error) { | ||||||
|     console.error(`Guest destroy failed: ${error}`) |     console.error(`Guest destroy failed: ${error}`) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | @ -106,9 +106,7 @@ class Dictionary { | ||||||
|   bool SetMethod(const base::StringPiece& key, const T& callback) { |   bool SetMethod(const base::StringPiece& key, const T& callback) { | ||||||
|     return GetHandle()->Set( |     return GetHandle()->Set( | ||||||
|         StringToV8(isolate_, key), |         StringToV8(isolate_, key), | ||||||
|         CallbackTraits<T>::CreateTemplate(isolate_, callback) |         CallbackTraits<T>::CreateTemplate(isolate_, callback)->GetFunction()); | ||||||
|             ->GetFunction(isolate_->GetCurrentContext()) |  | ||||||
|             .ToLocalChecked()); |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   bool Delete(const base::StringPiece& key) { |   bool Delete(const base::StringPiece& key) { | ||||||
|  |  | ||||||
|  | @ -39,8 +39,7 @@ void WrappableBase::InitWith(v8::Isolate* isolate, | ||||||
|   // Call object._init if we have one.
 |   // Call object._init if we have one.
 | ||||||
|   v8::Local<v8::Function> init; |   v8::Local<v8::Function> init; | ||||||
|   if (Dictionary(isolate, wrapper).Get("_init", &init)) |   if (Dictionary(isolate, wrapper).Get("_init", &init)) | ||||||
|     init->Call(isolate->GetCurrentContext(), wrapper, 0, nullptr) |     init->Call(wrapper, 0, nullptr); | ||||||
|         .ToLocalChecked(); |  | ||||||
| 
 | 
 | ||||||
|   AfterInit(isolate); |   AfterInit(isolate); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,2 +1,3 @@ | ||||||
|  | implement_ssl_get_tlsext_status_type.patch | ||||||
| add_ec_group_order_bits_for_openssl_compatibility.patch | add_ec_group_order_bits_for_openssl_compatibility.patch | ||||||
| add_ec_key_key2buf_for_openssl_compatibility.patch | add_ec_key_key2buf_for_openssl_compatibility.patch | ||||||
|  |  | ||||||
|  | @ -9,10 +9,10 @@ Commit-Queue: Adam Langley <agl@google.com> | ||||||
| Reviewed-by: Adam Langley <agl@google.com> | Reviewed-by: Adam Langley <agl@google.com> | ||||||
| 
 | 
 | ||||||
| diff --git a/crypto/fipsmodule/ec/ec.c b/crypto/fipsmodule/ec/ec.c
 | diff --git a/crypto/fipsmodule/ec/ec.c b/crypto/fipsmodule/ec/ec.c
 | ||||||
| index bd0662a703d6285df51735c5d4870d21a82b39cf..90b9d71f61f8d6d7ddf838c47a59729748d0d0f2 100644
 | index 908e35e9d04e657c13ba61c8ea5bf4a4519228c5..43e170b9190bf1813216b10863bbaf6402331161 100644
 | ||||||
| --- a/crypto/fipsmodule/ec/ec.c
 | --- a/crypto/fipsmodule/ec/ec.c
 | ||||||
| +++ b/crypto/fipsmodule/ec/ec.c
 | +++ b/crypto/fipsmodule/ec/ec.c
 | ||||||
| @@ -625,6 +625,10 @@ int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx) {
 | @@ -605,6 +605,10 @@ int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx) {
 | ||||||
|    return 1; |    return 1; | ||||||
|  } |  } | ||||||
|   |   | ||||||
|  | @ -24,7 +24,7 @@ index bd0662a703d6285df51735c5d4870d21a82b39cf..90b9d71f61f8d6d7ddf838c47a597297 | ||||||
|                            BN_CTX *ctx) { |                            BN_CTX *ctx) { | ||||||
|    // All |EC_GROUP|s have cofactor 1. |    // All |EC_GROUP|s have cofactor 1. | ||||||
| diff --git a/include/openssl/ec.h b/include/openssl/ec.h
 | diff --git a/include/openssl/ec.h b/include/openssl/ec.h
 | ||||||
| index 966393ea3b726214aa84a604c8e5a13654dcdf76..c65a1a7519fd80b681d1cf899792ee46aaa8bad6 100644
 | index 41a9c34c5ad1bbfdff8e37c1e245ac7fac7a3869..e4195fc15a26e61ef1e74ac7054ddabb256ae9a3 100644
 | ||||||
| --- a/include/openssl/ec.h
 | --- a/include/openssl/ec.h
 | ||||||
| +++ b/include/openssl/ec.h
 | +++ b/include/openssl/ec.h
 | ||||||
| @@ -133,6 +133,9 @@ OPENSSL_EXPORT const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
 | @@ -133,6 +133,9 @@ OPENSSL_EXPORT const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
 | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ Reviewed-by: Adam Langley <agl@google.com> | ||||||
| Commit-Queue: Adam Langley <agl@google.com> | Commit-Queue: Adam Langley <agl@google.com> | ||||||
| 
 | 
 | ||||||
| diff --git a/crypto/fipsmodule/ec/ec_key.c b/crypto/fipsmodule/ec/ec_key.c
 | diff --git a/crypto/fipsmodule/ec/ec_key.c b/crypto/fipsmodule/ec/ec_key.c
 | ||||||
| index 632dc9b2d902dfba01567f4c02ad7ad6d0c8c3e8..4bc12a073650f66f5ae8ba2beabb9a6fb2b21878 100644
 | index a6d469767adfad1c9095cc58c567b10c71e95cfa..ba69e83cb8f49c70a98c8fd68fd7fa4b122da5cd 100644
 | ||||||
| --- a/crypto/fipsmodule/ec/ec_key.c
 | --- a/crypto/fipsmodule/ec/ec_key.c
 | ||||||
| +++ b/crypto/fipsmodule/ec/ec_key.c
 | +++ b/crypto/fipsmodule/ec/ec_key.c
 | ||||||
| @@ -394,6 +394,33 @@ err:
 | @@ -394,6 +394,33 @@ err:
 | ||||||
|  |  | ||||||
|  | @ -0,0 +1,58 @@ | ||||||
|  | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Jeremy Apthorp <jeremya@chromium.org> | ||||||
|  | Date: Thu, 18 Oct 2018 14:18:05 -0700 | ||||||
|  | Subject: Implement SSL_get_tlsext_status_type | ||||||
|  | 
 | ||||||
|  | It's used by Node.js[1], and is simple to implement. | ||||||
|  | 
 | ||||||
|  | [1]: https://github.com/nodejs/node/blob/e2f58c71ddf0f91256cc85e6bb226a068256c5eb/src/node_crypto.cc#L2390 | ||||||
|  | 
 | ||||||
|  | Change-Id: Ie5c76b848623d00f7478aeae0214c25472de523c | ||||||
|  | Reviewed-on: https://boringssl-review.googlesource.com/c/32525 | ||||||
|  | Reviewed-by: David Benjamin <davidben@google.com> | ||||||
|  | Commit-Queue: David Benjamin <davidben@google.com> | ||||||
|  | CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | ||||||
|  | 
 | ||||||
|  | diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
 | ||||||
|  | index c0d44ce2820fb20273b453def0b5bcb5ddcc14e9..f0d9dd45e2c41968a84c8a3f31a8c9e4f621f018 100644
 | ||||||
|  | --- a/include/openssl/ssl.h
 | ||||||
|  | +++ b/include/openssl/ssl.h
 | ||||||
|  | @@ -4268,6 +4268,14 @@ OPENSSL_EXPORT int OPENSSL_init_ssl(uint64_t opts,
 | ||||||
|  |  // Use |SSL_enable_ocsp_stapling| instead. | ||||||
|  |  OPENSSL_EXPORT int SSL_set_tlsext_status_type(SSL *ssl, int type); | ||||||
|  |   | ||||||
|  | +// SSL_get_tlsext_status_type returns |TLSEXT_STATUSTYPE_ocsp| if the client
 | ||||||
|  | +// requested OCSP stapling and |TLSEXT_STATUSTYPE_nothing| otherwise. On the
 | ||||||
|  | +// client, this reflects whether OCSP stapling was enabled via, e.g.,
 | ||||||
|  | +// |SSL_set_tlsext_status_type|. On the server, this is determined during the
 | ||||||
|  | +// handshake. It may be queried in callbacks set by |SSL_CTX_set_cert_cb|. The
 | ||||||
|  | +// result is undefined after the handshake completes.
 | ||||||
|  | +OPENSSL_EXPORT int SSL_get_tlsext_status_type(const SSL *ssl);
 | ||||||
|  | +
 | ||||||
|  |  // SSL_set_tlsext_status_ocsp_resp sets the OCSP response. It returns one on | ||||||
|  |  // success and zero on error. On success, |ssl| takes ownership of |resp|, which | ||||||
|  |  // must have been allocated by |OPENSSL_malloc|. | ||||||
|  | diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
 | ||||||
|  | index 9c16de4958ef29d638e05e0f90b9b15b11b15cac..1f648658b8cb6ae7b82132b276b927e8fb11a47a 100644
 | ||||||
|  | --- a/ssl/ssl_lib.cc
 | ||||||
|  | +++ b/ssl/ssl_lib.cc
 | ||||||
|  | @@ -2751,6 +2751,19 @@ int SSL_set_tlsext_status_type(SSL *ssl, int type) {
 | ||||||
|  |    return 1; | ||||||
|  |  } | ||||||
|  |   | ||||||
|  | +int SSL_get_tlsext_status_type(const SSL *ssl) {
 | ||||||
|  | +  if (ssl->server) {
 | ||||||
|  | +    SSL_HANDSHAKE *hs = ssl->s3->hs.get();
 | ||||||
|  | +    return hs != nullptr && hs->ocsp_stapling_requested
 | ||||||
|  | +        ? TLSEXT_STATUSTYPE_ocsp
 | ||||||
|  | +        : TLSEXT_STATUSTYPE_nothing;
 | ||||||
|  | +  }
 | ||||||
|  | +
 | ||||||
|  | +  return ssl->config != nullptr && ssl->config->ocsp_stapling_enabled
 | ||||||
|  | +             ? TLSEXT_STATUSTYPE_ocsp
 | ||||||
|  | +             : TLSEXT_STATUSTYPE_nothing;
 | ||||||
|  | +}
 | ||||||
|  | +
 | ||||||
|  |  int SSL_set_tlsext_status_ocsp_resp(SSL *ssl, uint8_t *resp, size_t resp_len) { | ||||||
|  |    if (SSL_set_ocsp_response(ssl, resp, resp_len)) { | ||||||
|  |      OPENSSL_free(resp); | ||||||
|  | @ -2,6 +2,7 @@ add_realloc.patch | ||||||
| build_gn.patch | build_gn.patch | ||||||
| dcheck.patch | dcheck.patch | ||||||
| accelerator.patch | accelerator.patch | ||||||
|  | app_indicator_icon_menu.patch | ||||||
| blink_file_path.patch | blink_file_path.patch | ||||||
| blink_local_frame.patch | blink_local_frame.patch | ||||||
| blink_world_context.patch | blink_world_context.patch | ||||||
|  | @ -42,6 +43,7 @@ mas-cgdisplayusesforcetogray.patch | ||||||
| mas-audiodeviceduck.patch | mas-audiodeviceduck.patch | ||||||
| mas-lssetapplicationlaunchservicesserverconnectionstatus.patch | mas-lssetapplicationlaunchservicesserverconnectionstatus.patch | ||||||
| allow_webview_file_url.patch | allow_webview_file_url.patch | ||||||
|  | windows_cc_wrapper.patch | ||||||
| enable_osr_components.patch | enable_osr_components.patch | ||||||
| ignore_rc_check.patch | ignore_rc_check.patch | ||||||
| enable_widevine.patch | enable_widevine.patch | ||||||
|  | @ -64,9 +66,9 @@ tts.patch | ||||||
| color_chooser.patch | color_chooser.patch | ||||||
| printing.patch | printing.patch | ||||||
| verbose_generate_breakpad_symbols.patch | verbose_generate_breakpad_symbols.patch | ||||||
|  | customizable_app_indicator_id_prefix.patch | ||||||
| cross_site_document_resource_handler.patch | cross_site_document_resource_handler.patch | ||||||
| content_allow_embedder_to_prevent_locking_scheme_registry.patch | content_allow_embedder_to_prevent_locking_scheme_registry.patch | ||||||
|  | fix_trackpad_scrolling.patch | ||||||
| support_mixed_sandbox_with_zygote.patch | support_mixed_sandbox_with_zygote.patch | ||||||
| disable_color_correct_rendering.patch | disable_color_correct_rendering.patch | ||||||
| disable_time_ticks_dcheck.patch |  | ||||||
| fix_test_compilation_error.patch |  | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ Subject: accelerator.patch | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
 | diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
 | ||||||
| index bf214d0b04ea5cf6711cd50618ad843bd054e538..7f245b1e8b9b3c5dc6666be4d74b69c86e80a351 100644
 | index d56e87be04cb4d765d0aa0eae1af86a9f562b222..9364ac4b75debc61e201e0da7eaef104acea770d 100644
 | ||||||
| --- a/ui/base/accelerators/accelerator.cc
 | --- a/ui/base/accelerators/accelerator.cc
 | ||||||
| +++ b/ui/base/accelerators/accelerator.cc
 | +++ b/ui/base/accelerators/accelerator.cc
 | ||||||
| @@ -11,6 +11,7 @@
 | @@ -11,6 +11,7 @@
 | ||||||
|  | @ -16,7 +16,7 @@ index bf214d0b04ea5cf6711cd50618ad843bd054e538..7f245b1e8b9b3c5dc6666be4d74b69c8 | ||||||
|  #include "base/strings/utf_string_conversions.h" |  #include "base/strings/utf_string_conversions.h" | ||||||
|  #include "build/build_config.h" |  #include "build/build_config.h" | ||||||
|  #include "ui/base/l10n/l10n_util.h" |  #include "ui/base/l10n/l10n_util.h" | ||||||
| @@ -22,9 +23,7 @@
 | @@ -21,9 +22,7 @@
 | ||||||
|  #include <windows.h> |  #include <windows.h> | ||||||
|  #endif |  #endif | ||||||
|   |   | ||||||
|  | @ -26,7 +26,7 @@ index bf214d0b04ea5cf6711cd50618ad843bd054e538..7f245b1e8b9b3c5dc6666be4d74b69c8 | ||||||
|   |   | ||||||
|  namespace ui { |  namespace ui { | ||||||
|   |   | ||||||
| @@ -148,7 +147,15 @@ base::string16 Accelerator::GetShortcutText() const {
 | @@ -147,7 +146,15 @@ base::string16 Accelerator::GetShortcutText() const {
 | ||||||
|    shortcut = KeyCodeToName(key_code_); |    shortcut = KeyCodeToName(key_code_); | ||||||
|  #endif |  #endif | ||||||
|   |   | ||||||
|  | @ -42,7 +42,7 @@ index bf214d0b04ea5cf6711cd50618ad843bd054e538..7f245b1e8b9b3c5dc6666be4d74b69c8 | ||||||
|  #if defined(OS_WIN) |  #if defined(OS_WIN) | ||||||
|      // Our fallback is to try translate the key code to a regular character |      // Our fallback is to try translate the key code to a regular character | ||||||
|      // unless it is one of digits (VK_0 to VK_9). Some keyboard |      // unless it is one of digits (VK_0 to VK_9). Some keyboard | ||||||
| @@ -157,18 +164,14 @@ base::string16 Accelerator::GetShortcutText() const {
 | @@ -156,18 +163,14 @@ base::string16 Accelerator::GetShortcutText() const {
 | ||||||
|      // accent' for '0'). For display in the menu (e.g. Ctrl-0 for the |      // accent' for '0'). For display in the menu (e.g. Ctrl-0 for the | ||||||
|      // default zoom level), we leave VK_[0-9] alone without translation. |      // default zoom level), we leave VK_[0-9] alone without translation. | ||||||
|      wchar_t key; |      wchar_t key; | ||||||
|  | @ -52,7 +52,7 @@ index bf214d0b04ea5cf6711cd50618ad843bd054e538..7f245b1e8b9b3c5dc6666be4d74b69c8 | ||||||
| -    else
 | -    else
 | ||||||
| -      key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR));
 | -      key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR));
 | ||||||
| -    shortcut += key;
 | -    shortcut += key;
 | ||||||
| -#elif defined(USE_AURA) || defined(OS_MACOSX) || defined(OS_ANDROID)
 | -#elif defined(USE_AURA) || defined(OS_MACOSX)
 | ||||||
| -    const uint16_t c = DomCodeToUsLayoutCharacter(
 | -    const uint16_t c = DomCodeToUsLayoutCharacter(
 | ||||||
| -        UsLayoutKeyboardCodeToDomCode(key_code_), false);
 | -        UsLayoutKeyboardCodeToDomCode(key_code_), false);
 | ||||||
| -    if (c != 0)
 | -    if (c != 0)
 | ||||||
|  | @ -67,7 +67,7 @@ index bf214d0b04ea5cf6711cd50618ad843bd054e538..7f245b1e8b9b3c5dc6666be4d74b69c8 | ||||||
|    } |    } | ||||||
|   |   | ||||||
|    // Checking whether the character used for the accelerator is alphanumeric. |    // Checking whether the character used for the accelerator is alphanumeric. | ||||||
| @@ -232,7 +235,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
 | @@ -231,7 +234,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
 | ||||||
|    // more information. |    // more information. | ||||||
|    if (IsCtrlDown()) |    if (IsCtrlDown()) | ||||||
|      shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_CTRL_KEY); |      shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_CTRL_KEY); | ||||||
|  |  | ||||||
|  | @ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f | ||||||
|   |   | ||||||
|    GIN_EXPORT static ArrayBufferAllocator* SharedInstance(); |    GIN_EXPORT static ArrayBufferAllocator* SharedInstance(); | ||||||
| diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | ||||||
| index 0050eb07bf1f1e8515663dfd14f2a3a1292edd96..96e8702f7e9f2a04a4edbc794d5c45e3e04bf8fb 100644
 | index 5db87633802ccc7efbd6b673505cd5c00deabf6e..235be280c4d9e54bcc2e3f60fc10036ad3b08356 100644
 | ||||||
| --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | ||||||
| +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | ||||||
| @@ -662,6 +662,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
 | @@ -660,6 +660,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
 | ||||||
|          size, WTF::ArrayBufferContents::kDontInitialize); |          size, WTF::ArrayBufferContents::kDontInitialize); | ||||||
|    } |    } | ||||||
|   |   | ||||||
|  | @ -54,7 +54,7 @@ index 0050eb07bf1f1e8515663dfd14f2a3a1292edd96..96e8702f7e9f2a04a4edbc794d5c45e3 | ||||||
|      WTF::ArrayBufferContents::FreeMemory(data); |      WTF::ArrayBufferContents::FreeMemory(data); | ||||||
|    } |    } | ||||||
| diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 | diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 | ||||||
| index 5a8dbf109f4f7eb682c23bf24c391b70a7717a0c..e0b33e815f2eb98aa494a8489543acdb873e1597 100644
 | index 127d6d39d5b089f3a91edc100be24b046c4da4fe..5ee94712c0fbf0a16eeca7aadd1a5be187bcf49e 100644
 | ||||||
| --- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 | --- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 | ||||||
| +++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 | +++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 | ||||||
| @@ -122,6 +122,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
 | @@ -122,6 +122,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
 | ||||||
|  | @ -70,7 +70,7 @@ index 5a8dbf109f4f7eb682c23bf24c391b70a7717a0c..e0b33e815f2eb98aa494a8489543acdb | ||||||
|    Partitions::ArrayBufferPartition()->Free(data); |    Partitions::ArrayBufferPartition()->Free(data); | ||||||
|  } |  } | ||||||
| diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
 | diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
 | ||||||
| index 3cc1abe8e48c8e45d1f3ebb98a6a6ea1a4e3fbd9..1e2438cc6da97a89fefc86148bb1037d3c84f765 100644
 | index 19ae6eb4a08c3499674f906c53164fa9194e5cf2..2f75c4b46c361f411c41242c406358da974ff7e4 100644
 | ||||||
| --- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
 | --- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
 | ||||||
| +++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
 | +++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
 | ||||||
| @@ -134,6 +134,7 @@ class WTF_EXPORT ArrayBufferContents {
 | @@ -134,6 +134,7 @@ class WTF_EXPORT ArrayBufferContents {
 | ||||||
|  |  | ||||||
|  | @ -6,10 +6,10 @@ Subject: allow_webview_file_url.patch | ||||||
| Allow webview to load non-web URLs. | Allow webview to load non-web URLs. | ||||||
| 
 | 
 | ||||||
| diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
 | diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
 | ||||||
| index 83b81f3e28f5f4f3a9fe3c2146c50a966f7e2ec2..d0f2bde4f6f7bb1a8b6cfc5dc990cb30d4432504 100644
 | index 8f33f39eb1d4bcae2e1d78890ee5e9e2d88b1e75..7645b12dbccf5a714e32c74c437216fdca9ac286 100644
 | ||||||
| --- a/content/browser/loader/resource_dispatcher_host_impl.cc
 | --- a/content/browser/loader/resource_dispatcher_host_impl.cc
 | ||||||
| +++ b/content/browser/loader/resource_dispatcher_host_impl.cc
 | +++ b/content/browser/loader/resource_dispatcher_host_impl.cc
 | ||||||
| @@ -1462,6 +1462,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
 | @@ -1480,6 +1480,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
 | ||||||
|        !policy->IsWebSafeScheme(info.common_params.url.scheme()) && |        !policy->IsWebSafeScheme(info.common_params.url.scheme()) && | ||||||
|        !is_external_protocol; |        !is_external_protocol; | ||||||
|   |   | ||||||
|  |  | ||||||
							
								
								
									
										19
									
								
								patches/common/chromium/app_indicator_icon_menu.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								patches/common/chromium/app_indicator_icon_menu.patch
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | ||||||
|  | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Anonymous <anonymous@electronjs.org> | ||||||
|  | Date: Thu, 20 Sep 2018 17:44:52 -0700 | ||||||
|  | Subject: app_indicator_icon_menu.patch | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | diff --git a/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc b/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
 | ||||||
|  | index 40399a35f8d2c70827adec732c898a5be09cf69b..1d3a0da948dca3fef3af53256d23e8ae2bd23bfa 100644
 | ||||||
|  | --- a/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
 | ||||||
|  | +++ b/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
 | ||||||
|  | @@ -116,7 +116,7 @@ void AppIndicatorIconMenu::OnMenuItemActivated(GtkWidget* menu_item) {
 | ||||||
|  |      return; | ||||||
|  |   | ||||||
|  |    // The menu item can still be activated by hotkeys even if it is disabled. | ||||||
|  | -  if (menu_model_->IsEnabledAt(id))
 | ||||||
|  | +  if (model->IsEnabledAt(id))
 | ||||||
|  |      ExecuteCommand(model, id); | ||||||
|  |  } | ||||||
|  |   | ||||||
|  | @ -5,10 +5,10 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | ||||||
| index c0cec745454d8e7ec0730852bb324bcae72ed42e..4550698d31ae2c1a511820ae88ce1d914fe10f7f 100644
 | index 4bc3d11ba0270bb4bba863724688ee5b6bc063d2..4f9accd65348b9c8f23f3e2d160e836c7841420b 100644
 | ||||||
| --- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | --- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | ||||||
| +++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | +++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | ||||||
| @@ -285,7 +285,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
 | @@ -261,7 +261,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
 | ||||||
|    // document (which is implemented in WorkerMessagingProxy, and |    // document (which is implemented in WorkerMessagingProxy, and | ||||||
|    // m_contentSecurityPolicy should be left as nullptr to inherit the policy). |    // m_contentSecurityPolicy should be left as nullptr to inherit the policy). | ||||||
|    if (!response.Url().ProtocolIs("blob") && |    if (!response.Url().ProtocolIs("blob") && | ||||||
|  |  | ||||||
|  | @ -7,10 +7,10 @@ This is used by editors to obtain the filesystem path from a dragged file. See | ||||||
| documentation at https://electronjs.org/docs/api/file-object | documentation at https://electronjs.org/docs/api/file-object | ||||||
| 
 | 
 | ||||||
| diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
 | diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
 | ||||||
| index 2ca09ab8903d56b466e186203279e865ed4dd058..d522b53111a1c452220a1ca08ffcc7206adaa309 100644
 | index 39831f1902c6ab85a0a4cac61a614931ee050ed6..fddb013aa122049de7142bca624d7d0749b58372 100644
 | ||||||
| --- a/third_party/blink/renderer/core/fileapi/file.h
 | --- a/third_party/blink/renderer/core/fileapi/file.h
 | ||||||
| +++ b/third_party/blink/renderer/core/fileapi/file.h
 | +++ b/third_party/blink/renderer/core/fileapi/file.h
 | ||||||
| @@ -193,6 +193,9 @@ class CORE_EXPORT File final : public Blob {
 | @@ -168,6 +168,9 @@ class CORE_EXPORT File final : public Blob {
 | ||||||
|    } |    } | ||||||
|    const String& name() const { return name_; } |    const String& name() const { return name_; } | ||||||
|   |   | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ In the long term we should investigate why it happened, and take a more | ||||||
| formal fix. But for now I'm just make this assertion silently pass away. | formal fix. But for now I'm just make this assertion silently pass away. | ||||||
| 
 | 
 | ||||||
| diff --git a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | diff --git a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | ||||||
| index e1378ffcd7e061aae635ad25078ee23674542786..6b07828930a9d5691609da394c192b9b5f531b5a 100644
 | index 87f2176ce897583b6682e8f49d1e4cac1392aacb..ce3d9ce19bff686640be08776a7dc5736e9bd83a 100644
 | ||||||
| --- a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | --- a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | ||||||
| +++ b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | +++ b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | ||||||
| @@ -98,8 +98,10 @@ v8::Local<v8::Function> V8ObjectConstructor::CreateInterfaceObject(
 | @@ -98,8 +98,10 @@ v8::Local<v8::Function> V8ObjectConstructor::CreateInterfaceObject(
 | ||||||
|  | @ -26,4 +26,4 @@ index e1378ffcd7e061aae635ad25078ee23674542786..6b07828930a9d5691609da394c192b9b | ||||||
| +      return v8::Local<v8::Function>();
 | +      return v8::Local<v8::Function>();
 | ||||||
|   |   | ||||||
|      prototype_object = prototype_value.As<v8::Object>(); |      prototype_object = prototype_value.As<v8::Object>(); | ||||||
|    } |      if (prototype_object->InternalFieldCount() == | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ to fix electron/electron#13787.  The backport landed in Chromium 67 but the | ||||||
| DidCreateScriptContext re-ordering needs to be upstreamed or kept indefinitely | DidCreateScriptContext re-ordering needs to be upstreamed or kept indefinitely | ||||||
| 
 | 
 | ||||||
| diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | ||||||
| index b43ca24b2595bbd20fb5cfa68a22ebec87acda33..496e5d16d49977cb2107a7101064093be19b1515 100644
 | index e148eda29606cdf8856c6875dc8e370f29e90f8a..c7289e9c60fc75d0db0d3671d7dd4b428bd80329 100644
 | ||||||
| --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | ||||||
| +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | ||||||
| @@ -177,11 +177,10 @@ void LocalWindowProxy::Initialize() {
 | @@ -177,11 +177,10 @@ void LocalWindowProxy::Initialize() {
 | ||||||
|  | @ -23,6 +23,6 @@ index b43ca24b2595bbd20fb5cfa68a22ebec87acda33..496e5d16d49977cb2107a7101064093b | ||||||
|   |   | ||||||
| -  InstallConditionalFeatures();
 | -  InstallConditionalFeatures();
 | ||||||
| -
 | -
 | ||||||
|    // This needs to go after everything else since it accesses the window object. |    if (World().IsMainWorld()) { | ||||||
|    InitializeV8ExtrasBinding(script_state_); |      GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld(); | ||||||
|   |    } | ||||||
|  |  | ||||||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Samuel Attard
				Samuel Attard