chore: bump chromium to 93.0.4536.0 (main) (#29586)
* chore: bump chromium in DEPS to 93.0.4536.0 * chore: update patches * [2918475] Make InkDrop a View class property Refs:2918475
Replace old views::Button::ink_drop() calls with views::InkDrop::Get() * [2935942] Convert use of gfx::ImageSkia to ui::ImageModel for WidgetDelegates Refs:2935942
Update GetWindowIcon(), GetWindowAppIcon(), and GetDevToolsWindowIcon() to return ui::ImageModel instead of gfx::ImageSkia. Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
7b169c2884
commit
04679121d6
27 changed files with 61 additions and 60 deletions
|
@ -3473,10 +3473,8 @@ void WebContents::DevToolsSearchInPath(int request_id,
|
|||
}
|
||||
|
||||
#if defined(TOOLKIT_VIEWS) && !defined(OS_MAC)
|
||||
gfx::ImageSkia WebContents::GetDevToolsWindowIcon() {
|
||||
if (!owner_window())
|
||||
return gfx::ImageSkia();
|
||||
return owner_window()->GetWindowAppIcon();
|
||||
ui::ImageModel WebContents::GetDevToolsWindowIcon() {
|
||||
return owner_window() ? owner_window()->GetWindowAppIcon() : ui::ImageModel{};
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "shell/common/gin_helper/cleaned_up_at_exit.h"
|
||||
#include "shell/common/gin_helper/constructible.h"
|
||||
#include "shell/common/gin_helper/error_thrower.h"
|
||||
#include "ui/base/models/image_model.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
|
@ -660,7 +661,7 @@ class WebContents : public gin::Wrappable<WebContents>,
|
|||
|
||||
// InspectableWebContentsViewDelegate:
|
||||
#if defined(TOOLKIT_VIEWS) && !defined(OS_MAC)
|
||||
gfx::ImageSkia GetDevToolsWindowIcon() override;
|
||||
ui::ImageModel GetDevToolsWindowIcon() override;
|
||||
#endif
|
||||
#if defined(OS_LINUX)
|
||||
void GetDevToolsWindowWMClass(std::string* name,
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
namespace electron {
|
||||
|
||||
gfx::ImageSkia InspectableWebContentsViewDelegate::GetDevToolsWindowIcon() {
|
||||
return gfx::ImageSkia();
|
||||
ui::ImageModel InspectableWebContentsViewDelegate::GetDevToolsWindowIcon() {
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
#include "ui/base/models/image_model.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -22,7 +22,7 @@ class InspectableWebContentsViewDelegate {
|
|||
virtual void DevToolsResized() {}
|
||||
|
||||
// Returns the icon of devtools window.
|
||||
virtual gfx::ImageSkia GetDevToolsWindowIcon();
|
||||
virtual ui::ImageModel GetDevToolsWindowIcon();
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
// Called when creating devtools window.
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "shell/browser/ui/inspectable_web_contents.h"
|
||||
#include "shell/browser/ui/inspectable_web_contents_delegate.h"
|
||||
#include "shell/browser/ui/inspectable_web_contents_view_delegate.h"
|
||||
#include "ui/base/models/image_model.h"
|
||||
#include "ui/views/controls/label.h"
|
||||
#include "ui/views/controls/webview/webview.h"
|
||||
#include "ui/views/widget/widget.h"
|
||||
|
@ -46,8 +47,8 @@ class DevToolsWindowDelegate : public views::ClientView,
|
|||
bool CanMaximize() const override { return true; }
|
||||
bool CanMinimize() const override { return true; }
|
||||
std::u16string GetWindowTitle() const override { return shell_->GetTitle(); }
|
||||
gfx::ImageSkia GetWindowAppIcon() override { return GetWindowIcon(); }
|
||||
gfx::ImageSkia GetWindowIcon() override { return icon_; }
|
||||
ui::ImageModel GetWindowAppIcon() override { return GetWindowIcon(); }
|
||||
ui::ImageModel GetWindowIcon() override { return icon_; }
|
||||
views::Widget* GetWidget() override { return widget_; }
|
||||
const views::Widget* GetWidget() const override { return widget_; }
|
||||
views::View* GetContentsView() override { return view_; }
|
||||
|
@ -65,7 +66,7 @@ class DevToolsWindowDelegate : public views::ClientView,
|
|||
InspectableWebContentsViewViews* shell_;
|
||||
views::View* view_;
|
||||
views::Widget* widget_;
|
||||
gfx::ImageSkia icon_;
|
||||
ui::ImageModel icon_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(DevToolsWindowDelegate);
|
||||
};
|
||||
|
|
|
@ -32,10 +32,11 @@ SubmenuButton::SubmenuButton(PressedCallback callback,
|
|||
gfx::Canvas::SizeStringInt(GetText(), gfx::FontList(), &text_width_,
|
||||
&text_height_, 0, 0);
|
||||
|
||||
ink_drop()->SetMode(views::InkDropHost::InkDropMode::ON);
|
||||
ink_drop()->SetBaseColor(
|
||||
views::InkDropHost* ink_drop = views::InkDrop::Get(this);
|
||||
ink_drop->SetMode(views::InkDropHost::InkDropMode::ON);
|
||||
ink_drop->SetBaseColor(
|
||||
color_utils::BlendTowardMaxContrast(background_color_, 0x81));
|
||||
views::InkDrop::UseInkDropForFloodFillRipple(ink_drop(), false, true);
|
||||
views::InkDrop::UseInkDropForFloodFillRipple(ink_drop, false, true);
|
||||
}
|
||||
|
||||
SubmenuButton::~SubmenuButton() = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue