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

Unified Diff: ash/wm/panels/panel_layout_manager.cc

Issue 327873005: Fixed panel callout widgets showing up in the overview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed last nits. Created 6 years, 6 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 | « ash/wm/panels/panel_layout_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/panels/panel_layout_manager.cc
diff --git a/ash/wm/panels/panel_layout_manager.cc b/ash/wm/panels/panel_layout_manager.cc
index 234adb9c36a89ba571c0283074b0e495b0565712..a92ad02db95a23fa9ef084a525a54f6599b68ade 100644
--- a/ash/wm/panels/panel_layout_manager.cc
+++ b/ash/wm/panels/panel_layout_manager.cc
@@ -258,6 +258,7 @@ PanelLayoutManager::PanelLayoutManager(aura::Window* panel_container)
: panel_container_(panel_container),
in_add_window_(false),
in_layout_(false),
+ show_callout_widgets_(true),
dragged_panel_(NULL),
shelf_(NULL),
shelf_layout_manager_(NULL),
@@ -325,6 +326,13 @@ void PanelLayoutManager::ToggleMinimize(aura::Window* panel) {
window_state->Minimize();
}
+void PanelLayoutManager::SetShowCalloutWidgets(bool show) {
+ if (show_callout_widgets_ == show)
+ return;
+ show_callout_widgets_ = show;
+ UpdateCallouts();
+}
+
views::Widget* PanelLayoutManager::GetCalloutWidgetForPanel(
aura::Window* panel) {
DCHECK(panel->parent() == panel_container_);
@@ -814,7 +822,7 @@ void PanelLayoutManager::UpdateCallouts() {
panel->GetTargetBounds());
gfx::Rect icon_bounds = shelf_->GetScreenBoundsOfItemIconForWindow(panel);
if (icon_bounds.IsEmpty() || !panel->layer()->GetTargetVisibility() ||
- panel == dragged_panel_) {
+ panel == dragged_panel_ || !show_callout_widgets_) {
callout_widget->Hide();
callout_widget->GetNativeWindow()->layer()->SetOpacity(0);
continue;
« no previous file with comments | « ash/wm/panels/panel_layout_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698