Commit 59d7f39e authored by nancy's avatar nancy Committed by Commit Bot

Add Hangouts extension to the AppService.

For extensions, like Hangouts, since that is not app, it is not added
to the AppService, so the icon is not shown on the shelf. Hangouts is a
special extension, which shows an window, so it should be added to the
AppService to show the icon on the shelf, when launching the hangouts.

BUG=10095580

Change-Id: I7cfdbdcba68bb67aa7d70d10ab1a31ab6299bca4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846213Reviewed-by: default avatarNigel Tao <nigeltao@chromium.org>
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704069}
parent f15c0767
......@@ -45,6 +45,7 @@
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/constants.h"
#include "extensions/common/switches.h"
// TODO(crbug.com/826982): life cycle events. Extensions can be installed and
......@@ -184,6 +185,13 @@ void ExtensionApps::Initialize(
}
bool ExtensionApps::Accepts(const extensions::Extension* extension) {
// Hangouts is a special extension, which shows an window, so it should be
// added to the AppService to show the icon on the shelf, when launching the
// hangouts.
if (extension->id() == extension_misc::kProdHangoutsExtensionId) {
return app_type_ == apps::mojom::AppType::kExtension;
}
if (!extension->is_app() || IsBlacklisted(extension->id())) {
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment