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

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: Created 5 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel.cc » ('j') | chrome/browser/ui/panels/panel.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8502c00a31289b17aa76a3a5ff47689d02397743..39b8704f588f0796e6f3b792ee9628e3814836fc 100644
--- a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc
+++ b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc
@@ -19,6 +19,8 @@
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_messages.h"
+#include "extensions/common/permissions/api_permission.h"
+#include "extensions/common/permissions/permissions_data.h"
#include "ui/gfx/image/image.h"
using extensions::AppWindow;
@@ -140,6 +142,9 @@ void AshPanelWindowController::SetFullscreenMode(
bool AshPanelWindowController::IsVisibleToExtension(
const extensions::Extension* extension) const {
+ if (extension->permissions_data()->HasAPIPermission(
+ extensions::APIPermission::kTabGlobal))
+ return true;
return extension->id() == app_window_->extension_id();
}
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel.cc » ('j') | chrome/browser/ui/panels/panel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698