diff --git a/atom/app/atom_content_client.cc b/atom/app/atom_content_client.cc index 8e2a6c573097..09683211c582 100644 --- a/atom/app/atom_content_client.cc +++ b/atom/app/atom_content_client.cc @@ -93,9 +93,9 @@ content::PepperPluginInfo CreateWidevineCdmInfo(const base::FilePath& path, std::vector codecs; codecs.push_back(kCdmSupportedCodecVp8); codecs.push_back(kCdmSupportedCodecVp9); -#if defined(USE_PROPRIETARY_CODECS) +#if BUILDFLAG(USE_PROPRIETARY_CODECS) codecs.push_back(kCdmSupportedCodecAvc1); -#endif // defined(USE_PROPRIETARY_CODECS) +#endif // BUILDFLAG(USE_PROPRIETARY_CODECS) std::string codec_string = base::JoinString( codecs, std::string(1, kCdmSupportedCodecsValueDelimiter)); widevine_cdm_mime_type.additional_param_names.push_back( @@ -198,11 +198,19 @@ base::string16 AtomContentClient::GetLocalizedString(int message_id) const { return l10n_util::GetStringUTF16(message_id); } -void AtomContentClient::AddAdditionalSchemes( - std::vector* standard_schemes, - std::vector* referrer_schemes, - std::vector* savable_schemes) { - standard_schemes->push_back({"chrome-extension", url::SCHEME_WITHOUT_PORT}); +void AtomContentClient::AddAdditionalSchemes(Schemes* schemes) { + schemes->standard_schemes.push_back("chrome-extension"); + + std::vector splited; + ConvertStringWithSeparatorToVector(&splited, ",", + switches::kRegisterServiceWorkerSchemes); + for (const std::string& scheme : splited) + schemes->service_worker_schemes.push_back(scheme); + schemes->service_worker_schemes.push_back(url::kFileScheme); + + ConvertStringWithSeparatorToVector(&splited, ",", switches::kSecureSchemes); + for (const std::string& scheme : splited) + schemes->secure_schemes.push_back(scheme); } void AtomContentClient::AddPepperPlugins( @@ -214,25 +222,4 @@ void AtomContentClient::AddPepperPlugins( ComputeBuiltInPlugins(plugins); } -void AtomContentClient::AddServiceWorkerSchemes( - std::set* service_worker_schemes) { - std::vector schemes; - ConvertStringWithSeparatorToVector(&schemes, ",", - switches::kRegisterServiceWorkerSchemes); - for (const std::string& scheme : schemes) - service_worker_schemes->insert(scheme); - - service_worker_schemes->insert(url::kFileScheme); -} - -void AtomContentClient::AddSecureSchemesAndOrigins( - std::set* secure_schemes, - std::set* secure_origins) { - std::vector schemes; - ConvertStringWithSeparatorToVector(&schemes, ",", switches::kSecureSchemes); - for (const std::string& scheme : schemes) - secure_schemes->insert(scheme); -} - - } // namespace atom diff --git a/atom/app/atom_content_client.h b/atom/app/atom_content_client.h index e396dc23c8e9..fcd26f84183b 100644 --- a/atom/app/atom_content_client.h +++ b/atom/app/atom_content_client.h @@ -23,17 +23,9 @@ class AtomContentClient : public brightray::ContentClient { std::string GetProduct() const override; std::string GetUserAgent() const override; base::string16 GetLocalizedString(int message_id) const override; - void AddAdditionalSchemes( - std::vector* standard_schemes, - std::vector* referrer_schemes, - std::vector* savable_schemes) override; + void AddAdditionalSchemes(Schemes* schemes) override; void AddPepperPlugins( std::vector* plugins) override; - void AddServiceWorkerSchemes( - std::set* service_worker_schemes) override; - void AddSecureSchemesAndOrigins( - std::set* secure_schemes, - std::set* secure_origins) override; private: DISALLOW_COPY_AND_ASSIGN(AtomContentClient); diff --git a/atom/browser/api/atom_api_cookies.cc b/atom/browser/api/atom_api_cookies.cc index 2ce9e12f6c5b..629bb2f1bfc6 100644 --- a/atom/browser/api/atom_api_cookies.cc +++ b/atom/browser/api/atom_api_cookies.cc @@ -228,8 +228,8 @@ void SetCookieOnIO(scoped_refptr getter, GetCookieStore(getter)->SetCookieWithDetailsAsync( GURL(url), name, value, domain, path, creation_time, expiration_time, last_access_time, secure, http_only, - net::CookieSameSite::DEFAULT_MODE, false, - net::COOKIE_PRIORITY_DEFAULT, base::Bind(OnSetCookie, callback)); + net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT, + base::Bind(OnSetCookie, callback)); } } // namespace diff --git a/atom/browser/api/atom_api_debugger.cc b/atom/browser/api/atom_api_debugger.cc index 90999a4f602a..7883b424d960 100644 --- a/atom/browser/api/atom_api_debugger.cc +++ b/atom/browser/api/atom_api_debugger.cc @@ -46,7 +46,7 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host, DCHECK(agent_host == agent_host_.get()); std::unique_ptr parsed_message(base::JSONReader::Read(message)); - if (!parsed_message->IsType(base::Value::TYPE_DICTIONARY)) + if (!parsed_message->IsType(base::Value::Type::DICTIONARY)) return; base::DictionaryValue* dict = diff --git a/atom/browser/api/atom_api_desktop_capturer.cc b/atom/browser/api/atom_api_desktop_capturer.cc index 118b3e3bdc66..79feb7520b0d 100644 --- a/atom/browser/api/atom_api_desktop_capturer.cc +++ b/atom/browser/api/atom_api_desktop_capturer.cc @@ -4,6 +4,8 @@ #include "atom/browser/api/atom_api_desktop_capturer.h" +using base::PlatformThreadRef; + #include "atom/common/api/atom_api_native_image.h" #include "atom/common/native_mate_converters/gfx_converter.h" #include "base/strings/utf_string_conversions.h" diff --git a/atom/browser/api/atom_api_session.cc b/atom/browser/api/atom_api_session.cc index 83d103a631f7..3a2d5f440074 100644 --- a/atom/browser/api/atom_api_session.cc +++ b/atom/browser/api/atom_api_session.cc @@ -432,7 +432,8 @@ void DownloadIdCallback(content::DownloadManager* download_manager, last_modified, offset, length, std::string(), content::DownloadItem::INTERRUPTED, content::DownloadDangerType::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, - content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, false); + content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, false, + std::vector()); } } // namespace diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 77c3212e2e02..6addfb5c7cb9 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -296,27 +296,26 @@ void AtomBrowserClient::ResourceDispatcherHostCreated() { } bool AtomBrowserClient::CanCreateWindow( + int opener_render_process_id, + int opener_render_frame_id, const GURL& opener_url, const GURL& opener_top_level_frame_url, const GURL& source_origin, - WindowContainerType container_type, + content::mojom::WindowContainerType container_type, const GURL& target_url, const content::Referrer& referrer, const std::string& frame_name, WindowOpenDisposition disposition, - const blink::WebWindowFeatures& features, + const blink::mojom::WindowFeatures& features, const std::vector& additional_features, const scoped_refptr& body, bool user_gesture, bool opener_suppressed, content::ResourceContext* context, - int render_process_id, - int opener_render_view_id, - int opener_render_frame_id, bool* no_javascript_access) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); - if (IsRendererSandboxed(render_process_id)) { + if (IsRendererSandboxed(opener_render_process_id)) { *no_javascript_access = false; return true; } @@ -330,7 +329,7 @@ bool AtomBrowserClient::CanCreateWindow( disposition, additional_features, body, - render_process_id, + opener_render_process_id, opener_render_frame_id)); } diff --git a/atom/browser/atom_browser_client.h b/atom/browser/atom_browser_client.h index 70573d6eee37..ba1bd86fcad7 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -80,23 +80,22 @@ class AtomBrowserClient : public brightray::BrowserClient, std::unique_ptr delegate) override; void ResourceDispatcherHostCreated() override; bool CanCreateWindow( + int opener_render_process_id, + int opener_render_frame_id, const GURL& opener_url, const GURL& opener_top_level_frame_url, const GURL& source_origin, - WindowContainerType container_type, + content::mojom::WindowContainerType container_type, const GURL& target_url, const content::Referrer& referrer, const std::string& frame_name, WindowOpenDisposition disposition, - const blink::WebWindowFeatures& features, + const blink::mojom::WindowFeatures& features, const std::vector& additional_features, const scoped_refptr& body, bool user_gesture, bool opener_suppressed, content::ResourceContext* context, - int render_process_id, - int opener_render_view_id, - int opener_render_frame_id, bool* no_javascript_access) override; void GetAdditionalAllowedSchemesForFileSystem( std::vector* schemes) override; diff --git a/atom/browser/atom_javascript_dialog_manager.cc b/atom/browser/atom_javascript_dialog_manager.cc index f874a99db55a..79f82d99441c 100644 --- a/atom/browser/atom_javascript_dialog_manager.cc +++ b/atom/browser/atom_javascript_dialog_manager.cc @@ -13,27 +13,27 @@ #include "base/strings/utf_string_conversions.h" #include "ui/gfx/image/image_skia.h" -using content::JavaScriptMessageType; +using content::JavaScriptDialogType; namespace atom { void AtomJavaScriptDialogManager::RunJavaScriptDialog( content::WebContents* web_contents, const GURL& origin_url, - JavaScriptMessageType message_type, + JavaScriptDialogType dialog_type, const base::string16& message_text, const base::string16& default_prompt_text, const DialogClosedCallback& callback, bool* did_suppress_message) { - if (message_type != JavaScriptMessageType::JAVASCRIPT_MESSAGE_TYPE_ALERT && - message_type != JavaScriptMessageType::JAVASCRIPT_MESSAGE_TYPE_CONFIRM) { + if (dialog_type != JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_ALERT && + dialog_type != JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_CONFIRM) { callback.Run(false, base::string16()); return; } std::vector buttons = {"OK"}; - if (message_type == JavaScriptMessageType::JAVASCRIPT_MESSAGE_TYPE_CONFIRM) { + if (dialog_type == JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_CONFIRM) { buttons.push_back("Cancel"); } @@ -55,7 +55,6 @@ void AtomJavaScriptDialogManager::RunBeforeUnloadDialog( void AtomJavaScriptDialogManager::CancelDialogs( content::WebContents* web_contents, - bool suppress_callbacks, bool reset_state) { } diff --git a/atom/browser/atom_javascript_dialog_manager.h b/atom/browser/atom_javascript_dialog_manager.h index 01cc76248c87..56b62afe8776 100644 --- a/atom/browser/atom_javascript_dialog_manager.h +++ b/atom/browser/atom_javascript_dialog_manager.h @@ -17,7 +17,7 @@ class AtomJavaScriptDialogManager : public content::JavaScriptDialogManager { void RunJavaScriptDialog( content::WebContents* web_contents, const GURL& origin_url, - content::JavaScriptMessageType javascript_message_type, + content::JavaScriptDialogType dialog_type, const base::string16& message_text, const base::string16& default_prompt_text, const DialogClosedCallback& callback, @@ -27,7 +27,6 @@ class AtomJavaScriptDialogManager : public content::JavaScriptDialogManager { bool is_reload, const DialogClosedCallback& callback) override; void CancelDialogs(content::WebContents* web_contents, - bool suppress_callbacks, bool reset_state) override; private: diff --git a/atom/browser/atom_permission_manager.cc b/atom/browser/atom_permission_manager.cc index b22f4253237b..e890618be735 100644 --- a/atom/browser/atom_permission_manager.cc +++ b/atom/browser/atom_permission_manager.cc @@ -131,7 +131,7 @@ int AtomPermissionManager::RequestPermissions( auto web_contents = content::WebContents::FromRenderFrameHost(render_frame_host); - int request_id = pending_requests_.Add(new PendingRequest( + int request_id = pending_requests_.Add(base::MakeUnique( render_frame_host, permissions, response_callback)); for (size_t i = 0; i < permissions.size(); ++i) { @@ -187,12 +187,6 @@ blink::mojom::PermissionStatus AtomPermissionManager::GetPermissionStatus( return blink::mojom::PermissionStatus::GRANTED; } -void AtomPermissionManager::RegisterPermissionUsage( - content::PermissionType permission, - const GURL& requesting_origin, - const GURL& embedding_origin) { -} - int AtomPermissionManager::SubscribePermissionStatusChange( content::PermissionType permission, const GURL& requesting_origin, diff --git a/atom/browser/atom_permission_manager.h b/atom/browser/atom_permission_manager.h index 7b74fe3fba4a..b8a768a0794d 100644 --- a/atom/browser/atom_permission_manager.h +++ b/atom/browser/atom_permission_manager.h @@ -66,9 +66,6 @@ class AtomPermissionManager : public content::PermissionManager { content::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) override; - void RegisterPermissionUsage(content::PermissionType permission, - const GURL& requesting_origin, - const GURL& embedding_origin) override; int SubscribePermissionStatusChange( content::PermissionType permission, const GURL& requesting_origin, @@ -79,7 +76,7 @@ class AtomPermissionManager : public content::PermissionManager { private: class PendingRequest; - using PendingRequestsMap = IDMap; + using PendingRequestsMap = IDMap>; RequestHandler request_handler_; diff --git a/atom/browser/common_web_contents_delegate_mac.mm b/atom/browser/common_web_contents_delegate_mac.mm index c76606137939..079d17624c95 100644 --- a/atom/browser/common_web_contents_delegate_mac.mm +++ b/atom/browser/common_web_contents_delegate_mac.mm @@ -20,7 +20,7 @@ void CommonWebContentsDelegate::HandleKeyboardEvent( content::WebContents* source, const content::NativeWebKeyboardEvent& event) { if (event.skip_in_browser || - event.type == content::NativeWebKeyboardEvent::Char) + event.type() == content::NativeWebKeyboardEvent::Char) return; // Escape exits tabbed fullscreen mode. diff --git a/atom/browser/net/atom_url_request_job_factory.cc b/atom/browser/net/atom_url_request_job_factory.cc index 92c4eb40a975..e4ff930aa638 100644 --- a/atom/browser/net/atom_url_request_job_factory.cc +++ b/atom/browser/net/atom_url_request_job_factory.cc @@ -50,15 +50,16 @@ bool AtomURLRequestJobFactory::InterceptProtocol( return false; ProtocolHandler* original_protocol_handler = protocol_handler_map_[scheme]; protocol_handler_map_[scheme] = protocol_handler.release(); - original_protocols_.set(scheme, base::WrapUnique(original_protocol_handler)); + original_protocols_[scheme] = std::move(original_protocol_handler); return true; } bool AtomURLRequestJobFactory::UninterceptProtocol(const std::string& scheme) { - if (!original_protocols_.contains(scheme)) + auto it = original_protocols_.find(scheme); + if (it == original_protocols_.end()) return false; - protocol_handler_map_[scheme] = - original_protocols_.take_and_erase(scheme).release(); + protocol_handler_map_[scheme] = std::move(it->second); + original_protocols_.erase(it); return true; } diff --git a/atom/browser/net/atom_url_request_job_factory.h b/atom/browser/net/atom_url_request_job_factory.h index 5b439c2f9cd8..16d1ed3b2079 100644 --- a/atom/browser/net/atom_url_request_job_factory.h +++ b/atom/browser/net/atom_url_request_job_factory.h @@ -9,9 +9,9 @@ #include #include #include +#include #include -#include "base/containers/scoped_ptr_hash_map.h" #include "net/url_request/url_request_job_factory.h" namespace atom { @@ -64,7 +64,7 @@ class AtomURLRequestJobFactory : public net::URLRequestJobFactory { ProtocolHandlerMap protocol_handler_map_; // Map that stores the original protocols of schemes. - using OriginalProtocolsMap = base::ScopedPtrHashMap< + using OriginalProtocolsMap = std::unordered_map< std::string, std::unique_ptr>; // Can only be accessed in IO thread. OriginalProtocolsMap original_protocols_; diff --git a/atom/browser/net/js_asker.cc b/atom/browser/net/js_asker.cc index 67fb578650fb..a7c2eb50b441 100644 --- a/atom/browser/net/js_asker.cc +++ b/atom/browser/net/js_asker.cc @@ -59,7 +59,7 @@ void AskForOptions(v8::Isolate* isolate, } bool IsErrorOptions(base::Value* value, int* error) { - if (value->IsType(base::Value::TYPE_DICTIONARY)) { + if (value->IsType(base::Value::TYPE::DICTIONARY)) { base::DictionaryValue* dict = static_cast(value); if (dict->GetInteger("error", error)) return true; diff --git a/atom/browser/net/url_request_async_asar_job.cc b/atom/browser/net/url_request_async_asar_job.cc index 942f06233e3d..f1b978287f3c 100644 --- a/atom/browser/net/url_request_async_asar_job.cc +++ b/atom/browser/net/url_request_async_asar_job.cc @@ -18,7 +18,7 @@ URLRequestAsyncAsarJob::URLRequestAsyncAsarJob( void URLRequestAsyncAsarJob::StartAsync(std::unique_ptr options) { base::FilePath::StringType file_path; - if (options->IsType(base::Value::TYPE_DICTIONARY)) { + if (options->IsType(base::Value::TYPE::DICTIONARY)) { static_cast(options.get())->GetString( "path", &file_path); } else if (options->IsType(base::Value::TYPE_STRING)) { diff --git a/atom/browser/net/url_request_buffer_job.cc b/atom/browser/net/url_request_buffer_job.cc index 70f460308174..670a276dad55 100644 --- a/atom/browser/net/url_request_buffer_job.cc +++ b/atom/browser/net/url_request_buffer_job.cc @@ -34,7 +34,7 @@ URLRequestBufferJob::URLRequestBufferJob( void URLRequestBufferJob::StartAsync(std::unique_ptr options) { const base::BinaryValue* binary = nullptr; - if (options->IsType(base::Value::TYPE_DICTIONARY)) { + if (options->IsType(base::Value::TYPE::DICTIONARY)) { base::DictionaryValue* dict = static_cast(options.get()); dict->GetString("mimeType", &mime_type_); diff --git a/atom/browser/net/url_request_fetch_job.cc b/atom/browser/net/url_request_fetch_job.cc index a8c13483e6a8..e69ca56fe3ae 100644 --- a/atom/browser/net/url_request_fetch_job.cc +++ b/atom/browser/net/url_request_fetch_job.cc @@ -112,7 +112,7 @@ void URLRequestFetchJob::BeforeStartInUI( } void URLRequestFetchJob::StartAsync(std::unique_ptr options) { - if (!options->IsType(base::Value::TYPE_DICTIONARY)) { + if (!options->IsType(base::Value::TYPE::DICTIONARY)) { NotifyStartError(net::URLRequestStatus( net::URLRequestStatus::FAILED, net::ERR_NOT_IMPLEMENTED)); return; diff --git a/atom/browser/net/url_request_string_job.cc b/atom/browser/net/url_request_string_job.cc index abec345e63d5..b212e0d4b3b5 100644 --- a/atom/browser/net/url_request_string_job.cc +++ b/atom/browser/net/url_request_string_job.cc @@ -17,7 +17,7 @@ URLRequestStringJob::URLRequestStringJob( } void URLRequestStringJob::StartAsync(std::unique_ptr options) { - if (options->IsType(base::Value::TYPE_DICTIONARY)) { + if (options->IsType(base::Value::TYPE::DICTIONARY)) { base::DictionaryValue* dict = static_cast(options.get()); dict->GetString("mimeType", &mime_type_); diff --git a/atom/common/asar/archive.cc b/atom/common/asar/archive.cc index a3a02996d40c..d94c97fe3b41 100644 --- a/atom/common/asar/archive.cc +++ b/atom/common/asar/archive.cc @@ -181,7 +181,7 @@ bool Archive::Init() { std::string error; base::JSONReader reader; std::unique_ptr value(reader.ReadToValue(header)); - if (!value || !value->IsType(base::Value::TYPE_DICTIONARY)) { + if (!value || !value->IsType(base::Value::TYPE::DICTIONARY)) { LOG(ERROR) << "Failed to parse header: " << error; return false; } @@ -269,8 +269,9 @@ bool Archive::Realpath(const base::FilePath& path, base::FilePath* realpath) { } bool Archive::CopyFileOut(const base::FilePath& path, base::FilePath* out) { - if (external_files_.contains(path)) { - *out = external_files_.get(path)->path(); + auto it = external_files_.find(path.value()); + if (it != external_files_.end()) { + *out = it->second->path(); return true; } @@ -296,7 +297,7 @@ bool Archive::CopyFileOut(const base::FilePath& path, base::FilePath* out) { #endif *out = temp_file->path(); - external_files_.set(path, std::move(temp_file)); + external_files_[path.value()] = std::move(temp_file); return true; } diff --git a/atom/common/asar/archive.h b/atom/common/asar/archive.h index 9e3abc3434dd..4796d1014b7c 100644 --- a/atom/common/asar/archive.h +++ b/atom/common/asar/archive.h @@ -6,9 +6,9 @@ #define ATOM_COMMON_ASAR_ARCHIVE_H_ #include +#include #include -#include "base/containers/scoped_ptr_hash_map.h" #include "base/files/file.h" #include "base/files/file_path.h" @@ -75,8 +75,8 @@ class Archive { std::unique_ptr header_; // Cached external temporary files. - base::ScopedPtrHashMap> - external_files_; + std::unordered_map> external_files_; DISALLOW_COPY_AND_ASSIGN(Archive); }; diff --git a/atom/common/native_mate_converters/v8_value_converter.cc b/atom/common/native_mate_converters/v8_value_converter.cc index 3ba30e14ff48..975527a83803 100644 --- a/atom/common/native_mate_converters/v8_value_converter.cc +++ b/atom/common/native_mate_converters/v8_value_converter.cc @@ -198,7 +198,7 @@ v8::Local V8ValueConverter::ToV8ValueImpl( case base::Value::TYPE_LIST: return ToV8Array(isolate, static_cast(value)); - case base::Value::TYPE_DICTIONARY: + case base::Value::TYPE::DICTIONARY: return ToV8Object(isolate, static_cast(value)); diff --git a/atom/common/native_mate_converters/value_converter.cc b/atom/common/native_mate_converters/value_converter.cc index c3c7ae0383c5..c535a06d042a 100644 --- a/atom/common/native_mate_converters/value_converter.cc +++ b/atom/common/native_mate_converters/value_converter.cc @@ -15,7 +15,7 @@ bool Converter::FromV8(v8::Isolate* isolate, std::unique_ptr converter(new atom::V8ValueConverter); std::unique_ptr value(converter->FromV8Value( val, isolate->GetCurrentContext())); - if (value && value->IsType(base::Value::TYPE_DICTIONARY)) { + if (value && value->IsType(base::Value::TYPE::DICTIONARY)) { out->Swap(static_cast(value.get())); return true; } else { diff --git a/chromium_src/chrome/renderer/media/chrome_key_systems.cc b/chromium_src/chrome/renderer/media/chrome_key_systems.cc index 206ac400fba8..87b5c43e7fbd 100644 --- a/chromium_src/chrome/renderer/media/chrome_key_systems.cc +++ b/chromium_src/chrome/renderer/media/chrome_key_systems.cc @@ -66,11 +66,11 @@ class ExternalClearKeyProperties : public KeySystemProperties { return true; case media::EmeInitDataType::CENC: -#if defined(USE_PROPRIETARY_CODECS) +#if BUILDFLAG(USE_PROPRIETARY_CODECS) return true; #else return false; -#endif // defined(USE_PROPRIETARY_CODECS) +#endif // BUILDFLAG(USE_PROPRIETARY_CODECS) case media::EmeInitDataType::UNKNOWN: return false; @@ -80,7 +80,7 @@ class ExternalClearKeyProperties : public KeySystemProperties { } SupportedCodecs GetSupportedCodecs() const override { -#if defined(USE_PROPRIETARY_CODECS) +#if BUILDFLAG(USE_PROPRIETARY_CODECS) return media::EME_CODEC_MP4_ALL | media::EME_CODEC_WEBM_ALL; #else return media::EME_CODEC_WEBM_ALL; @@ -224,21 +224,21 @@ static void AddPepperBasedWidevine( // as those may offer a higher level of protection. supported_codecs |= media::EME_CODEC_WEBM_OPUS; supported_codecs |= media::EME_CODEC_WEBM_VORBIS; -#if defined(USE_PROPRIETARY_CODECS) +#if BUILDFLAG(USE_PROPRIETARY_CODECS) supported_codecs |= media::EME_CODEC_MP4_AAC; -#endif // defined(USE_PROPRIETARY_CODECS) +#endif // BUILDFLAG(USE_PROPRIETARY_CODECS) for (size_t i = 0; i < codecs.size(); ++i) { if (codecs[i] == kCdmSupportedCodecVp8) supported_codecs |= media::EME_CODEC_WEBM_VP8; if (codecs[i] == kCdmSupportedCodecVp9) supported_codecs |= media::EME_CODEC_WEBM_VP9; -#if defined(USE_PROPRIETARY_CODECS) +#if BUILDFLAG(USE_PROPRIETARY_CODECS) if (codecs[i] == kCdmSupportedCodecAvc1) supported_codecs |= media::EME_CODEC_MP4_AVC1; if (codecs[i] == kCdmSupportedCodecVp9) supported_codecs |= media::EME_CODEC_MP4_VP9; -#endif // defined(USE_PROPRIETARY_CODECS) +#endif // BUILDFLAG(USE_PROPRIETARY_CODECS) } using Robustness = cdm::WidevineKeySystemProperties::Robustness; diff --git a/electron.gyp b/electron.gyp index ce3673abf114..9d4d7e6de800 100644 --- a/electron.gyp +++ b/electron.gyp @@ -237,9 +237,6 @@ 'USING_V8_SHARED', 'USING_V8_PLATFORM_SHARED', 'USING_V8_BASE_SHARED', - # Remove this after enable_plugins becomes a feature flag. - 'ENABLE_PLUGINS', - 'USE_PROPRIETARY_CODECS', ], 'sources': [ '<@(lib_sources)', diff --git a/vendor/crashpad b/vendor/crashpad index eeac857dfb5b..4054e6cba3ba 160000 --- a/vendor/crashpad +++ b/vendor/crashpad @@ -1 +1 @@ -Subproject commit eeac857dfb5b255c899c8763d62654863b4c8890 +Subproject commit 4054e6cba3ba023d9c00260518ec2912607ae17c diff --git a/vendor/node b/vendor/node index 3fe90cfcf54d..42eee8a69267 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit 3fe90cfcf54dd946980e59daf550a7cdb2317c8f +Subproject commit 42eee8a69267191ac20505bf929bb39a688d7385