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/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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 DockedPanelStrip::DockedPanelStrip(PanelManager* panel_manager) | 55 DockedPanelStrip::DockedPanelStrip(PanelManager* panel_manager) |
56 : PanelStrip(PanelStrip::DOCKED), | 56 : PanelStrip(PanelStrip::DOCKED), |
57 panel_manager_(panel_manager), | 57 panel_manager_(panel_manager), |
58 minimized_panel_count_(0), | 58 minimized_panel_count_(0), |
59 are_titlebars_up_(false), | 59 are_titlebars_up_(false), |
60 minimizing_all_(false), | 60 minimizing_all_(false), |
61 delayed_titlebar_action_(NO_ACTION), | 61 delayed_titlebar_action_(NO_ACTION), |
62 titlebar_action_factory_(this) { | 62 titlebar_action_factory_(this) { |
63 dragging_panel_current_iterator_ = panels_.end(); | 63 dragging_panel_current_iterator_ = panels_.end(); |
64 panel_manager_->display_settings_provider()->AddDesktopBarObserver(this); | 64 panel_manager_->display_settings_provider()->set_desktop_bar_observer(this); |
65 } | 65 } |
66 | 66 |
67 DockedPanelStrip::~DockedPanelStrip() { | 67 DockedPanelStrip::~DockedPanelStrip() { |
68 DCHECK(panels_.empty()); | 68 DCHECK(panels_.empty()); |
69 DCHECK(panels_in_temporary_layout_.empty()); | 69 DCHECK(panels_in_temporary_layout_.empty()); |
70 DCHECK_EQ(0, minimized_panel_count_); | 70 DCHECK_EQ(0, minimized_panel_count_); |
71 panel_manager_->display_settings_provider()->RemoveDesktopBarObserver(this); | |
72 } | 71 } |
73 | 72 |
74 void DockedPanelStrip::SetDisplayArea(const gfx::Rect& display_area) { | 73 void DockedPanelStrip::SetDisplayArea(const gfx::Rect& display_area) { |
75 if (display_area_ == display_area) | 74 if (display_area_ == display_area) |
76 return; | 75 return; |
77 | 76 |
78 gfx::Rect old_area = display_area_; | 77 gfx::Rect old_area = display_area_; |
79 display_area_ = display_area; | 78 display_area_ = display_area; |
80 | 79 |
81 if (panels_.empty()) | 80 if (panels_.empty()) |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 int max_panel_width = GetMaxPanelWidth(); | 881 int max_panel_width = GetMaxPanelWidth(); |
883 int max_panel_height = GetMaxPanelHeight(); | 882 int max_panel_height = GetMaxPanelHeight(); |
884 panel->SetSizeRange(gfx::Size(kPanelMinWidth, kPanelMinHeight), | 883 panel->SetSizeRange(gfx::Size(kPanelMinWidth, kPanelMinHeight), |
885 gfx::Size(max_panel_width, max_panel_height)); | 884 gfx::Size(max_panel_width, max_panel_height)); |
886 | 885 |
887 panel->set_attention_mode(Panel::USE_PANEL_ATTENTION); | 886 panel->set_attention_mode(Panel::USE_PANEL_ATTENTION); |
888 panel->SetAppIconVisibility(true); | 887 panel->SetAppIconVisibility(true); |
889 panel->SetAlwaysOnTop(true); | 888 panel->SetAlwaysOnTop(true); |
890 panel->EnableResizeByMouse(false); | 889 panel->EnableResizeByMouse(false); |
891 } | 890 } |
OLD | NEW |