chore: bump chromium to 133.0.6920.0 (main) (#45055)
* chore: bump chromium in DEPS to 133.0.6902.0 * chore: bump chromium in DEPS to 133.0.6903.0 * chore: update patches * Update PdfViewer Save File Picker to use showSaveFilePicker. Refs6074308
* Code Health: Clean up stale MacWebContentsOcclusion Refs6078344
* Change RenderProcessHost::GetID to RenderProcessHost::GetDeprecatedID Refs6065543
* [WebRTC] Make WebRTC IP Handling policy a mojo enum Refs6063620
* chore: gen filenames.libcxx.gni * Remove allow_unsafe_buffers pragma in //printing Refs6092280
* refactor: to use ChildProcessId where possible Refs https://issues.chromium.org/issues/379869738 * [Win] Update TabletMode detection code Refs6003486
* chore: bump chromium in DEPS to 133.0.6905.0 * chore: update patches * Reland "Move global shortcut listener to //ui/base" Refs6099035
* [shared storage] Implement the batch `with_lock` option for response header Refs6072742
* chore: bump chromium in DEPS to 133.0.6907.0 * chore: bump chromium in DEPS to 133.0.6909.0 * chore: bump chromium in DEPS to 133.0.6911.0 * chore: bump chromium in DEPS to 133.0.6912.0 * chore: update patches * WebUI: Reveal hidden deps to ui/webui/resources. Refs6096291
* chore: bump chromium in DEPS to 133.0.6913.0 * chore: bump chromium in DEPS to 133.0.6915.0 * Code Health: Clean up stale base::Feature "AccessibilityTreeForViews" Refs6104174
Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: remove fastapitypedarray usage * chore: update patches * chore: script/gen-libc++-filenames.js * Code Health: Clean up stale base::Feature "WinRetrieveSuggestionsOnlyOnDemand" Refs6109477
* fix: empty suggestions with windows platform checker Amends the fix from https://github.com/electron/electron/pull/29690 since the feature flag is no longer available. We follow the same pattern as //chrome/browser/renderer_context_menu/spelling_menu_observer.cc to generate the suggestion list on demand when context menu action is invoked. Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fixup! fix: empty suggestions with windows platform checker * fixup! fix: empty suggestions with windows platform checker * revert: 6078344: Code Health: Clean up stale MacWebContentsOcclusion |6078344
* Revert "revert: 6078344: Code Health: Clean up stale MacWebContentsOcclusion |6078344
" This reverts commit 9cacda452ed5a072351e8f5a35b009d91843a08c. * chore: bump to 133.0.6920.0, update patches * Revert "6078344: Code Health: Clean up stale MacWebContentsOcclusion" Refs:6078344
* fixup! Update PdfViewer Save File Picker to use showSaveFilePicker. --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
This commit is contained in:
parent
062d14e553
commit
7d05b78479
120 changed files with 1167 additions and 2629 deletions
|
@ -143,6 +143,7 @@
|
|||
#include "third_party/blink/public/common/input/web_input_event.h"
|
||||
#include "third_party/blink/public/common/messaging/transferable_message_mojom_traits.h"
|
||||
#include "third_party/blink/public/common/page/page_zoom.h"
|
||||
#include "third_party/blink/public/common/peerconnection/webrtc_ip_handling_policy.h"
|
||||
#include "third_party/blink/public/mojom/frame/find_in_page.mojom.h"
|
||||
#include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
|
||||
#include "third_party/blink/public/mojom/messaging/transferable_message.mojom.h"
|
||||
|
@ -191,6 +192,14 @@
|
|||
#include "content/public/browser/plugin_service.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN) && BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
||||
#include "chrome/browser/spellchecker/spellcheck_factory.h"
|
||||
#include "chrome/browser/spellchecker/spellcheck_service.h"
|
||||
#include "components/spellcheck/browser/spellcheck_platform.h"
|
||||
#include "components/spellcheck/common/spellcheck_common.h"
|
||||
#include "components/spellcheck/common/spellcheck_features.h"
|
||||
#endif
|
||||
|
||||
#if !IS_MAS_BUILD()
|
||||
#include "chrome/browser/hang_monitor/hang_crash_dump.h" // nogncheck
|
||||
#endif
|
||||
|
@ -560,7 +569,7 @@ std::string RegisterFileSystem(content::WebContents* web_contents,
|
|||
content::ChildProcessSecurityPolicy* policy =
|
||||
content::ChildProcessSecurityPolicy::GetInstance();
|
||||
content::RenderViewHost* render_view_host = web_contents->GetRenderViewHost();
|
||||
int renderer_id = render_view_host->GetProcess()->GetID();
|
||||
int renderer_id = render_view_host->GetProcess()->GetDeprecatedID();
|
||||
policy->GrantReadFileSystem(renderer_id, file_system.id());
|
||||
policy->GrantWriteFileSystem(renderer_id, file_system.id());
|
||||
policy->GrantCreateFileForFileSystem(renderer_id, file_system.id());
|
||||
|
@ -1464,11 +1473,44 @@ void WebContents::RendererResponsive(
|
|||
|
||||
bool WebContents::HandleContextMenu(content::RenderFrameHost& render_frame_host,
|
||||
const content::ContextMenuParams& params) {
|
||||
Emit("context-menu", std::make_pair(params, &render_frame_host));
|
||||
#if BUILDFLAG(IS_WIN) && BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
||||
if (!params.misspelled_word.empty() && spellcheck::UseBrowserSpellChecker()) {
|
||||
SpellcheckService* spellcheck_service =
|
||||
SpellcheckServiceFactory::GetForContext(
|
||||
render_frame_host.GetBrowserContext());
|
||||
if (spellcheck_service) {
|
||||
spellcheck_platform::GetPerLanguageSuggestions(
|
||||
spellcheck_service->platform_spell_checker(), params.misspelled_word,
|
||||
base::BindOnce(&WebContents::OnGetPlatformSuggestionsComplete,
|
||||
GetWeakPtr(), std::ref(render_frame_host), params));
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
Emit("context-menu",
|
||||
std::make_tuple(params, &render_frame_host,
|
||||
std::optional<std::vector<std::u16string>>{}));
|
||||
#if BUILDFLAG(IS_WIN) && BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_WIN) && BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
||||
void WebContents::OnGetPlatformSuggestionsComplete(
|
||||
content::RenderFrameHost& render_frame_host,
|
||||
const content::ContextMenuParams& params,
|
||||
const spellcheck::PerLanguageSuggestions&
|
||||
platform_per_language_suggestions) {
|
||||
std::vector<std::u16string> combined_suggestions;
|
||||
spellcheck::FillSuggestions(platform_per_language_suggestions,
|
||||
&combined_suggestions);
|
||||
Emit("context-menu",
|
||||
std::make_tuple(params, &render_frame_host,
|
||||
std::make_optional(combined_suggestions)));
|
||||
}
|
||||
#endif
|
||||
|
||||
void WebContents::FindReply(content::WebContents* web_contents,
|
||||
int request_id,
|
||||
int number_of_matches,
|
||||
|
@ -1740,7 +1782,8 @@ void WebContents::RenderViewDeleted(content::RenderViewHost* render_view_host) {
|
|||
// This event is necessary for tracking any states with respect to
|
||||
// intermediate render view hosts aka speculative render view hosts. Currently
|
||||
// used by object-registry.js to ref count remote objects.
|
||||
Emit("render-view-deleted", render_view_host->GetProcess()->GetID());
|
||||
Emit("render-view-deleted",
|
||||
render_view_host->GetProcess()->GetID().GetUnsafeValue());
|
||||
|
||||
if (web_contents()->GetRenderViewHost() == render_view_host) {
|
||||
// When the RVH that has been deleted is the current RVH it means that the
|
||||
|
@ -1748,7 +1791,7 @@ void WebContents::RenderViewDeleted(content::RenderViewHost* render_view_host) {
|
|||
// Currently tracked by guest-window-manager.ts to destroy the
|
||||
// BrowserWindow.
|
||||
Emit("current-render-view-deleted",
|
||||
render_view_host->GetProcess()->GetID());
|
||||
render_view_host->GetProcess()->GetID().GetUnsafeValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1820,7 +1863,8 @@ void WebContents::DOMContentLoaded(
|
|||
void WebContents::DidFinishLoad(content::RenderFrameHost* render_frame_host,
|
||||
const GURL& validated_url) {
|
||||
bool is_main_frame = !render_frame_host->GetParent();
|
||||
int frame_process_id = render_frame_host->GetProcess()->GetID();
|
||||
int32_t frame_process_id =
|
||||
render_frame_host->GetProcess()->GetID().GetUnsafeValue();
|
||||
int frame_routing_id = render_frame_host->GetRoutingID();
|
||||
auto weak_this = GetWeakPtr();
|
||||
Emit("did-frame-finish-load", is_main_frame, frame_process_id,
|
||||
|
@ -1847,7 +1891,8 @@ void WebContents::DidFailLoad(content::RenderFrameHost* render_frame_host,
|
|||
return;
|
||||
|
||||
bool is_main_frame = !render_frame_host->GetParent();
|
||||
int frame_process_id = render_frame_host->GetProcess()->GetID();
|
||||
int32_t frame_process_id =
|
||||
render_frame_host->GetProcess()->GetID().GetUnsafeValue();
|
||||
int frame_routing_id = render_frame_host->GetRoutingID();
|
||||
Emit("did-fail-load", error_code, "", url, is_main_frame, frame_process_id,
|
||||
frame_routing_id);
|
||||
|
@ -1872,7 +1917,7 @@ bool WebContents::EmitNavigationEvent(
|
|||
int frame_process_id = -1, frame_routing_id = -1;
|
||||
content::RenderFrameHost* frame_host = GetRenderFrameHost(navigation_handle);
|
||||
if (frame_host) {
|
||||
frame_process_id = frame_host->GetProcess()->GetID();
|
||||
frame_process_id = frame_host->GetProcess()->GetID().GetUnsafeValue();
|
||||
frame_routing_id = frame_host->GetRoutingID();
|
||||
}
|
||||
bool is_same_document = navigation_handle->IsSameDocument();
|
||||
|
@ -2019,7 +2064,7 @@ gin::Handle<gin_helper::internal::Event> WebContents::MakeEventWithSender(
|
|||
if (frame) {
|
||||
dict.SetGetter("senderFrame", frame);
|
||||
dict.Set("frameId", frame->GetRoutingID());
|
||||
dict.Set("processId", frame->GetProcess()->GetID());
|
||||
dict.Set("processId", frame->GetProcess()->GetID().GetUnsafeValue());
|
||||
dict.Set("frameTreeNodeId", frame->GetFrameTreeNodeId());
|
||||
}
|
||||
return event;
|
||||
|
@ -2121,7 +2166,7 @@ void WebContents::DidFinishNavigation(
|
|||
navigation_handle->GetRenderFrameHost();
|
||||
int frame_process_id = -1, frame_routing_id = -1;
|
||||
if (frame_host) {
|
||||
frame_process_id = frame_host->GetProcess()->GetID();
|
||||
frame_process_id = frame_host->GetProcess()->GetID().GetUnsafeValue();
|
||||
frame_routing_id = frame_host->GetRoutingID();
|
||||
}
|
||||
if (!navigation_handle->IsErrorPage()) {
|
||||
|
@ -2353,8 +2398,12 @@ void WebContents::SetBackgroundThrottling(bool allowed) {
|
|||
}
|
||||
}
|
||||
|
||||
int WebContents::GetProcessID() const {
|
||||
return web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
int32_t WebContents::GetProcessID() const {
|
||||
return web_contents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetID()
|
||||
.GetUnsafeValue();
|
||||
}
|
||||
|
||||
base::ProcessId WebContents::GetOSProcessID() const {
|
||||
|
@ -2594,7 +2643,8 @@ int WebContents::GetHistoryLength() const {
|
|||
}
|
||||
|
||||
const std::string WebContents::GetWebRTCIPHandlingPolicy() const {
|
||||
return web_contents()->GetMutableRendererPrefs()->webrtc_ip_handling_policy;
|
||||
return blink::ToString(
|
||||
web_contents()->GetMutableRendererPrefs()->webrtc_ip_handling_policy);
|
||||
}
|
||||
|
||||
void WebContents::SetWebRTCIPHandlingPolicy(
|
||||
|
@ -2602,7 +2652,7 @@ void WebContents::SetWebRTCIPHandlingPolicy(
|
|||
if (GetWebRTCIPHandlingPolicy() == webrtc_ip_handling_policy)
|
||||
return;
|
||||
web_contents()->GetMutableRendererPrefs()->webrtc_ip_handling_policy =
|
||||
webrtc_ip_handling_policy;
|
||||
blink::ToWebRTCIPHandlingPolicy(webrtc_ip_handling_policy);
|
||||
|
||||
web_contents()->SyncRendererPrefs();
|
||||
}
|
||||
|
@ -2662,8 +2712,9 @@ std::string WebContents::GetMediaSourceID(
|
|||
content::DesktopMediaID media_id(
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(frame_host->GetProcess()->GetID(),
|
||||
frame_host->GetRoutingID()));
|
||||
content::WebContentsMediaCaptureId(
|
||||
frame_host->GetProcess()->GetDeprecatedID(),
|
||||
frame_host->GetRoutingID()));
|
||||
|
||||
auto* request_frame_host = request_web_contents->GetPrimaryMainFrame();
|
||||
if (!request_frame_host)
|
||||
|
@ -2671,7 +2722,7 @@ std::string WebContents::GetMediaSourceID(
|
|||
|
||||
std::string id =
|
||||
content::DesktopStreamsRegistry::GetInstance()->RegisterStream(
|
||||
request_frame_host->GetProcess()->GetID(),
|
||||
request_frame_host->GetProcess()->GetDeprecatedID(),
|
||||
request_frame_host->GetRoutingID(),
|
||||
url::Origin::Create(request_frame_host->GetLastCommittedURL()
|
||||
.DeprecatedGetOriginAsURL()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue