| Index: chrome/browser/extensions/api/notifications/notifications_api.cc
|
| diff --git a/chrome/browser/extensions/api/notifications/notifications_api.cc b/chrome/browser/extensions/api/notifications/notifications_api.cc
|
| index 215c9833793066d22cb29bd74b11d70567bd762f..1f09f761a0ac6a6a57acd96269050a995ff80027 100644
|
| --- a/chrome/browser/extensions/api/notifications/notifications_api.cc
|
| +++ b/chrome/browser/extensions/api/notifications/notifications_api.cc
|
| @@ -31,6 +31,9 @@
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/render_view_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| +#include "extensions/browser/app_window/app_window.h"
|
| +#include "extensions/browser/app_window/app_window_registry.h"
|
| +#include "extensions/browser/app_window/native_app_window.h"
|
| #include "extensions/browser/event_router.h"
|
| #include "extensions/browser/extension_system_provider.h"
|
| #include "extensions/browser/extensions_browser_client.h"
|
| @@ -188,6 +191,19 @@ class NotificationsApiDelegate : public NotificationDelegate {
|
|
|
| std::string id() const override { return scoped_id_; }
|
|
|
| + // Should only display when fullscreen if this app is the source of the
|
| + // fullscreen window.
|
| + bool ShouldDisplayOverFullscreen() const override {
|
| + AppWindowRegistry::AppWindowList windows = AppWindowRegistry::Get(
|
| + api_function_->GetProfile())->GetAppWindowsForApp(extension_id_);
|
| + for (const auto& window : windows) {
|
| + // Window must be fullscreen and visible
|
| + if (window->IsFullscreen() && window->GetBaseWindow()->IsActive())
|
| + return true;
|
| + }
|
| + return false;
|
| + }
|
| +
|
| private:
|
| ~NotificationsApiDelegate() override {}
|
|
|
|
|