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

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 linux asan 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()->set_desktop_bar_observer(this); 64 panel_manager_->display_settings_provider()->AddDesktopBarObserver(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);
71 } 72 }
72 73
73 void DockedPanelStrip::SetDisplayArea(const gfx::Rect& display_area) { 74 void DockedPanelStrip::SetDisplayArea(const gfx::Rect& display_area) {
74 if (display_area_ == display_area) 75 if (display_area_ == display_area)
75 return; 76 return;
76 77
77 gfx::Rect old_area = display_area_; 78 gfx::Rect old_area = display_area_;
78 display_area_ = display_area; 79 display_area_ = display_area;
79 80
80 if (panels_.empty()) 81 if (panels_.empty())
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 int max_panel_width = GetMaxPanelWidth(); 885 int max_panel_width = GetMaxPanelWidth();
885 int max_panel_height = GetMaxPanelHeight(); 886 int max_panel_height = GetMaxPanelHeight();
886 panel->SetSizeRange(gfx::Size(kPanelMinWidth, kPanelMinHeight), 887 panel->SetSizeRange(gfx::Size(kPanelMinWidth, kPanelMinHeight),
887 gfx::Size(max_panel_width, max_panel_height)); 888 gfx::Size(max_panel_width, max_panel_height));
888 889
889 panel->set_attention_mode(Panel::USE_PANEL_ATTENTION); 890 panel->set_attention_mode(Panel::USE_PANEL_ATTENTION);
890 panel->SetAppIconVisibility(true); 891 panel->SetAppIconVisibility(true);
891 panel->SetAlwaysOnTop(true); 892 panel->SetAlwaysOnTop(true);
892 panel->EnableResizeByMouse(true); 893 panel->EnableResizeByMouse(true);
893 } 894 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/display_settings_provider_win.cc ('k') | chrome/browser/ui/panels/overflow_panel_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698