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

Side by Side Diff: trunk/src/chrome/browser/ui/panels/detached_panel_collection.cc

Issue 23922003: Revert 221651 "Switch to doing user-resizing via system for pane..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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/detached_panel_collection.h" 5 #include "chrome/browser/ui/panels/detached_panel_collection.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/ui/panels/display_settings_provider.h" 9 #include "chrome/browser/ui/panels/display_settings_provider.h"
10 #include "chrome/browser/ui/panels/panel_drag_controller.h" 10 #include "chrome/browser/ui/panels/panel_drag_controller.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 void DetachedPanelCollection::SortPanels(PanelsComparer comparer) { 233 void DetachedPanelCollection::SortPanels(PanelsComparer comparer) {
234 panels_.sort(comparer); 234 panels_.sort(comparer);
235 } 235 }
236 236
237 void DetachedPanelCollection::UpdatePanelOnCollectionChange(Panel* panel) { 237 void DetachedPanelCollection::UpdatePanelOnCollectionChange(Panel* panel) {
238 panel->set_attention_mode( 238 panel->set_attention_mode(
239 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION | 239 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION |
240 Panel::USE_SYSTEM_ATTENTION)); 240 Panel::USE_SYSTEM_ATTENTION));
241 panel->ShowShadow(true); 241 panel->ShowShadow(true);
242 panel->EnableResizeByMouse(true);
242 panel->UpdateMinimizeRestoreButtonVisibility(); 243 panel->UpdateMinimizeRestoreButtonVisibility();
243 panel->SetWindowCornerStyle(panel::ALL_ROUNDED); 244 panel->SetWindowCornerStyle(panel::ALL_ROUNDED);
244 } 245 }
245 246
246 void DetachedPanelCollection::OnPanelExpansionStateChanged(Panel* panel) { 247 void DetachedPanelCollection::OnPanelExpansionStateChanged(Panel* panel) {
247 // This should only be reached when a minimized stacked panel is dragged out 248 // This should only be reached when a minimized stacked panel is dragged out
248 // of the stack to become detached. For this case, the panel needs to be 249 // of the stack to become detached. For this case, the panel needs to be
249 // restored. 250 // restored.
250 DCHECK_EQ(Panel::EXPANDED, panel->expansion_state()); 251 DCHECK_EQ(Panel::EXPANDED, panel->expansion_state());
251 252
(...skipping 30 matching lines...) Expand all
282 283
283 void DetachedPanelCollection::ComputeNextDefaultPanelOrigin() { 284 void DetachedPanelCollection::ComputeNextDefaultPanelOrigin() {
284 default_panel_origin_.Offset(kPanelTilePixels, kPanelTilePixels); 285 default_panel_origin_.Offset(kPanelTilePixels, kPanelTilePixels);
285 gfx::Rect work_area = 286 gfx::Rect work_area =
286 panel_manager_->display_settings_provider()->GetPrimaryWorkArea(); 287 panel_manager_->display_settings_provider()->GetPrimaryWorkArea();
287 if (!work_area.Contains(default_panel_origin_)) { 288 if (!work_area.Contains(default_panel_origin_)) {
288 default_panel_origin_.SetPoint(kPanelTilePixels + work_area.x(), 289 default_panel_origin_.SetPoint(kPanelTilePixels + work_area.x(),
289 kPanelTilePixels + work_area.y()); 290 kPanelTilePixels + work_area.y());
290 } 291 }
291 } 292 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/ui/gtk/panels/panel_gtk.cc ('k') | trunk/src/chrome/browser/ui/panels/docked_panel_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698