chore: bump chromium to 124.0.6323.0 (main) (#41412)
* chore: bump chromium in DEPS to 124.0.6315.0 * chore: update patches * 5279678: Stream AIDA responses5279678
* 5276439: Remove non_network_url_loader_factory_remotes_5276439
* 5310165: Add DevTools API to show search results5310165
* chore: bump chromium in DEPS to 124.0.6317.0 * chore: update patches * Remove Setup.Install.CumulativeDiskUsage2 and supporting code5314269
* browser: Make cmd line non-const in process singleton callback5311256
* chore: bump chromium in DEPS to 124.0.6319.0 * chore: bump chromium in DEPS to 124.0.6321.0 * chore: bump chromium in DEPS to 124.0.6323.0 * 5318335: Roll src/third_party/boringssl/src 23824fa0f..4fe29ebc75318335
* 5318051: [CBE Watermarking] Hoist `watermark_view` to a member variable.5318051
* chore: fixup patch indices * 4946553: Delegate HID permission to Chrome App in webview4946553
* 5310001: DevTools UI binding for reporting client events to AIDA5310001
* [libc++] Refactor the predicate taking variant of `__cxx_atomic_wait` * chore: fix browser_view patch harder * 5293937: Reland "[gUM] Use preferred device if more than one is eligible"5293937
* fix: filter {video|audio} devices by eligible device id * 5267921: enable speak content under the pointer on PWA and WV25267921
* 5310195: heap: Remove Blink's GCTaskRunner5310195
--------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
13e601e35c
commit
04df5ce492
85 changed files with 419 additions and 319 deletions
|
@ -480,23 +480,23 @@ int GetPathConstant(std::string_view name) {
|
|||
|
||||
bool NotificationCallbackWrapper(
|
||||
const base::RepeatingCallback<
|
||||
void(const base::CommandLine& command_line,
|
||||
void(base::CommandLine command_line,
|
||||
const base::FilePath& current_directory,
|
||||
const std::vector<const uint8_t> additional_data)>& callback,
|
||||
const base::CommandLine& cmd,
|
||||
base::CommandLine cmd,
|
||||
const base::FilePath& cwd,
|
||||
const std::vector<const uint8_t> additional_data) {
|
||||
// Make sure the callback is called after app gets ready.
|
||||
if (Browser::Get()->is_ready()) {
|
||||
callback.Run(cmd, cwd, std::move(additional_data));
|
||||
callback.Run(std::move(cmd), cwd, std::move(additional_data));
|
||||
} else {
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner(
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault());
|
||||
|
||||
// Make a copy of the span so that the data isn't lost.
|
||||
task_runner->PostTask(FROM_HERE,
|
||||
base::BindOnce(base::IgnoreResult(callback), cmd, cwd,
|
||||
std::move(additional_data)));
|
||||
task_runner->PostTask(
|
||||
FROM_HERE, base::BindOnce(base::IgnoreResult(callback), std::move(cmd),
|
||||
cwd, std::move(additional_data)));
|
||||
}
|
||||
// ProcessSingleton needs to know whether current process is quitting.
|
||||
return !Browser::Get()->is_shutting_down();
|
||||
|
@ -1060,7 +1060,7 @@ std::string App::GetLocaleCountryCode() {
|
|||
return region.size() == 2 ? region : std::string();
|
||||
}
|
||||
|
||||
void App::OnSecondInstance(const base::CommandLine& cmd,
|
||||
void App::OnSecondInstance(base::CommandLine cmd,
|
||||
const base::FilePath& cwd,
|
||||
const std::vector<const uint8_t> additional_data) {
|
||||
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
||||
|
|
|
@ -194,7 +194,7 @@ class App : public ElectronBrowserClient::Delegate,
|
|||
std::string GetLocale();
|
||||
std::string GetLocaleCountryCode();
|
||||
std::string GetSystemLocale(gin_helper::ErrorThrower thrower) const;
|
||||
void OnSecondInstance(const base::CommandLine& cmd,
|
||||
void OnSecondInstance(base::CommandLine cmd,
|
||||
const base::FilePath& cwd,
|
||||
const std::vector<const uint8_t> additional_data);
|
||||
bool HasSingleInstanceLock() const;
|
||||
|
|
|
@ -4152,6 +4152,10 @@ void WebContents::DevToolsOpenInNewTab(const std::string& url) {
|
|||
Emit("devtools-open-url", url);
|
||||
}
|
||||
|
||||
void WebContents::DevToolsOpenSearchResultsInNewTab(const std::string& query) {
|
||||
Emit("devtools-search-query", query);
|
||||
}
|
||||
|
||||
void WebContents::DevToolsSearchInPath(int request_id,
|
||||
const std::string& file_system_path,
|
||||
const std::string& query) {
|
||||
|
|
|
@ -748,6 +748,7 @@ class WebContents : public ExclusiveAccessContext,
|
|||
const std::string& file_system_path,
|
||||
const std::string& excluded_folders_message) override;
|
||||
void DevToolsOpenInNewTab(const std::string& url) override;
|
||||
void DevToolsOpenSearchResultsInNewTab(const std::string& query) override;
|
||||
void DevToolsStopIndexing(int request_id) override;
|
||||
void DevToolsSearchInPath(int request_id,
|
||||
const std::string& file_system_path,
|
||||
|
|
|
@ -1036,22 +1036,22 @@ blink::UserAgentMetadata ElectronBrowserClient::GetUserAgentMetadata() {
|
|||
return embedder_support::GetUserAgentMetadata();
|
||||
}
|
||||
|
||||
void ElectronBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
|
||||
int frame_tree_node_id,
|
||||
NonNetworkURLLoaderFactoryMap* factories) {
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>
|
||||
ElectronBrowserClient::CreateNonNetworkNavigationURLLoaderFactory(
|
||||
const std::string& scheme,
|
||||
int frame_tree_node_id) {
|
||||
content::WebContents* web_contents =
|
||||
content::WebContents::FromFrameTreeNodeId(frame_tree_node_id);
|
||||
content::BrowserContext* context = web_contents->GetBrowserContext();
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
factories->emplace(
|
||||
extensions::kExtensionScheme,
|
||||
extensions::CreateExtensionNavigationURLLoaderFactory(
|
||||
context, false /* we don't support extensions::WebViewGuest */));
|
||||
if (scheme == extensions::kExtensionScheme) {
|
||||
return extensions::CreateExtensionNavigationURLLoaderFactory(
|
||||
context, false /* we don't support extensions::WebViewGuest */);
|
||||
}
|
||||
#endif
|
||||
// Always allow navigating to file:// URLs.
|
||||
auto* protocol_registry = ProtocolRegistry::FromBrowserContext(context);
|
||||
protocol_registry->RegisterURLLoaderFactories(factories,
|
||||
true /* allow_file_access */);
|
||||
return protocol_registry->CreateNonNetworkNavigationURLLoaderFactory(scheme);
|
||||
}
|
||||
|
||||
void ElectronBrowserClient::
|
||||
|
|
|
@ -192,9 +192,9 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
network::mojom::NetworkService* network_service) override;
|
||||
std::vector<base::FilePath> GetNetworkContextsParentDirectory() override;
|
||||
std::string GetProduct() override;
|
||||
void RegisterNonNetworkNavigationURLLoaderFactories(
|
||||
int frame_tree_node_id,
|
||||
NonNetworkURLLoaderFactoryMap* factories) override;
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>
|
||||
CreateNonNetworkNavigationURLLoaderFactory(const std::string& scheme,
|
||||
int frame_tree_node_id) override;
|
||||
void RegisterNonNetworkWorkerMainResourceURLLoaderFactories(
|
||||
content::BrowserContext* browser_context,
|
||||
NonNetworkURLLoaderFactoryMap* factories) override;
|
||||
|
|
|
@ -151,6 +151,7 @@ bool ElectronHidDelegate::CanRequestDevicePermission(
|
|||
|
||||
bool ElectronHidDelegate::HasDevicePermission(
|
||||
content::BrowserContext* browser_context,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const url::Origin& origin,
|
||||
const device::mojom::HidDeviceInfo& device) {
|
||||
return browser_context && GetChooserContext(browser_context)
|
||||
|
@ -159,6 +160,7 @@ bool ElectronHidDelegate::HasDevicePermission(
|
|||
|
||||
void ElectronHidDelegate::RevokeDevicePermission(
|
||||
content::BrowserContext* browser_context,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const url::Origin& origin,
|
||||
const device::mojom::HidDeviceInfo& device) {
|
||||
if (browser_context) {
|
||||
|
|
|
@ -43,10 +43,12 @@ class ElectronHidDelegate : public content::HidDelegate {
|
|||
bool CanRequestDevicePermission(content::BrowserContext* browser_context,
|
||||
const url::Origin& origin) override;
|
||||
bool HasDevicePermission(content::BrowserContext* browser_context,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const url::Origin& origin,
|
||||
const device::mojom::HidDeviceInfo& device) override;
|
||||
void RevokeDevicePermission(
|
||||
content::BrowserContext* browser_context,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const url::Origin& origin,
|
||||
const device::mojom::HidDeviceInfo& device) override;
|
||||
device::mojom::HidManager* GetHidManager(
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// found in the LICENSE-CHROMIUM file.
|
||||
|
||||
#include "shell/browser/media/media_capture_devices_dispatcher.h"
|
||||
// #include "base/no_destructor.h"
|
||||
#include "base/logging.h"
|
||||
|
||||
#include "components/webrtc/media_stream_devices_util.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/media_capture_devices.h"
|
||||
|
||||
|
@ -47,4 +47,36 @@ void MediaCaptureDevicesDispatcher::OnSetCapturingLinkSecured(
|
|||
blink::mojom::MediaStreamType stream_type,
|
||||
bool is_secure) {}
|
||||
|
||||
const std::optional<blink::MediaStreamDevice>
|
||||
MediaCaptureDevicesDispatcher::GetPreferredAudioDeviceForBrowserContext(
|
||||
content::BrowserContext* browser_context,
|
||||
const std::vector<std::string>& eligible_audio_device_ids) const {
|
||||
auto audio_devices = GetAudioCaptureDevices();
|
||||
if (!eligible_audio_device_ids.empty()) {
|
||||
audio_devices =
|
||||
webrtc::FilterMediaDevices(audio_devices, eligible_audio_device_ids);
|
||||
}
|
||||
|
||||
if (audio_devices.empty())
|
||||
return std::nullopt;
|
||||
|
||||
return audio_devices.front();
|
||||
}
|
||||
|
||||
const std::optional<blink::MediaStreamDevice>
|
||||
MediaCaptureDevicesDispatcher::GetPreferredVideoDeviceForBrowserContext(
|
||||
content::BrowserContext* browser_context,
|
||||
const std::vector<std::string>& eligible_video_device_ids) const {
|
||||
auto video_devices = GetVideoCaptureDevices();
|
||||
if (!eligible_video_device_ids.empty()) {
|
||||
video_devices =
|
||||
webrtc::FilterMediaDevices(video_devices, eligible_video_device_ids);
|
||||
}
|
||||
|
||||
if (video_devices.empty())
|
||||
return std::nullopt;
|
||||
|
||||
return video_devices.front();
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -37,6 +37,14 @@ class MediaCaptureDevicesDispatcher
|
|||
int page_request_id,
|
||||
blink::mojom::MediaStreamType stream_type,
|
||||
bool is_secure) override;
|
||||
const std::optional<blink::MediaStreamDevice>
|
||||
GetPreferredAudioDeviceForBrowserContext(
|
||||
content::BrowserContext* browser_context,
|
||||
const std::vector<std::string>& eligible_audio_device_ids) const override;
|
||||
const std::optional<blink::MediaStreamDevice>
|
||||
GetPreferredVideoDeviceForBrowserContext(
|
||||
content::BrowserContext* browser_context,
|
||||
const std::vector<std::string>& eligible_video_device_ids) const override;
|
||||
|
||||
// disable copy
|
||||
MediaCaptureDevicesDispatcher(const MediaCaptureDevicesDispatcher&) = delete;
|
||||
|
|
|
@ -48,6 +48,23 @@ void ProtocolRegistry::RegisterURLLoaderFactories(
|
|||
}
|
||||
}
|
||||
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>
|
||||
ProtocolRegistry::CreateNonNetworkNavigationURLLoaderFactory(
|
||||
const std::string& scheme) {
|
||||
if (scheme == url::kFileScheme) {
|
||||
if (electron::fuses::IsGrantFileProtocolExtraPrivilegesEnabled()) {
|
||||
return AsarURLLoaderFactory::Create();
|
||||
}
|
||||
} else {
|
||||
auto handler = handlers_.find(scheme);
|
||||
if (handler != handlers_.end()) {
|
||||
return ElectronURLLoaderFactory::Create(handler->second.first,
|
||||
handler->second.second);
|
||||
}
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
bool ProtocolRegistry::RegisterProtocol(ProtocolType type,
|
||||
const std::string& scheme,
|
||||
const ProtocolHandler& handler) {
|
||||
|
|
|
@ -29,6 +29,9 @@ class ProtocolRegistry {
|
|||
content::ContentBrowserClient::NonNetworkURLLoaderFactoryMap* factories,
|
||||
bool allow_file_access);
|
||||
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>
|
||||
CreateNonNetworkNavigationURLLoaderFactory(const std::string& scheme);
|
||||
|
||||
const HandlersMap& intercept_handlers() const { return intercept_handlers_; }
|
||||
const HandlersMap& handlers() const { return handlers_; }
|
||||
|
||||
|
|
|
@ -721,6 +721,12 @@ void InspectableWebContents::OpenInNewTab(const std::string& url) {
|
|||
delegate_->DevToolsOpenInNewTab(url);
|
||||
}
|
||||
|
||||
void InspectableWebContents::OpenSearchResultsInNewTab(
|
||||
const std::string& query) {
|
||||
if (delegate_)
|
||||
delegate_->DevToolsOpenSearchResultsInNewTab(query);
|
||||
}
|
||||
|
||||
void InspectableWebContents::ShowItemInFolder(
|
||||
const std::string& file_system_path) {
|
||||
if (file_system_path.empty())
|
||||
|
|
|
@ -99,6 +99,7 @@ class InspectableWebContents
|
|||
int stream_id) override;
|
||||
void SetIsDocked(DispatchCallback callback, bool is_docked) override;
|
||||
void OpenInNewTab(const std::string& url) override;
|
||||
void OpenSearchResultsInNewTab(const std::string& query) override;
|
||||
void ShowItemInFolder(const std::string& file_system_path) override;
|
||||
void SaveToFile(const std::string& url,
|
||||
const std::string& content,
|
||||
|
@ -177,7 +178,9 @@ class InspectableWebContents
|
|||
void CanShowSurvey(DispatchCallback callback,
|
||||
const std::string& trigger) override {}
|
||||
void DoAidaConversation(DispatchCallback callback,
|
||||
const std::string& request) override {}
|
||||
const std::string& request,
|
||||
int stream_id) override {}
|
||||
void RegisterAidaClientEvent(const std::string& request) override {}
|
||||
|
||||
// content::DevToolsFrontendHostDelegate:
|
||||
void HandleMessageFromDevToolsFrontend(base::Value::Dict message);
|
||||
|
|
|
@ -32,6 +32,7 @@ class InspectableWebContentsDelegate {
|
|||
const std::string& file_system_path,
|
||||
const std::string& excluded_folders) {}
|
||||
virtual void DevToolsOpenInNewTab(const std::string& url) {}
|
||||
virtual void DevToolsOpenSearchResultsInNewTab(const std::string& query) {}
|
||||
virtual void DevToolsStopIndexing(int request_id) {}
|
||||
virtual void DevToolsSearchInPath(int request_id,
|
||||
const std::string& file_system_path,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue