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

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

Issue 10829186: Tabs API is usable without tabs permission. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: ETU now SetString()'s for empty values Created 8 years, 4 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 | « chrome/browser/extensions/window_controller.h ('k') | chrome/browser/ui/views/ash/panel_view_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel.cc
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index af6adf1a705e6a1a7f1c3abbf8e156b4ed7e6462..0dac7b56744cb64a5000622689916b3888bafed5 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -38,6 +38,10 @@
using content::RenderViewHost;
using content::UserMetricsAction;
+namespace extensions {
+class Extension;
+}
+
namespace panel_internal {
class PanelExtensionWindowController : public extensions::WindowController {
@@ -48,7 +52,8 @@ class PanelExtensionWindowController : public extensions::WindowController {
// Overridden from extensions::WindowController.
virtual int GetWindowId() const OVERRIDE;
virtual std::string GetWindowTypeText() const OVERRIDE;
- virtual base::DictionaryValue* CreateWindowValueWithTabs() const OVERRIDE;
+ virtual base::DictionaryValue* CreateWindowValueWithTabs(
+ const extensions::Extension* extension) const OVERRIDE;
virtual bool CanClose(Reason* reason) const OVERRIDE;
virtual void SetFullscreenMode(bool is_fullscreen,
const GURL& extension_url) const OVERRIDE;
@@ -80,12 +85,11 @@ std::string PanelExtensionWindowController::GetWindowTypeText() const {
}
base::DictionaryValue*
-PanelExtensionWindowController::CreateWindowValueWithTabs() const {
+PanelExtensionWindowController::CreateWindowValueWithTabs(
+ const extensions::Extension* extension) const {
base::DictionaryValue* result = CreateWindowValue();
- // Safe to include info about the web contents as this is only called
- // by the extension that owns this window. See IsVisibleToExtension().
- // TODO(jennb): DCHECK this after chebert's patch 10829186 lands.
+ DCHECK(IsVisibleToExtension(extension));
content::WebContents* web_contents = panel_->GetWebContents();
if (web_contents) {
DictionaryValue* tab_value = new DictionaryValue();
« no previous file with comments | « chrome/browser/extensions/window_controller.h ('k') | chrome/browser/ui/views/ash/panel_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698