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

Unified Diff: chrome/browser/extensions/api/tabs/ash_panel_contents.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/extensions/api/tabs/ash_panel_contents.cc
diff --git a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc
index 86286c36a56871e81433dacfa2b51d5fc30ae9fc..e5889ff35649ced7c4ebaf8b96b190623faf895d 100644
--- a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc
+++ b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc
@@ -18,6 +18,8 @@
#include "content/public/browser/web_contents.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/common/extension.h"
+#include "extensions/common/permissions/api_permission.h"
+#include "extensions/common/permissions/permissions_data.h"
#include "ui/gfx/image/image.h"
using extensions::AppWindow;
@@ -139,6 +141,9 @@ void AshPanelWindowController::SetFullscreenMode(
bool AshPanelWindowController::IsVisibleToExtension(
const extensions::Extension* extension) const {
+ if (extension->permissions_data()->HasAPIPermission(
+ extensions::APIPermission::kWindowsGlobal))
+ return true;
return extension->id() == app_window_->extension_id();
}

Powered by Google App Engine
This is Rietveld 408576698