Launch panels as popup windows in Aura, and add separate launcher icon logic for panels.
BUG=115901
TEST=Scratchpad and GTalk apps should open popup windows with a launcher icon (currently the blown up favicon, that will change in a follow up CL).
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=125080
Please ignore changes to browser_actions_container.cc, those are being addressed in http://codereview.chromium.org/9535020/, just here to avoid ...
8 years, 9 months ago
(2012-03-02 22:44:28 UTC)
#1
Please ignore changes to browser_actions_container.cc, those are being addressed
in http://codereview.chromium.org/9535020/, just here to avoid crashes while
testing.
http://codereview.chromium.org/9590001/diff/1001/chrome/browser/ui/views/aura/launcher/launcher_updater.cc File chrome/browser/ui/views/aura/launcher/launcher_updater.cc (right): http://codereview.chromium.org/9590001/diff/1001/chrome/browser/ui/views/aura/launcher/launcher_updater.cc#newcode189 chrome/browser/ui/views/aura/launcher/launcher_updater.cc:189: if (type_ == TYPE_APP) On 2012/03/03 00:02:06, stevenjb (chromium) ...
8 years, 9 months ago
(2012-03-03 00:13:04 UTC)
#4
http://codereview.chromium.org/9590001/diff/1001/chrome/browser/ui/views/aura...
File chrome/browser/ui/views/aura/launcher/launcher_updater.cc (right):
http://codereview.chromium.org/9590001/diff/1001/chrome/browser/ui/views/aura...
chrome/browser/ui/views/aura/launcher/launcher_updater.cc:189: if (type_ ==
TYPE_APP)
On 2012/03/03 00:02:06, stevenjb (chromium) wrote:
> Panels want to change their icon when the favicon changes; their behavior is
> somewhere between App and Tabbed behavior.
Ok, makes sense. But I don't think the ash portion of the launcher needs to
distinguish between APP and PANEL, right? I'm saying keep TYPE_PANEL only to the
chrome side of things.
stevenjb
8 years, 9 months ago
(2012-03-03 00:53:58 UTC)
#5
stevenjb
Yes... with a change in ChromeLauncherDelegate::SetAppImage() I was able to eliminate ash::TYPE_PANEL, at least for ...
8 years, 9 months ago
(2012-03-03 23:33:20 UTC)
#6
Yes... with a change in ChromeLauncherDelegate::SetAppImage() I was able to
eliminate ash::TYPE_PANEL, at least for now.
sky
http://codereview.chromium.org/9590001/diff/9001/chrome/browser/extensions/extension_tab_helper.cc File chrome/browser/extensions/extension_tab_helper.cc (right): http://codereview.chromium.org/9590001/diff/9001/chrome/browser/extensions/extension_tab_helper.cc#newcode67 chrome/browser/extensions/extension_tab_helper.cc:67: const Extension* ExtensionTabHelper::GetExtension( Make order match header. http://codereview.chromium.org/9590001/diff/9001/chrome/browser/ui/views/aura/launcher/chrome_launcher_delegate.cc File ...
8 years, 9 months ago
(2012-03-05 15:20:25 UTC)
#7
8 years, 9 months ago
(2012-03-05 19:50:06 UTC)
#9
http://codereview.chromium.org/9590001/diff/9001/chrome/browser/extensions/ex...
File chrome/browser/extensions/extension_tab_helper.cc (right):
http://codereview.chromium.org/9590001/diff/9001/chrome/browser/extensions/ex...
chrome/browser/extensions/extension_tab_helper.cc:67: const Extension*
ExtensionTabHelper::GetExtension(
On 2012/03/05 15:20:25, sky wrote:
> Make order match header.
Done.
http://codereview.chromium.org/9590001/diff/9001/chrome/browser/ui/views/aura...
File chrome/browser/ui/views/aura/launcher/chrome_launcher_delegate.cc (right):
http://codereview.chromium.org/9590001/diff/9001/chrome/browser/ui/views/aura...
chrome/browser/ui/views/aura/launcher/chrome_launcher_delegate.cc:370:
i->second.updater->type() != LauncherUpdater::TYPE_PANEL)) {
On 2012/03/05 15:20:25, sky wrote:
> Rather than this if, could you avoid asking for the image for type panels?
Looking through the code again (with a bit more familiarity now), I see that I
can avoid calling app_icon_loader_->FetchImage() in
ChromeLauncherDelegate::CreateAppLauncherItem(), and will add that.
However, we could still have an app, a panel it created, and a popup window it
created all in the launcher, all with the same app_id, so we need a way of
preventing updates with the same app_id from overriding icons set by the panel.
We may need an explicit way of doing this, but for now skipping panels (which
will always set their icon from LauncherUpdater::UpdateLauncher()) seems
easiest.
I did realize that we store item.app_type (not to be confused with
item.item_type), which does differentiate between PANEL and APP, so I will use
that instead of looking at the updater type.
http://codereview.chromium.org/9590001/diff/9001/chrome/browser/ui/views/fram...
File chrome/browser/ui/views/frame/browser_view.cc (right):
http://codereview.chromium.org/9590001/diff/9001/chrome/browser/ui/views/fram...
chrome/browser/ui/views/frame/browser_view.cc:629: if (!icon_updater_.get())
On 2012/03/05 15:22:52, sky wrote:
> On 2012/03/05 15:20:25, sky wrote:
> > Why is this needed?
>
> I see why it's needed. Could you move the creation to a method and have both
> Show and this invoke it.
Done.
sky
http://codereview.chromium.org/9590001/diff/16003/chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc File chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc (right): http://codereview.chromium.org/9590001/diff/16003/chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc#newcode366 chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc:366: return; This could cause problems if the app id ...
8 years, 9 months ago
(2012-03-05 22:19:04 UTC)
#10
http://codereview.chromium.org/9590001/diff/18001/chrome/browser/extensions/extension_tabs_module.cc File chrome/browser/extensions/extension_tabs_module.cc (right): http://codereview.chromium.org/9590001/diff/18001/chrome/browser/extensions/extension_tabs_module.cc#newcode623 chrome/browser/extensions/extension_tabs_module.cc:623: tab->extension_tab_helper()->SetExtensionAppIconById(extension_id); On 2012/03/05 23:28:29, Mihai Parparita wrote: > Drive-by: ...
8 years, 9 months ago
(2012-03-05 23:50:55 UTC)
#13
http://codereview.chromium.org/9590001/diff/18001/chrome/browser/extensions/e...
File chrome/browser/extensions/extension_tabs_module.cc (right):
http://codereview.chromium.org/9590001/diff/18001/chrome/browser/extensions/e...
chrome/browser/extensions/extension_tabs_module.cc:623:
tab->extension_tab_helper()->SetExtensionAppIconById(extension_id);
On 2012/03/05 23:28:29, Mihai Parparita wrote:
> Drive-by: Why can't SetExtensionAppById be used? That also sets the icon.
I tried that first, but it triggered a DCHECK on
extension->GetFullLaunchURL().is_valid() (the url is empty). I opted to just set
the icon instead of changing the DCHECK and setting the extension, since it
could potentially have other subtle side effects that I would would like to
avoid debugging in R19. I'd rather save the debugging for when we convert panels
to not be browsers for R20.
sky
LGTM
8 years, 9 months ago
(2012-03-06 00:42:16 UTC)
#14
LGTM
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stevenjb@chromium.org/9590001/21001
8 years, 9 months ago
(2012-03-06 00:49:37 UTC)
#15
Issue 9590001: Launch panels as popup windows in Aura, and add separate launcher icon logic for panels.
(Closed)
Created 8 years, 9 months ago by stevenjb
Modified 8 years, 9 months ago
Reviewers: sky, Dmitry Lomov (no reviews), DaveMoore, Mihai Parparita -not on Chrome
Base URL: http://git.chromium.org/chromium/src.git@master
Comments: 20