chore: bump chromium to 93.0.4550.0 (main) (#29751)
This commit is contained in:
parent
c5066cce22
commit
b8261f1591
78 changed files with 402 additions and 429 deletions
|
@ -910,6 +910,16 @@ void WebContents::InitWithWebContents(content::WebContents* web_contents,
|
|||
inspectable_web_contents_ = std::make_unique<InspectableWebContents>(
|
||||
web_contents, browser_context->prefs(), is_guest);
|
||||
inspectable_web_contents_->SetDelegate(this);
|
||||
|
||||
if (web_preferences) {
|
||||
std::string color_name;
|
||||
if (web_preferences->GetPreference(options::kBackgroundColor,
|
||||
&color_name)) {
|
||||
web_contents->SetPageBaseBackgroundColor(ParseHexColor(color_name));
|
||||
} else {
|
||||
web_contents->SetPageBaseBackgroundColor(SK_ColorTRANSPARENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WebContents::~WebContents() {
|
||||
|
@ -1369,18 +1379,6 @@ void WebContents::HandleNewRenderFrame(
|
|||
if (!rwhv)
|
||||
return;
|
||||
|
||||
// Set the background color of RenderWidgetHostView.
|
||||
auto* web_preferences = WebContentsPreferences::From(web_contents());
|
||||
if (web_preferences) {
|
||||
std::string color_name;
|
||||
if (web_preferences->GetPreference(options::kBackgroundColor,
|
||||
&color_name)) {
|
||||
rwhv->SetBackgroundColor(ParseHexColor(color_name));
|
||||
} else {
|
||||
rwhv->SetBackgroundColor(SK_ColorTRANSPARENT);
|
||||
}
|
||||
}
|
||||
|
||||
if (!background_throttling_)
|
||||
render_frame_host->GetRenderViewHost()->SetSchedulerThrottling(false);
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/render_widget_host.h"
|
||||
#include "content/public/browser/render_widget_host_view.h"
|
||||
#include "media/capture/mojom/video_capture_buffer.mojom.h"
|
||||
#include "media/capture/mojom/video_capture_types.mojom.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#include "ui/gfx/geometry/size_conversions.h"
|
||||
|
|
|
@ -68,7 +68,7 @@ void GPUInfoManager::CompleteInfoFetcher(
|
|||
|
||||
if (NeedsCompleteGpuInfoCollection()) {
|
||||
gpu_data_manager_->RequestDxdiagDx12VulkanGpuInfoIfNeeded(
|
||||
content::kGpuInfoRequestAll, /* delayed */ false);
|
||||
content::GpuDataManagerImpl::kGpuInfoRequestAll, /* delayed */ false);
|
||||
} else {
|
||||
GPUInfoManager::OnGpuInfoUpdate();
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class ElectronPermissionManager::PendingRequest {
|
|||
const std::vector<content::PermissionType>& permissions,
|
||||
StatusesCallback callback)
|
||||
: render_process_id_(render_frame_host->GetProcess()->GetID()),
|
||||
render_frame_id_(render_frame_host->GetGlobalFrameRoutingId()),
|
||||
render_frame_id_(render_frame_host->GetGlobalId()),
|
||||
callback_(std::move(callback)),
|
||||
permissions_(permissions),
|
||||
results_(permissions.size(), blink::mojom::PermissionStatus::DENIED),
|
||||
|
@ -86,7 +86,7 @@ class ElectronPermissionManager::PendingRequest {
|
|||
|
||||
private:
|
||||
int render_process_id_;
|
||||
content::GlobalFrameRoutingId render_frame_id_;
|
||||
content::GlobalRenderFrameHostId render_frame_id_;
|
||||
StatusesCallback callback_;
|
||||
std::vector<content::PermissionType> permissions_;
|
||||
std::vector<blink::mojom::PermissionStatus> results_;
|
||||
|
|
|
@ -345,6 +345,21 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options,
|
|||
// bounds if the bounds are smaller than the current display
|
||||
SetBounds(gfx::Rect(GetPosition(), bounds.size()), false);
|
||||
#endif
|
||||
|
||||
SetOwnedByWidget(false);
|
||||
RegisterDeleteDelegateCallback(base::BindOnce(
|
||||
[](NativeWindowViews* window) {
|
||||
if (window->is_modal() && window->parent()) {
|
||||
auto* parent = window->parent();
|
||||
// Enable parent window after current window gets closed.
|
||||
static_cast<NativeWindowViews*>(parent)->DecrementChildModals();
|
||||
// Focus on parent window.
|
||||
parent->Focus(true);
|
||||
}
|
||||
|
||||
window->NotifyWindowClosed();
|
||||
},
|
||||
this));
|
||||
}
|
||||
|
||||
NativeWindowViews::~NativeWindowViews() {
|
||||
|
@ -1472,18 +1487,6 @@ void NativeWindowViews::OnWidgetDestroyed(views::Widget* changed_widget) {
|
|||
widget_destroyed_ = true;
|
||||
}
|
||||
|
||||
void NativeWindowViews::DeleteDelegate() {
|
||||
if (is_modal() && this->parent()) {
|
||||
auto* parent = this->parent();
|
||||
// Enable parent window after current window gets closed.
|
||||
static_cast<NativeWindowViews*>(parent)->DecrementChildModals();
|
||||
// Focus on parent window.
|
||||
parent->Focus(true);
|
||||
}
|
||||
|
||||
NotifyWindowClosed();
|
||||
}
|
||||
|
||||
views::View* NativeWindowViews::GetInitiallyFocusedView() {
|
||||
return focused_view_;
|
||||
}
|
||||
|
|
|
@ -183,7 +183,6 @@ class NativeWindowViews : public NativeWindow,
|
|||
void OnWidgetDestroyed(views::Widget* widget) override;
|
||||
|
||||
// views::WidgetDelegate:
|
||||
void DeleteDelegate() override;
|
||||
views::View* GetInitiallyFocusedView() override;
|
||||
bool CanMaximize() const override;
|
||||
bool CanMinimize() const override;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "net/url_request/redirect_info.h"
|
||||
#include "services/metrics/public/cpp/ukm_source_id.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "services/network/public/mojom/early_hints.mojom.h"
|
||||
#include "shell/browser/net/asar/asar_url_loader.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "url/origin.h"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "extensions/browser/extension_navigation_ui_data.h"
|
||||
#include "net/base/ip_endpoint.h"
|
||||
#include "net/http/http_util.h"
|
||||
#include "services/network/public/mojom/url_response_head.mojom.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
|
|
@ -480,13 +480,13 @@ void OffScreenRenderWidgetHostView::CopyFromSurface(
|
|||
}
|
||||
|
||||
void OffScreenRenderWidgetHostView::GetScreenInfo(
|
||||
blink::ScreenInfo* screen_info) {
|
||||
display::ScreenInfo* screen_info) {
|
||||
screen_info->depth = 24;
|
||||
screen_info->depth_per_component = 8;
|
||||
screen_info->orientation_angle = 0;
|
||||
screen_info->device_scale_factor = GetCurrentDeviceScaleFactor();
|
||||
screen_info->orientation_type =
|
||||
blink::mojom::ScreenOrientation::kLandscapePrimary;
|
||||
display::mojom::ScreenOrientation::kLandscapePrimary;
|
||||
screen_info->rect = gfx::Rect(size_);
|
||||
screen_info->available_rect = gfx::Rect(size_);
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
|||
const gfx::Rect& src_rect,
|
||||
const gfx::Size& output_size,
|
||||
base::OnceCallback<void(const SkBitmap&)> callback) override;
|
||||
void GetScreenInfo(blink::ScreenInfo* screen_info) override;
|
||||
void GetScreenInfo(display::ScreenInfo* screen_info) override;
|
||||
void TransformPointToRootSurface(gfx::PointF* point) override;
|
||||
gfx::Rect GetBoundsInRootWindow(void) override;
|
||||
absl::optional<content::DisplayFeature> GetDisplayFeature() override;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <utility>
|
||||
|
||||
#include "media/base/video_frame_metadata.h"
|
||||
#include "media/capture/mojom/video_capture_buffer.mojom.h"
|
||||
#include "media/capture/mojom/video_capture_types.mojom.h"
|
||||
#include "shell/browser/osr/osr_render_widget_host_view.h"
|
||||
#include "ui/gfx/skbitmap_operations.h"
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include "content/browser/web_contents/web_contents_impl.h" // nogncheck
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "third_party/blink/public/common/widget/screen_info.h"
|
||||
#include "ui/display/screen.h"
|
||||
#include "ui/display/screen_info.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "content/public/browser/web_contents_user_data.h"
|
||||
#include "mojo/public/cpp/bindings/associated_receiver.h"
|
||||
#include "mojo/public/cpp/bindings/associated_remote.h"
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
#include "shell/common/gin_helper/promise.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ GURL GetRemoteBaseURL() {
|
|||
return GURL(base::StringPrintf("%s%s/%s/",
|
||||
kChromeUIDevToolsRemoteFrontendBase,
|
||||
kChromeUIDevToolsRemoteFrontendPath,
|
||||
content::GetWebKitRevision().c_str()));
|
||||
content::GetChromiumGitRevision().c_str()));
|
||||
}
|
||||
|
||||
GURL GetDevToolsURL(bool can_dock) {
|
||||
|
|
|
@ -33,7 +33,7 @@ class DevToolsWindowDelegate : public views::ClientView,
|
|||
shell_(shell),
|
||||
view_(view),
|
||||
widget_(widget) {
|
||||
// A WidgetDelegate should be deleted on DeleteDelegate.
|
||||
SetOwnedByWidget(true);
|
||||
set_owned_by_client();
|
||||
|
||||
if (shell->GetDelegate())
|
||||
|
@ -42,7 +42,6 @@ class DevToolsWindowDelegate : public views::ClientView,
|
|||
~DevToolsWindowDelegate() override = default;
|
||||
|
||||
// views::WidgetDelegate:
|
||||
void DeleteDelegate() override { delete this; }
|
||||
views::View* GetInitiallyFocusedView() override { return view_; }
|
||||
bool CanMaximize() const override { return true; }
|
||||
bool CanMinimize() const override { return true; }
|
||||
|
|
|
@ -441,14 +441,6 @@ void WebContentsPreferences::OverrideWebkitPrefs(
|
|||
if (GetAsString(&preference_, "defaultEncoding", &encoding))
|
||||
prefs->default_encoding = encoding;
|
||||
|
||||
// --background-color.
|
||||
std::string color;
|
||||
if (GetAsString(&preference_, options::kBackgroundColor, &color)) {
|
||||
prefs->background_color = color;
|
||||
} else if (!IsEnabled(options::kOffscreen)) {
|
||||
prefs->background_color = "#fff";
|
||||
}
|
||||
|
||||
// Pass the opener's window id.
|
||||
int opener_id;
|
||||
if (GetAsInteger(&preference_, options::kOpenerID, &opener_id))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue