| 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 AutoHidingDesktopBar::Visibility expected_visibility = | 538 AutoHidingDesktopBar::Visibility expected_visibility = |
| 539 delayed_titlebar_action_ == BRING_UP ? AutoHidingDesktopBar::VISIBLE | 539 delayed_titlebar_action_ == BRING_UP ? AutoHidingDesktopBar::VISIBLE |
| 540 : AutoHidingDesktopBar::HIDDEN; | 540 : AutoHidingDesktopBar::HIDDEN; |
| 541 if (visibility != expected_visibility) | 541 if (visibility != expected_visibility) |
| 542 return; | 542 return; |
| 543 | 543 |
| 544 DoBringUpOrDownTitlebars(delayed_titlebar_action_ == BRING_UP); | 544 DoBringUpOrDownTitlebars(delayed_titlebar_action_ == BRING_UP); |
| 545 delayed_titlebar_action_ = NO_ACTION; | 545 delayed_titlebar_action_ = NO_ACTION; |
| 546 } | 546 } |
| 547 | 547 |
| 548 void PanelStrip::OnFullScreenModeChanged(bool is_full_screen_mode_on) { |
| 549 for (size_t i = 0; i < panels_.size(); ++i) |
| 550 panels_[i]->FullScreenModeChanged(is_full_screen_mode_on); |
| 551 } |
| 552 |
| 548 void PanelStrip::Rearrange(Panels::iterator iter_to_start, | 553 void PanelStrip::Rearrange(Panels::iterator iter_to_start, |
| 549 int rightmost_position) { | 554 int rightmost_position) { |
| 550 for (Panels::iterator iter = iter_to_start; iter != panels_.end(); ++iter) { | 555 for (Panels::iterator iter = iter_to_start; iter != panels_.end(); ++iter) { |
| 551 Panel* panel = *iter; | 556 Panel* panel = *iter; |
| 552 gfx::Rect new_bounds(panel->GetBounds()); | 557 gfx::Rect new_bounds(panel->GetBounds()); |
| 553 new_bounds.set_x(rightmost_position - new_bounds.width()); | 558 new_bounds.set_x(rightmost_position - new_bounds.width()); |
| 554 new_bounds.set_y( | 559 new_bounds.set_y( |
| 555 GetBottomPositionForExpansionState(panel->expansion_state()) - | 560 GetBottomPositionForExpansionState(panel->expansion_state()) - |
| 556 new_bounds.height()); | 561 new_bounds.height()); |
| 557 panel->SetPanelBounds(new_bounds); | 562 panel->SetPanelBounds(new_bounds); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 569 | 574 |
| 570 // Start from the bottom to avoid reshuffling. | 575 // Start from the bottom to avoid reshuffling. |
| 571 for (Panels::reverse_iterator iter = panels_copy.rbegin(); | 576 for (Panels::reverse_iterator iter = panels_copy.rbegin(); |
| 572 iter != panels_copy.rend(); ++iter) | 577 iter != panels_copy.rend(); ++iter) |
| 573 (*iter)->Close(); | 578 (*iter)->Close(); |
| 574 } | 579 } |
| 575 | 580 |
| 576 bool PanelStrip::is_dragging_panel() const { | 581 bool PanelStrip::is_dragging_panel() const { |
| 577 return dragging_panel_index_ != kInvalidPanelIndex; | 582 return dragging_panel_index_ != kInvalidPanelIndex; |
| 578 } | 583 } |
| OLD | NEW |