mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
chore: bump chromium to 140.0.7314.0 (main) (#47882)
* chore: bump chromium in DEPS to 140.0.7314.0 * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 * 6632993: PDF Searchify IPH: Use embedder WebContents for GuestView PDF Refs https://chromium-review.googlesource.com/c/chromium/src/+/6632993 * 6769214: [ios blink] Set IOSurface shared memory region on all GMB handles Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769214 * chore: update patches * 6769572: [soft navs]: Move AsyncSameDocumentNavigationStarted to TaskAttributionTracker Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769572 * chore: node gen-libc++-filenames.js * 6765740: [SxS] Implement support for split view in extensions API Refs https://chromium-review.googlesource.com/c/chromium/src/+/6765740 * 6769821: Delegate checking whether preconnect is enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769821 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
committed by
GitHub
parent
06d7a51a58
commit
f6407b4949
@@ -49,6 +49,7 @@
|
||||
#include "shell/browser/electron_browser_main_parts.h"
|
||||
#include "shell/browser/electron_download_manager_delegate.h"
|
||||
#include "shell/browser/electron_permission_manager.h"
|
||||
#include "shell/browser/electron_preconnect_manager_delegate.h"
|
||||
#include "shell/browser/file_system_access/file_system_access_permission_context_factory.h"
|
||||
#include "shell/browser/media/media_device_id_salt.h"
|
||||
#include "shell/browser/net/resolve_proxy_helper.h"
|
||||
@@ -559,7 +560,10 @@ std::string ElectronBrowserContext::GetUserAgent() const {
|
||||
|
||||
predictors::PreconnectManager* ElectronBrowserContext::GetPreconnectManager() {
|
||||
if (!preconnect_manager_) {
|
||||
preconnect_manager_ = predictors::PreconnectManager::Create(nullptr, this);
|
||||
preconnect_manager_delegate_ =
|
||||
std::make_unique<ElectronPreconnectManagerDelegate>();
|
||||
preconnect_manager_ = predictors::PreconnectManager::Create(
|
||||
preconnect_manager_delegate_->GetWeakPtr(), this);
|
||||
}
|
||||
return preconnect_manager_.get();
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace electron {
|
||||
class CookieChangeNotifier;
|
||||
class ElectronDownloadManagerDelegate;
|
||||
class ElectronPermissionManager;
|
||||
class ElectronPreconnectManagerDelegate;
|
||||
class MediaDeviceIDSalt;
|
||||
class ProtocolRegistry;
|
||||
class ResolveProxyHelper;
|
||||
@@ -192,6 +193,8 @@ class ElectronBrowserContext : public content::BrowserContext {
|
||||
scoped_refptr<ResolveProxyHelper> resolve_proxy_helper_;
|
||||
scoped_refptr<storage::SpecialStoragePolicy> storage_policy_;
|
||||
std::unique_ptr<predictors::PreconnectManager> preconnect_manager_;
|
||||
std::unique_ptr<ElectronPreconnectManagerDelegate>
|
||||
preconnect_manager_delegate_;
|
||||
std::unique_ptr<ProtocolRegistry> protocol_registry_;
|
||||
|
||||
std::optional<std::string> user_agent_;
|
||||
|
||||
@@ -76,9 +76,5 @@ void ElectronPDFDocumentHelperClient::SetPluginCanSave(
|
||||
|
||||
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
|
||||
void ElectronPDFDocumentHelperClient::OnSearchifyStarted(
|
||||
content::WebContents* contents) {
|
||||
// TODO(crbug.com/360803943): Add test.
|
||||
// Show the promo only when ScreenAI component is available and OCR can be
|
||||
// done.
|
||||
}
|
||||
content::RenderFrameHost* render_frame_host) {}
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@ class ElectronPDFDocumentHelperClient : public pdf::PDFDocumentHelperClient {
|
||||
void SetPluginCanSave(content::RenderFrameHost* render_frame_host,
|
||||
bool can_save) override;
|
||||
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
|
||||
void OnSearchifyStarted(content::WebContents* contents) override;
|
||||
void OnSearchifyStarted(content::RenderFrameHost* render_frame_host) override;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
18
shell/browser/electron_preconnect_manager_delegate.cc
Normal file
18
shell/browser/electron_preconnect_manager_delegate.cc
Normal file
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) 2025 Microsoft, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/electron_preconnect_manager_delegate.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
ElectronPreconnectManagerDelegate::ElectronPreconnectManagerDelegate() =
|
||||
default;
|
||||
ElectronPreconnectManagerDelegate::~ElectronPreconnectManagerDelegate() =
|
||||
default;
|
||||
|
||||
bool ElectronPreconnectManagerDelegate::IsPreconnectEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
46
shell/browser/electron_preconnect_manager_delegate.h
Normal file
46
shell/browser/electron_preconnect_manager_delegate.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2025 Microsoft, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_PRECONNECT_MANAGER_DELEGATE_H_
|
||||
#define ELECTRON_SHELL_BROWSER_ELECTRON_PRECONNECT_MANAGER_DELEGATE_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "chrome/browser/predictors/preconnect_manager.h"
|
||||
|
||||
class GURL;
|
||||
|
||||
namespace electron {
|
||||
|
||||
class ElectronPreconnectManagerDelegate
|
||||
: public predictors::PreconnectManager::Delegate {
|
||||
public:
|
||||
ElectronPreconnectManagerDelegate();
|
||||
~ElectronPreconnectManagerDelegate() override;
|
||||
|
||||
// disable copy
|
||||
ElectronPreconnectManagerDelegate(const ElectronPreconnectManagerDelegate&) =
|
||||
delete;
|
||||
ElectronPreconnectManagerDelegate& operator=(
|
||||
const ElectronPreconnectManagerDelegate&) = delete;
|
||||
|
||||
// preconnect_manager::Delegate
|
||||
void PreconnectInitiated(const GURL& url,
|
||||
const GURL& preconnect_url) override {}
|
||||
void PreconnectFinished(
|
||||
std::unique_ptr<predictors::PreconnectStats> stats) override {}
|
||||
bool IsPreconnectEnabled() override;
|
||||
|
||||
base::WeakPtr<ElectronPreconnectManagerDelegate> GetWeakPtr() {
|
||||
return weak_factory_.GetWeakPtr();
|
||||
}
|
||||
|
||||
private:
|
||||
base::WeakPtrFactory<ElectronPreconnectManagerDelegate> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_ELECTRON_PRECONNECT_MANAGER_DELEGATE_H_
|
||||
@@ -321,6 +321,8 @@ ExtensionFunction::ResponseAction TabsQueryFunction::Run() {
|
||||
tab.active = contents->IsFocused();
|
||||
tab.audible = contents->IsCurrentlyAudible();
|
||||
tab.muted_info = CreateMutedInfo(wc);
|
||||
// TODO: Add proper support for split views
|
||||
tab.split_view_id = -1;
|
||||
|
||||
result.Append(tab.ToValue());
|
||||
}
|
||||
@@ -353,6 +355,8 @@ ExtensionFunction::ResponseAction TabsGetFunction::Run() {
|
||||
|
||||
tab.active = contents->IsFocused();
|
||||
tab.last_accessed = wc->GetLastActiveTime().InMillisecondsFSinceUnixEpoch();
|
||||
// TODO: Add proper support for split views
|
||||
tab.split_view_id = -1;
|
||||
|
||||
return RespondNow(ArgumentList(tabs::Get::Results::Create(std::move(tab))));
|
||||
}
|
||||
@@ -696,6 +700,8 @@ ExtensionFunction::ResponseValue TabsUpdateFunction::GetResult() {
|
||||
tab.active = api_web_contents->IsFocused();
|
||||
tab.muted_info = CreateMutedInfo(web_contents_);
|
||||
tab.audible = web_contents_->IsCurrentlyAudible();
|
||||
// TODO: Add proper support for split views
|
||||
tab.split_view_id = -1;
|
||||
|
||||
return ArgumentList(tabs::Get::Results::Create(std::move(tab)));
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ void OffScreenVideoConsumer::OnFrameCaptured(
|
||||
reinterpret_cast<uintptr_t>(gmb_handle.dxgi_handle().buffer_handle());
|
||||
#elif BUILDFLAG(IS_APPLE)
|
||||
texture.shared_texture_handle =
|
||||
reinterpret_cast<uintptr_t>(gmb_handle.io_surface.get());
|
||||
reinterpret_cast<uintptr_t>(gmb_handle.io_surface().get());
|
||||
#elif BUILDFLAG(IS_LINUX)
|
||||
const auto& native_pixmap = gmb_handle.native_pixmap_handle();
|
||||
texture.modifier = native_pixmap.modifier;
|
||||
|
||||
@@ -61,6 +61,14 @@
|
||||
// TODO(kalman): Investigate how this is ending up as -1 (based on window type? a bug?) and whether it should be optional instead.
|
||||
"index": {"type": "integer", "minimum": -1, "description": "The zero-based index of the tab within its window."},
|
||||
"groupId": {"type": "integer", "minimum": -1, "description": "The ID of the group that the tab belongs to."},
|
||||
"splitViewId": {
|
||||
"type": "integer",
|
||||
"minimum": -1,
|
||||
"optional": "true",
|
||||
"description": "The ID of the Split View that the tab belongs to.",
|
||||
// TODO(crbug.com/433273595): Enable documentation when ready for launch.
|
||||
"nodoc": "true"
|
||||
},
|
||||
"windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window that contains the tab."},
|
||||
"openerTabId": {"type": "integer", "minimum": 0, "optional": true, "description": "The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists."},
|
||||
"selected": {"type": "boolean", "description": "Whether the tab is selected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted)."},
|
||||
@@ -524,6 +532,12 @@
|
||||
"minimum": -1,
|
||||
"description": "The ID of the group that the tabs are in, or $(ref:tabGroups.TAB_GROUP_ID_NONE) for ungrouped tabs."
|
||||
},
|
||||
"splitViewId": {
|
||||
"type": "integer",
|
||||
"minimum": -1,
|
||||
"optional": true,
|
||||
"description": "The ID of the Split View that the tabs are in, or $(ref:tabs.SPLIT_TAB_ID_NONE) for tabs that aren't in a Split View."
|
||||
},
|
||||
"windowId": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
@@ -680,6 +694,12 @@
|
||||
"minimum": -1,
|
||||
"description": "The tab's new group."
|
||||
},
|
||||
"splitViewId": {
|
||||
"type": "integer",
|
||||
"minimum": -1,
|
||||
"optional": true,
|
||||
"description": "The tab's new Split View."
|
||||
},
|
||||
"pinned": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
|
||||
Reference in New Issue
Block a user