OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/panel_strip.h" | 5 #include "chrome/browser/ui/panels/panel_strip.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 AutoHidingDesktopBar::Visibility expected_visibility = | 552 AutoHidingDesktopBar::Visibility expected_visibility = |
553 delayed_titlebar_action_ == BRING_UP ? AutoHidingDesktopBar::VISIBLE | 553 delayed_titlebar_action_ == BRING_UP ? AutoHidingDesktopBar::VISIBLE |
554 : AutoHidingDesktopBar::HIDDEN; | 554 : AutoHidingDesktopBar::HIDDEN; |
555 if (visibility != expected_visibility) | 555 if (visibility != expected_visibility) |
556 return; | 556 return; |
557 | 557 |
558 DoBringUpOrDownTitlebars(delayed_titlebar_action_ == BRING_UP); | 558 DoBringUpOrDownTitlebars(delayed_titlebar_action_ == BRING_UP); |
559 delayed_titlebar_action_ = NO_ACTION; | 559 delayed_titlebar_action_ = NO_ACTION; |
560 } | 560 } |
561 | 561 |
| 562 void PanelStrip::OnFullScreenModeChanged(bool is_full_screen) { |
| 563 for (size_t i = 0; i < panels_.size(); ++i) |
| 564 panels_[i]->FullScreenModeChanged(is_full_screen); |
| 565 } |
| 566 |
562 void PanelStrip::Rearrange() { | 567 void PanelStrip::Rearrange() { |
563 int rightmost_position = StartingRightPosition(); | 568 int rightmost_position = StartingRightPosition(); |
564 | 569 |
565 size_t panel_index = 0; | 570 size_t panel_index = 0; |
566 for (; panel_index < panels_.size(); ++panel_index) { | 571 for (; panel_index < panels_.size(); ++panel_index) { |
567 Panel* panel = panels_[panel_index]; | 572 Panel* panel = panels_[panel_index]; |
568 gfx::Rect new_bounds(panel->GetBounds()); | 573 gfx::Rect new_bounds(panel->GetBounds()); |
569 int x = rightmost_position - new_bounds.width(); | 574 int x = rightmost_position - new_bounds.width(); |
570 | 575 |
571 if (x < display_area_.x()) { | 576 if (x < display_area_.x()) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 | 627 |
623 // Start from the bottom to avoid reshuffling. | 628 // Start from the bottom to avoid reshuffling. |
624 for (Panels::reverse_iterator iter = panels_copy.rbegin(); | 629 for (Panels::reverse_iterator iter = panels_copy.rbegin(); |
625 iter != panels_copy.rend(); ++iter) | 630 iter != panels_copy.rend(); ++iter) |
626 (*iter)->Close(); | 631 (*iter)->Close(); |
627 } | 632 } |
628 | 633 |
629 bool PanelStrip::is_dragging_panel() const { | 634 bool PanelStrip::is_dragging_panel() const { |
630 return dragging_panel_index_ != kInvalidPanelIndex; | 635 return dragging_panel_index_ != kInvalidPanelIndex; |
631 } | 636 } |
OLD | NEW |