Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(694)

Unified Diff: chrome/browser/ui/panels/panel.cc

Issue 1099553002: extensions: windows: list all windows from the current profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add application windows resize constraint test Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/panels/panel.cc
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 7c98b7d6853a6be89288048db11cf6578a27e107..f15ddea7781db4b13d3de3895b5ec15d1b2ce6b1 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -40,6 +40,8 @@
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_handlers/icons_handler.h"
+#include "extensions/common/permissions/api_permission.h"
+#include "extensions/common/permissions/permissions_data.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/image/image.h"
@@ -151,6 +153,9 @@ void PanelExtensionWindowController::SetFullscreenMode(
bool PanelExtensionWindowController::IsVisibleToExtension(
const extensions::Extension* extension) const {
+ if (extension->permissions_data()->HasAPIPermission(
+ extensions::APIPermission::kWindowsGlobal))
+ return true;
return extension->id() == panel_->extension_id();
}

Powered by Google App Engine
This is Rietveld 408576698