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

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

Issue 10051020: Move full-screen detection logic from PanelManager to DisplaySettingsProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 8 years, 8 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
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 DockedPanelStrip::DockedPanelStrip(PanelManager* panel_manager) 59 DockedPanelStrip::DockedPanelStrip(PanelManager* panel_manager)
60 : PanelStrip(PanelStrip::DOCKED), 60 : PanelStrip(PanelStrip::DOCKED),
61 panel_manager_(panel_manager), 61 panel_manager_(panel_manager),
62 minimized_panel_count_(0), 62 minimized_panel_count_(0),
63 are_titlebars_up_(false), 63 are_titlebars_up_(false),
64 minimizing_all_(false), 64 minimizing_all_(false),
65 delayed_titlebar_action_(NO_ACTION), 65 delayed_titlebar_action_(NO_ACTION),
66 titlebar_action_factory_(this) { 66 titlebar_action_factory_(this) {
67 dragging_panel_current_iterator_ = panels_.end(); 67 dragging_panel_current_iterator_ = panels_.end();
68 panel_manager_->display_settings_provider()->set_desktop_bar_observer(this); 68 panel_manager_->display_settings_provider()->AddDesktopBarObserver(this);
69 } 69 }
70 70
71 DockedPanelStrip::~DockedPanelStrip() { 71 DockedPanelStrip::~DockedPanelStrip() {
72 DCHECK(panels_.empty()); 72 DCHECK(panels_.empty());
73 DCHECK(panels_in_temporary_layout_.empty()); 73 DCHECK(panels_in_temporary_layout_.empty());
74 DCHECK_EQ(0, minimized_panel_count_); 74 DCHECK_EQ(0, minimized_panel_count_);
75 panel_manager_->display_settings_provider()->RemoveDesktopBarObserver(this);
75 } 76 }
76 77
77 void DockedPanelStrip::SetDisplayArea(const gfx::Rect& display_area) { 78 void DockedPanelStrip::SetDisplayArea(const gfx::Rect& display_area) {
78 if (display_area_ == display_area) 79 if (display_area_ == display_area)
79 return; 80 return;
80 81
81 gfx::Rect old_area = display_area_; 82 gfx::Rect old_area = display_area_;
82 display_area_ = display_area; 83 display_area_ = display_area;
83 84
84 if (panels_.empty()) 85 if (panels_.empty())
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 int max_panel_width = GetMaxPanelWidth(); 892 int max_panel_width = GetMaxPanelWidth();
892 int max_panel_height = GetMaxPanelHeight(); 893 int max_panel_height = GetMaxPanelHeight();
893 panel->SetSizeRange(gfx::Size(kPanelMinWidth, kPanelMinHeight), 894 panel->SetSizeRange(gfx::Size(kPanelMinWidth, kPanelMinHeight),
894 gfx::Size(max_panel_width, max_panel_height)); 895 gfx::Size(max_panel_width, max_panel_height));
895 896
896 panel->set_attention_mode(Panel::USE_PANEL_ATTENTION); 897 panel->set_attention_mode(Panel::USE_PANEL_ATTENTION);
897 panel->SetAppIconVisibility(true); 898 panel->SetAppIconVisibility(true);
898 panel->SetAlwaysOnTop(true); 899 panel->SetAlwaysOnTop(true);
899 panel->EnableResizeByMouse(false); 900 panel->EnableResizeByMouse(false);
900 } 901 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698