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

Side by Side Diff: chrome/browser/ui/panels/overflow_panel_strip.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, 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/panels/overflow_panel_strip.h" 5 #include "chrome/browser/ui/panels/overflow_panel_strip.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/ui/panels/docked_panel_strip.h" 8 #include "chrome/browser/ui/panels/docked_panel_strip.h"
9 #include "chrome/browser/ui/panels/panel_manager.h" 9 #include "chrome/browser/ui/panels/panel_manager.h"
10 #include "chrome/browser/ui/panels/native_panel.h"
10 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" 11 #include "chrome/browser/ui/panels/panel_mouse_watcher.h"
11 #include "chrome/browser/ui/panels/panel_overflow_indicator.h" 12 #include "chrome/browser/ui/panels/panel_overflow_indicator.h"
12 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
13 #include "content/public/browser/notification_service.h" 14 #include "content/public/browser/notification_service.h"
14 #include "ui/base/animation/slide_animation.h" 15 #include "ui/base/animation/slide_animation.h"
15 16
16 namespace { 17 namespace {
17 // The width of the overflow area that is expanded to show more info, i.e. 18 // The width of the overflow area that is expanded to show more info, i.e.
18 // titles, when the mouse hovers over the area. 19 // titles, when the mouse hovers over the area.
19 static const int kOverflowAreaHoverWidth = 200; 20 static const int kOverflowAreaHoverWidth = 200;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // Overflow is already a minimized mode for a panel. Nothing more to do. 174 // Overflow is already a minimized mode for a panel. Nothing more to do.
174 } 175 }
175 176
176 void OverflowPanelStrip::RestorePanel(Panel* panel) { 177 void OverflowPanelStrip::RestorePanel(Panel* panel) {
177 DCHECK_EQ(this, panel->panel_strip()); 178 DCHECK_EQ(this, panel->panel_strip());
178 PanelStrip* docked_strip = panel_manager_->docked_strip(); 179 PanelStrip* docked_strip = panel_manager_->docked_strip();
179 panel->MoveToStrip(docked_strip); 180 panel->MoveToStrip(docked_strip);
180 docked_strip->RestorePanel(panel); 181 docked_strip->RestorePanel(panel);
181 } 182 }
182 183
184 bool OverflowPanelStrip::TreatAllPanelsAsMinimized() const {
185 return true;
186 }
187
183 bool OverflowPanelStrip::CanShowPanelAsActive(const Panel* panel) const { 188 bool OverflowPanelStrip::CanShowPanelAsActive(const Panel* panel) const {
184 // All overflow panels cannot be shown as active. 189 // All overflow panels cannot be shown as active.
185 return false; 190 return false;
186 } 191 }
187 192
188 bool OverflowPanelStrip::CanDragPanel(const Panel* panel) const { 193 bool OverflowPanelStrip::CanDragPanel(const Panel* panel) const {
189 // All overflow panels are not draggable. 194 // All overflow panels are not draggable.
190 return false; 195 return false;
191 } 196 }
192 197
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 // expanded overflow panels when in full screen mode so no need 400 // expanded overflow panels when in full screen mode so no need
396 // to detect when mouse hovers over the overflow strip. 401 // to detect when mouse hovers over the overflow strip.
397 if (is_full_screen) 402 if (is_full_screen)
398 panel_manager_->mouse_watcher()->RemoveObserver(this); 403 panel_manager_->mouse_watcher()->RemoveObserver(this);
399 else 404 else
400 panel_manager_->mouse_watcher()->AddObserver(this); 405 panel_manager_->mouse_watcher()->AddObserver(this);
401 406
402 for (size_t i = 0; i < panels_.size(); ++i) 407 for (size_t i = 0; i < panels_.size(); ++i)
403 panels_[i]->FullScreenModeChanged(is_full_screen); 408 panels_[i]->FullScreenModeChanged(is_full_screen);
404 } 409 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698