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

Unified Diff: chrome/browser/ui/panels/panel_cocoa.mm

Issue 10777004: Support chrome.windows extension API events for browserless Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac unit_test failure 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
Index: chrome/browser/ui/panels/panel_cocoa.mm
diff --git a/chrome/browser/ui/panels/panel_cocoa.mm b/chrome/browser/ui/panels/panel_cocoa.mm
index eb38a92fddef069d2515d290db2145553342408d..4fbdb0224fd220e47ca7df64716a8d12f2b9ce6f 100644
--- a/chrome/browser/ui/panels/panel_cocoa.mm
+++ b/chrome/browser/ui/panels/panel_cocoa.mm
@@ -51,6 +51,12 @@ bool PanelCocoa::isClosed() {
void PanelCocoa::ShowPanel() {
ShowPanelInactive();
ActivatePanel();
+
+ // |-makeKeyAndOrderFront:| won't send |-windowDidBecomeKey:| until we
+ // return to the runloop. This causes extension tests that wait for the
+ // active status change notification to fail, so we send an active status
+ // notification here.
+ panel_->OnActiveStateChanged(true);
}
void PanelCocoa::ShowPanelInactive() {

Powered by Google App Engine
This is Rietveld 408576698