Not implemented reached in virtual void views::NativeWidgetMac::SetWindowIcons |
|||
Issue descriptionRunning Canary with error logging on macOS, 10.12.6. Got a fair number of views-related error messages. """ 10 [6804:775:0918/125931.567667:ERROR:native_widget_mac.mm(281)] Not implemented reached in virtual void views::NativeWidgetMac::SetWindowIcons(const gfx::ImageSkia &, const gfx::Ima geSkia &) """
,
Sep 20 2017
yeah I should just nerf that. Thanks for filing this bug :) For a while I thought I could put icons next to the items in the `Window` mainMenu item (https://chromium-review.googlesource.com/c/chromium/src/+/560934), but that was a failed experiment. per-window icons are just not a thing on Mac.
,
Sep 20 2017
hm, but also I'm assuming you're using --secondary-ui-md or invoking permission bubbles (or using WebPayments). Only MacViews UI should tickle this. I see pairs of errors like [45085:775:0920/103946.177318:ERROR:native_widget_mac.mm(329)] Not implemented reached in virtual void views::NativeWidgetMac::StackAbove(gfx::NativeView) [45085:775:0920/104043.678651:ERROR:native_widget_mac.mm(281)] Not implemented reached in virtual void views::NativeWidgetMac::SetWindowIcons(const gfx::ImageSkia &, const gfx::ImageSkia &) whenever a window is created. With a mac_views_browser, there might be a lot more since the tab loading spinner animation can update the taskbar icon on Windows. I toyed with Version 63.0.3219.0 (Official Build) canary (64-bit) and don't see any error spew in the console (i.e. only once, each time a dialog is created).
,
Sep 20 2017
Yeah, I turned on all the flags that pkasting sent out for that.
,
Sep 20 2017
oh nvm, those were flags for the ominbox. probalby unrelated. I just turned on "--secondary-ui-md", so that's not it. Must be permission bubbles.
,
Sep 20 2017
ooozomg maybe we *can* set the icon. In the dock context menu at least [[NSWindow standardWindowButton:NSWindowDocumentIconButton] setImage:customImage]. how could would that be if it was favicons :O (or would it suck? Opinions?) Currently it's boring. It's boring in Safari too, but Safari doesn't put favicons on Tabs either, and ppl throw hate at Safari for it.
,
Sep 20 2017
ugh - looks like more hackery is needed. We can only set the icon next to a title in the titlebar. Icons in the Dock menus are only shown for closed "document" windows - as soon as you open the document, it becomes the boring/generic window icon.
We *do* set titles in the titlebar for popups and PWAs (types of browser window). So the following:
void NativeWidgetMac::SetWindowIcons(const gfx::ImageSkia& window_icon,
const gfx::ImageSkia& app_icon) {
[GetNativeWindow() setRepresentedURL:[[[NSURL alloc] init] autorelease]];
[[GetNativeWindow() standardWindowButton:NSWindowDocumentIconButton]
setImage:NSImageFromImageSkiaWithColorSpace(
window_icon, base::mac::GetSRGBColorSpace())];
}
results in the attached (in mac_views_browser = true).
This would all need review, so I'm just going to nerf the NOTIMPLEMENTED for now.
,
Sep 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cee8f765609d27529d22ed4f4a4cc30e28afb824 commit cee8f765609d27529d22ed4f4a4cc30e28afb824 Author: Trent Apted <tapted@chromium.org> Date: Thu Sep 21 05:19:18 2017 Silence NOTIMPLMENTEDs() in NativeWidgetMac::SetWindowIcons(), StackAbove(). It doesn't make sense to implement these on Mac for now, and they litter logs with noise. Bug: 766897 Change-Id: Ieb1224b4ef13a7a2cc76a078eaa687ba7a63b4d1 Reviewed-on: https://chromium-review.googlesource.com/674546 Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#503359} [modify] https://crrev.com/cee8f765609d27529d22ed4f4a4cc30e28afb824/ui/views/widget/native_widget_mac.mm
,
Sep 21 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by erikc...@chromium.org
, Sep 20 2017