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

Side by Side Diff: chrome/browser/ui/panels/docked_panel_strip.cc

Issue 10828220: Fix Linux panels to return to minimized mode after mouse moves away. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update DragMinimizedPanelWhileDrawingAttention Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/panels/old_panel_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/docked_panel_strip.h" 5 #include "chrome/browser/ui/panels/docked_panel_strip.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 578
579 gfx::Rect bounds = panel->GetBounds(); 579 gfx::Rect bounds = panel->GetBounds();
580 if (bounds.x() <= mouse_x && mouse_x <= bounds.right() && 580 if (bounds.x() <= mouse_x && mouse_x <= bounds.right() &&
581 mouse_y >= bounds.y()) 581 mouse_y >= bounds.y())
582 return true; 582 return true;
583 } 583 }
584 return false; 584 return false;
585 } 585 }
586 586
587 void DockedPanelStrip::BringUpOrDownTitlebars(bool bring_up) { 587 void DockedPanelStrip::BringUpOrDownTitlebars(bool bring_up) {
588 if (are_titlebars_up_ == bring_up)
589 return;
590
588 are_titlebars_up_ = bring_up; 591 are_titlebars_up_ = bring_up;
589 int task_delay_ms = 0; 592 int task_delay_ms = 0;
590 593
591 // If the auto-hiding bottom bar exists, delay the action until the bottom 594 // If the auto-hiding bottom bar exists, delay the action until the bottom
592 // bar is fully visible or hidden. We do not want both bottom bar and panel 595 // bar is fully visible or hidden. We do not want both bottom bar and panel
593 // titlebar to move at the same time but with different speeds. 596 // titlebar to move at the same time but with different speeds.
594 DisplaySettingsProvider* provider = 597 DisplaySettingsProvider* provider =
595 panel_manager_->display_settings_provider(); 598 panel_manager_->display_settings_provider();
596 if (provider->IsAutoHidingDesktopBarEnabled( 599 if (provider->IsAutoHidingDesktopBarEnabled(
597 DisplaySettingsProvider::DESKTOP_BAR_ALIGNED_BOTTOM)) { 600 DisplaySettingsProvider::DESKTOP_BAR_ALIGNED_BOTTOM)) {
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 void DockedPanelStrip::OnPanelActiveStateChanged(Panel* panel) { 860 void DockedPanelStrip::OnPanelActiveStateChanged(Panel* panel) {
858 // Refresh layout, but wait till active states settle. 861 // Refresh layout, but wait till active states settle.
859 // This lets us avoid refreshing too many times when one panel loses 862 // This lets us avoid refreshing too many times when one panel loses
860 // focus and another gains it. 863 // focus and another gains it.
861 ScheduleLayoutRefresh(); 864 ScheduleLayoutRefresh();
862 } 865 }
863 866
864 bool DockedPanelStrip::HasPanel(Panel* panel) const { 867 bool DockedPanelStrip::HasPanel(Panel* panel) const {
865 return find(panels_.begin(), panels_.end(), panel) != panels_.end(); 868 return find(panels_.begin(), panels_.end(), panel) != panels_.end();
866 } 869 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/old_panel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698