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

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

Issue 9463022: Minimized panels should not open on Windows when activated by the OS (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 10 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.cc
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 8e08f364448f60eccb174968c11a378eb89bc606..fe405d396a267dca198ef3504cb958e0a2f146c3 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -157,6 +157,9 @@ void Panel::MoveToStrip(PanelStrip* new_strip) {
panel_strip_ = new_strip;
panel_strip_->AddPanel(this);
+ native_panel_->PreventActivationByOS(panel_strip_->TreatAllPanelsAsMinimized()
+ || expansion_state_ != EXPANDED);
+
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_LAYOUT_MODE,
content::Source<Panel>(this),
@@ -175,6 +178,9 @@ void Panel::SetExpansionState(ExpansionState new_state) {
if (expansion_state_ == MINIMIZED)
Deactivate();
+ native_panel_->PreventActivationByOS(panel_strip_->TreatAllPanelsAsMinimized()
+ || expansion_state_ != EXPANDED);
+
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_EXPANSION_STATE,
content::Source<Panel>(this),

Powered by Google App Engine
This is Rietveld 408576698