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

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: removed unnecessary include Created 8 years, 9 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.h ('k') | chrome/browser/ui/panels/panel_browser_view.h » ('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 ac3027f277c5594e2e26db4b8fd34bf4ae36b229..722ab694b156db4fbb72373ce9aa48ac5f7b2a0f 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -63,6 +63,8 @@ void Panel::Initialize(const gfx::Rect& bounds) {
DCHECK(!bounds.IsEmpty());
initialized_ = true;
native_panel_ = CreateNativePanel(browser_, this, bounds);
+ if (panel_strip_ != NULL)
+ native_panel_->PreventActivationByOS(panel_strip_->IsPanelMinimized(this));
}
void Panel::OnNativePanelClosed() {
@@ -156,6 +158,12 @@ void Panel::SetAppIconVisibility(bool visible) {
native_panel_->SetPanelAppIconVisibility(visible);
}
+void Panel::SetPanelStrip(PanelStrip* new_strip) {
+ panel_strip_ = new_strip;
+ if (panel_strip_ != NULL && initialized_)
+ native_panel_->PreventActivationByOS(panel_strip_->IsPanelMinimized(this));
+}
+
void Panel::SetExpansionState(ExpansionState new_state) {
if (expansion_state_ == new_state)
return;
@@ -168,6 +176,9 @@ void Panel::SetExpansionState(ExpansionState new_state) {
if (expansion_state_ == MINIMIZED)
Deactivate();
+ DCHECK(initialized_ && panel_strip_ != NULL);
+ native_panel_->PreventActivationByOS(panel_strip_->IsPanelMinimized(this));
+
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_EXPANSION_STATE,
content::Source<Panel>(this),
« no previous file with comments | « chrome/browser/ui/panels/panel.h ('k') | chrome/browser/ui/panels/panel_browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698