| OLD | NEW |
| 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/stacked_panel_collection.h" | 5 #include "chrome/browser/ui/panels/stacked_panel_collection.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/ui/panels/detached_panel_collection.h" | 10 #include "chrome/browser/ui/panels/detached_panel_collection.h" |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 void StackedPanelCollection::MoveAllDraggingPanelsInstantly( | 597 void StackedPanelCollection::MoveAllDraggingPanelsInstantly( |
| 598 const gfx::Vector2d& delta_origin) { | 598 const gfx::Vector2d& delta_origin) { |
| 599 for (Panels::const_iterator iter = panels_.begin(); | 599 for (Panels::const_iterator iter = panels_.begin(); |
| 600 iter != panels_.end(); iter++) { | 600 iter != panels_.end(); iter++) { |
| 601 Panel* panel = *iter; | 601 Panel* panel = *iter; |
| 602 if (panel->in_preview_mode()) | 602 if (panel->in_preview_mode()) |
| 603 panel->MoveByInstantly(delta_origin); | 603 panel->MoveByInstantly(delta_origin); |
| 604 } | 604 } |
| 605 } | 605 } |
| 606 | 606 |
| 607 bool StackedPanelCollection::IsMinimized() const { |
| 608 return native_stack_->IsMinimized(); |
| 609 } |
| 610 |
| 607 void StackedPanelCollection::UpdatePanelCornerStyle(Panel* panel) { | 611 void StackedPanelCollection::UpdatePanelCornerStyle(Panel* panel) { |
| 608 panel::CornerStyle corner_style; | 612 panel::CornerStyle corner_style; |
| 609 bool at_top = panel == top_panel(); | 613 bool at_top = panel == top_panel(); |
| 610 bool at_bottom = panel == bottom_panel(); | 614 bool at_bottom = panel == bottom_panel(); |
| 611 if (at_top && at_bottom) | 615 if (at_top && at_bottom) |
| 612 corner_style = panel::ALL_ROUNDED; | 616 corner_style = panel::ALL_ROUNDED; |
| 613 else if (at_top) | 617 else if (at_top) |
| 614 corner_style = panel::TOP_ROUNDED; | 618 corner_style = panel::TOP_ROUNDED; |
| 615 else if (at_bottom) | 619 else if (at_bottom) |
| 616 corner_style = panel::BOTTOM_ROUNDED; | 620 corner_style = panel::BOTTOM_ROUNDED; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 if (panel->IsActive()) | 665 if (panel->IsActive()) |
| 662 bottom += panel->GetBounds().height(); | 666 bottom += panel->GetBounds().height(); |
| 663 else | 667 else |
| 664 bottom += panel::kTitlebarHeight; | 668 bottom += panel::kTitlebarHeight; |
| 665 } | 669 } |
| 666 int available_space = work_area.bottom() - bottom; | 670 int available_space = work_area.bottom() - bottom; |
| 667 if (available_space < 0) | 671 if (available_space < 0) |
| 668 available_space = 0; | 672 available_space = 0; |
| 669 return available_space; | 673 return available_space; |
| 670 } | 674 } |
| OLD | NEW |