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

Unified Diff: chrome/browser/ui/views/ash/panel_view_aura.cc

Issue 10777004: Support chrome.windows extension API events for browserless Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced Created 8 years, 5 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/ui/panels/panel_cocoa.mm ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ash/panel_view_aura.cc
diff --git a/chrome/browser/ui/views/ash/panel_view_aura.cc b/chrome/browser/ui/views/ash/panel_view_aura.cc
index 41d4eecff53779025498d006590892b4be64c846..5e2329121e0f5cfc4c7a923c61b43a6a72a2a8ad 100644
--- a/chrome/browser/ui/views/ash/panel_view_aura.cc
+++ b/chrome/browser/ui/views/ash/panel_view_aura.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/window_controller.h"
+#include "chrome/browser/extensions/window_controller_list.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_id.h"
#include "chrome/browser/ui/browser.h"
@@ -182,6 +183,7 @@ class PanelExtensionWindowController : public extensions::WindowController {
public:
PanelExtensionWindowController(PanelViewAura* panel_view,
PanelHost* panel_host);
+ virtual ~PanelExtensionWindowController();
// Overriden from extensions::WindowController:
virtual int GetWindowId() const OVERRIDE;
@@ -207,6 +209,11 @@ PanelExtensionWindowController::PanelExtensionWindowController(
: extensions::WindowController(panel_view, panel_host->profile()),
panel_view_(panel_view),
panel_host_(panel_host) {
+ extensions::WindowControllerList::GetInstance()->AddExtensionWindow(this);
+}
+
+PanelExtensionWindowController::~PanelExtensionWindowController() {
+ extensions::WindowControllerList::GetInstance()->RemoveExtensionWindow(this);
}
int PanelExtensionWindowController::GetWindowId() const {
« no previous file with comments | « chrome/browser/ui/panels/panel_cocoa.mm ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698